summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2011-02-16 11:35:06 -0800
committerCode Review <code-review@webmproject.org>2011-02-16 11:35:06 -0800
commitda9402fbf6ffb5d0ea5cb7f07598a81c6fedd7a1 (patch)
tree4f074d67732da3dda72a4d514241ef246ab84654 /vp8
parent0c2cfff9b0c3e23a6a4d97855884d70b76a8a8af (diff)
parentda227b901d5f97e1ffbbb7ffe3fddf8d015164cd (diff)
downloadlibvpx-da9402fbf6ffb5d0ea5cb7f07598a81c6fedd7a1.tar
libvpx-da9402fbf6ffb5d0ea5cb7f07598a81c6fedd7a1.tar.gz
libvpx-da9402fbf6ffb5d0ea5cb7f07598a81c6fedd7a1.tar.bz2
libvpx-da9402fbf6ffb5d0ea5cb7f07598a81c6fedd7a1.zip
Merge "Allocate source buffers to be multiples of 16"
Diffstat (limited to 'vp8')
-rw-r--r--vp8/encoder/onyx_if.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index f661a6e15..8baa00187 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1267,6 +1267,8 @@ void vp8_set_speed_features(VP8_COMP *cpi)
static void alloc_raw_frame_buffers(VP8_COMP *cpi)
{
int i, buffers;
+ /* allocate source_buffer to be multiples of 16 */
+ int width = (cpi->oxcf.Width + 15) & ~15;
buffers = cpi->oxcf.lag_in_frames;
@@ -1278,7 +1280,7 @@ static void alloc_raw_frame_buffers(VP8_COMP *cpi)
for (i = 0; i < buffers; i++)
if (vp8_yv12_alloc_frame_buffer(&cpi->src_buffer[i].source_buffer,
- cpi->oxcf.Width, cpi->oxcf.Height,
+ width, cpi->oxcf.Height,
16))
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate lag buffer");
@@ -1286,7 +1288,7 @@ static void alloc_raw_frame_buffers(VP8_COMP *cpi)
#if VP8_TEMPORAL_ALT_REF
if (vp8_yv12_alloc_frame_buffer(&cpi->alt_ref_buffer.source_buffer,
- cpi->oxcf.Width, cpi->oxcf.Height, 16))
+ width, cpi->oxcf.Height, 16))
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate altref buffer");