From 68a5910f8fee7853a2323554a3d91329b743dc74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindre=20Aam=C3=A5s?= Date: Fri, 3 Jun 2016 12:00:13 +0200 Subject: [PATCH] [Processing] Clear LSB before rounding up dyadic downsample width --- codec/processing/src/downsample/downsample.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codec/processing/src/downsample/downsample.cpp b/codec/processing/src/downsample/downsample.cpp index 9a3dbeb3..ed85a38d 100644 --- a/codec/processing/src/downsample/downsample.cpp +++ b/codec/processing/src/downsample/downsample.cpp @@ -275,12 +275,12 @@ void CDownsampling::DownsampleHalfAverage (uint8_t* pDst, int32_t iDstStride, if ((iSrcStride & 31) == 0) { assert ((iDstStride & 15) == 0); m_pfDownsample.pfHalfAverageWidthx32 (pDst, iDstStride, - pSrc, iSrcStride, WELS_ALIGN (iSrcWidth, 32), iSrcHeight); + pSrc, iSrcStride, WELS_ALIGN (iSrcWidth & ~1, 32), iSrcHeight); } else { assert ((iSrcStride & 15) == 0); assert ((iDstStride & 7) == 0); m_pfDownsample.pfHalfAverageWidthx16 (pDst, iDstStride, - pSrc, iSrcStride, WELS_ALIGN (iSrcWidth, 16), iSrcHeight); + pSrc, iSrcStride, WELS_ALIGN (iSrcWidth & ~1, 16), iSrcHeight); } }