shithub: openh264

Download patch

ref: 68a5910f8fee7853a2323554a3d91329b743dc74
parent: 8a0af4a3f212ee7fbe4cba44513e2f3115499ea4
author: Sindre Aamås <saamas@cisco.com>
date: Fri Jun 3 08:00:13 EDT 2016

[Processing] Clear LSB before rounding up dyadic downsample width

--- a/codec/processing/src/downsample/downsample.cpp
+++ b/codec/processing/src/downsample/downsample.cpp
@@ -275,12 +275,12 @@
   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);
   }
 }