ref: dae4dbf377dea8ba7f69771202fb0867a48e6450
parent: 0c24fd66cd7e48d82c1972f60ed3704e686b2080
parent: 4dc0f0782869b0b406225cdcc18a614c8b9a3c6a
author: huili2 <huili2@cisco.com>
date: Mon May 12 08:39:54 EDT 2014
Merge pull request #816 from ruil2/enc_scale fix input source width and height setting issue
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -177,6 +177,12 @@
if (!m_bInitDone) {
if (WelsPreprocessCreate() != 0)
return -1;
+
+ //init source width and height
+ pSvcParam->SUsedPicRect.iLeft = 0;
+ pSvcParam->SUsedPicRect.iTop = 0;
+ pSvcParam->SUsedPicRect.iWidth = ((kpSrcPic->iPicWidth >> 1) << 1);
+ pSvcParam->SUsedPicRect.iHeight = ((kpSrcPic->iPicHeight >> 1) << 1);
if (WelsPreprocessReset (pCtx) != 0)
return -1;