summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_reconinter.h
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2013-05-15 17:55:08 -0700
committerJohn Koleszar <jkoleszar@google.com>2013-05-16 22:21:09 -0700
commit679e4abdd5f733ab544689ce210b42d37e7ce164 (patch)
treeb2afbb63f8dc55e5f3ba974617bdce10b5ab34e1 /vp9/common/vp9_reconinter.h
parent16ac5a5cde0472fc29719aab7ad0958d1492df43 (diff)
downloadlibvpx-679e4abdd5f733ab544689ce210b42d37e7ce164.tar
libvpx-679e4abdd5f733ab544689ce210b42d37e7ce164.tar.gz
libvpx-679e4abdd5f733ab544689ce210b42d37e7ce164.tar.bz2
libvpx-679e4abdd5f733ab544689ce210b42d37e7ce164.zip
Initial version of alpha channel support
This is a mostly-working implementation of an extra channel in the bitstream. Configure with --enable-alpha to test. Notable TODOs: - Add extra channel to all mismatch tests, PSNR, SSIM, etc - Configurable subsampling - Variable number of planes (currently always uses all 4) - Loop filtering - Per-plane lossless quantizer - ARNR support This implementation just uses the same contents as the Y channel for the A channel, due to lack of content and general pain in playing back 4 channel content. A later patch will use the actual alpha channel passed in from outside the codec. Change-Id: Ibf81f023b1c570bd84b3064e9b4b8ae52e087592
Diffstat (limited to 'vp9/common/vp9_reconinter.h')
-rw-r--r--vp9/common/vp9_reconinter.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/vp9/common/vp9_reconinter.h b/vp9/common/vp9_reconinter.h
index 8f7619520..af289d27e 100644
--- a/vp9/common/vp9_reconinter.h
+++ b/vp9/common/vp9_reconinter.h
@@ -74,8 +74,10 @@ static void setup_pred_plane(struct buf_2d *dst,
static void setup_dst_planes(MACROBLOCKD *xd,
const YV12_BUFFER_CONFIG *src,
int mi_row, int mi_col) {
- uint8_t *buffers[3] = {src->y_buffer, src->u_buffer, src->v_buffer};
- int strides[3] = {src->y_stride, src->uv_stride, src->uv_stride};
+ uint8_t *buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
+ src->alpha_buffer};
+ int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
+ src->alpha_stride};
int i;
for (i = 0; i < MAX_MB_PLANE; ++i) {
@@ -97,8 +99,10 @@ static void setup_pre_planes(MACROBLOCKD *xd,
for (i = 0; i < 2; ++i) {
const YV12_BUFFER_CONFIG *src = srcs[i];
if (src) {
- uint8_t* buffers[3] = {src->y_buffer, src->u_buffer, src->v_buffer};
- int strides[3] = {src->y_stride, src->uv_stride, src->uv_stride};
+ uint8_t* buffers[4] = {src->y_buffer, src->u_buffer, src->v_buffer,
+ src->alpha_buffer};
+ int strides[4] = {src->y_stride, src->uv_stride, src->uv_stride,
+ src->alpha_stride};
for (j = 0; j < MAX_MB_PLANE; ++j) {
struct macroblockd_plane *pd = &xd->plane[j];