From 4dc0f0782869b0b406225cdcc18a614c8b9a3c6a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 May 2014 11:55:05 +0800 Subject: [PATCH] fix input source width and height setting issue --- codec/encoder/core/src/wels_preprocess.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codec/encoder/core/src/wels_preprocess.cpp b/codec/encoder/core/src/wels_preprocess.cpp index f75c42d9..964e67e7 100644 --- a/codec/encoder/core/src/wels_preprocess.cpp +++ b/codec/encoder/core/src/wels_preprocess.cpp @@ -177,6 +177,12 @@ int32_t CWelsPreProcess::BuildSpatialPicList (sWelsEncCtx* pCtx, const SSourcePi 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;