summaryrefslogtreecommitdiff
path: root/vpx_scale
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2013-05-15 16:29:20 -0700
committerDmitry Kovalev <dkovalev@google.com>2013-05-15 16:29:20 -0700
commitb7a4f8a6db9e83ef23e4d51341db2404d938e57e (patch)
treecaaa4250a00a44a93f7ba5f8fd176bb34bb3edf0 /vpx_scale
parent1f26840fbfbef085ed53016bfc91705f148916fd (diff)
downloadlibvpx-b7a4f8a6db9e83ef23e4d51341db2404d938e57e.tar.gz
libvpx-b7a4f8a6db9e83ef23e4d51341db2404d938e57e.tar.bz2
libvpx-b7a4f8a6db9e83ef23e4d51341db2404d938e57e.zip
Adding alpha plane to YV12_BUFFER_CONFIG structure.
Change-Id: I8b2687138df636b2b78c8cc5156e3882b0009de0
Diffstat (limited to 'vpx_scale')
-rw-r--r--vpx_scale/generic/yv12config.c5
-rw-r--r--vpx_scale/yv12config.h5
2 files changed, 10 insertions, 0 deletions
diff --git a/vpx_scale/generic/yv12config.c b/vpx_scale/generic/yv12config.c
index cd66f0051..99e3543ac 100644
--- a/vpx_scale/generic/yv12config.c
+++ b/vpx_scale/generic/yv12config.c
@@ -76,12 +76,17 @@ int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
ybf->uv_height = uv_height;
ybf->uv_stride = uv_stride;
+ ybf->alpha_width = 0;
+ ybf->alpha_height = 0;
+ ybf->alpha_stride = 0;
+
ybf->border = border;
ybf->frame_size = frame_size;
ybf->y_buffer = ybf->buffer_alloc + (border * y_stride) + border;
ybf->u_buffer = ybf->buffer_alloc + yplane_size + (border / 2 * uv_stride) + border / 2;
ybf->v_buffer = ybf->buffer_alloc + yplane_size + uvplane_size + (border / 2 * uv_stride) + border / 2;
+ ybf->alpha_buffer = NULL;
ybf->corrupted = 0; /* assume not currupted by errors */
return 0;
diff --git a/vpx_scale/yv12config.h b/vpx_scale/yv12config.h
index 85396c00e..7b8bd850f 100644
--- a/vpx_scale/yv12config.h
+++ b/vpx_scale/yv12config.h
@@ -52,9 +52,14 @@ extern "C" {
int uv_stride;
/* int uvinternal_width; */
+ int alpha_width;
+ int alpha_height;
+ int alpha_stride;
+
uint8_t *y_buffer;
uint8_t *u_buffer;
uint8_t *v_buffer;
+ uint8_t *alpha_buffer;
uint8_t *buffer_alloc;
int buffer_alloc_sz;