summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_if.c
diff options
context:
space:
mode:
authorTimothy B. Terriberry <tterribe@xiph.org>2011-07-20 10:20:31 -0700
committerTimothy B. Terriberry <tterribe@xiph.org>2011-07-20 10:20:31 -0700
commit7d1b37cdac8ae096e1d33aa7adb2834784cc897e (patch)
treeea11c18f7f0ee11e2a2b8c5a7009b2b27f7a8059 /vp8/encoder/onyx_if.c
parentb2d9700f5313770957878fa36f9971c367f479df (diff)
downloadlibvpx-7d1b37cdac8ae096e1d33aa7adb2834784cc897e.tar
libvpx-7d1b37cdac8ae096e1d33aa7adb2834784cc897e.tar.gz
libvpx-7d1b37cdac8ae096e1d33aa7adb2834784cc897e.tar.bz2
libvpx-7d1b37cdac8ae096e1d33aa7adb2834784cc897e.zip
Increase chrow row alignment to 16 bytes.
This is done by expanding luma row to 32-byte alignment, since there is currently a bunch of code that assumes that uv_stride == y_stride/2 (see, for example, vp8/common/postproc.c, common/reconinter.c, common/arm/neon/recon16x16mb_neon.asm, encoder/temporal_filter.c, and possibly others; I haven't done a full audit). It also uses replaces the hardcoded border of 16 in a number of encoder buffers with VP8BORDERINPIXELS (currently 32), as the chroma rows start at an offset of border/2. Together, these two changes have the nice advantage that simply dumping the frame memory as a contiguous blob produces a valid, if padded, image. Change-Id: Iaf5ea722ae5c82d5daa50f6e2dade9de753f1003
Diffstat (limited to 'vp8/encoder/onyx_if.c')
-rw-r--r--vp8/encoder/onyx_if.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
index ba8793dc8..35baa4c2b 100644
--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1240,7 +1240,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,
- width, height, 16))
+ width, height, VP8BORDERINPIXELS))
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate altref buffer");
@@ -1290,7 +1290,8 @@ void vp8_alloc_compressor_data(VP8_COMP *cpi)
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate last frame buffer");
- if (vp8_yv12_alloc_frame_buffer(&cpi->scaled_source, width, height, 16))
+ if (vp8_yv12_alloc_frame_buffer(&cpi->scaled_source,
+ width, height, VP8BORDERINPIXELS))
vpx_internal_error(&cpi->common.error, VPX_CODEC_MEM_ERROR,
"Failed to allocate scaled source buffer");