shithub: openh264

Download patch

ref: bf3cc1ed63d8951634f68b1db3c7764548a3f0cf
parent: 67664f4dc01afe36b2128b29e5a18d2b99d7874f
parent: e8cdbd2ea7cd882b6d99a0198905bfe569246c86
author: zhilwang <[email protected]>
date: Sun Mar 1 11:45:03 EST 2015

Merge pull request #1823 from mstorsjo/downsample-min

Don't downsample to anything smaller than 4x4 pixels

--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -430,9 +430,9 @@
 
     if (iInputWidthXDstHeight > iInputHeightXDstWidth) {
       pScaledPicture->iScaledWidth[iSpatialIdx] = iCurDstWidth;
-      pScaledPicture->iScaledHeight[iSpatialIdx] = WELS_MAX (iInputHeightXDstWidth / kiInputPicWidth, 2);
+      pScaledPicture->iScaledHeight[iSpatialIdx] = WELS_MAX (iInputHeightXDstWidth / kiInputPicWidth, 4);
     } else {
-      pScaledPicture->iScaledWidth[iSpatialIdx] = WELS_MAX (iInputWidthXDstHeight / kiInputPicHeight, 2);
+      pScaledPicture->iScaledWidth[iSpatialIdx] = WELS_MAX (iInputWidthXDstHeight / kiInputPicHeight, 4);
       pScaledPicture->iScaledHeight[iSpatialIdx] = iCurDstHeight;
     }
   }