postproc: allocate enough memory for limits buffer The vp8_post_proc_down_and_across_mb_row_sse2() needs space for an even number of macroblocks, as they are read two at a time for the chroma planes. Round up the width during the allocation of pp_limits_buffer to support this. Change-Id: Ibfc10c7be290d961ab23ac3dde12a7bb96c12af0
diff --git a/vp8/common/alloccommon.c b/vp8/common/alloccommon.c index a03f882..8af9e90 100644 --- a/vp8/common/alloccommon.c +++ b/vp8/common/alloccommon.c
@@ -107,8 +107,11 @@ vpx_memset(oci->post_proc_buffer.buffer_alloc, 128, oci->post_proc_buffer.frame_size); - /* Allocate buffer to store post-processing filter coefficients. */ - oci->pp_limits_buffer = vpx_memalign(16, 24 * oci->mb_cols); + /* Allocate buffer to store post-processing filter coefficients. + * + * Note: Round up mb_cols to support SIMD reads + */ + oci->pp_limits_buffer = vpx_memalign(16, 24 * ((oci->mb_cols + 1) & ~1)); if (!oci->pp_limits_buffer) goto allocation_fail; #endif