diff options
author | John Koleszar <jkoleszar@google.com> | 2013-05-15 17:55:08 -0700 |
---|---|---|
committer | John Koleszar <jkoleszar@google.com> | 2013-05-16 22:21:09 -0700 |
commit | 679e4abdd5f733ab544689ce210b42d37e7ce164 (patch) | |
tree | b2afbb63f8dc55e5f3ba974617bdce10b5ab34e1 /vp9/common/vp9_reconinter.h | |
parent | 16ac5a5cde0472fc29719aab7ad0958d1492df43 (diff) | |
download | libvpx-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.h | 12 |
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]; |