ref: ad9ca3824f621cf607e1c3f8d775779d14da5824
parent: f5fd7420a9bd1ae723c7aec8e6408e188dd8265b
parent: ae508b9724f26808166f06d9b689d51cf6326a12
author: HaiboZhu <haibozhu@cisco.com>
date: Thu Feb 4 07:00:20 EST 2016
Merge pull request #2354 from ruil2/remove_trace fix error width and height issue
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -315,8 +315,6 @@
int32_t iPicturePos = m_uiSpatialLayersInTemporal[iDependencyId] - 1;
Scaled_Picture* pScaledPicture = &m_sScaledPicture;
- int32_t iSrcWidth = pSvcParam->SUsedPicRect.iWidth;
- int32_t iSrcHeight = pSvcParam->SUsedPicRect.iHeight;
int32_t iTargetWidth = pDlayerParam->iVideoWidth;
int32_t iTargetHeight = pDlayerParam->iVideoHeight;
@@ -323,6 +321,8 @@
SPicture* pSrcPic = (pSpatialIndexMap + iMaxDid)->pSrc;; // large
SPicture* pDstPic = m_pSpatialPic[iDependencyId][iPicturePos]; // small
+ int32_t iSrcWidth = pSrcPic->iWidthInPixel;
+ int32_t iSrcHeight = pSrcPic->iHeightInPixel;
int32_t iShrinkWidth = pScaledPicture->iScaledWidth[iDependencyId];
int32_t iShrinkHeight = pScaledPicture->iScaledHeight[iDependencyId];
DownsamplePadding (pSrcPic, pDstPic, iSrcWidth, iSrcHeight, iShrinkWidth, iShrinkHeight, iTargetWidth, iTargetHeight,
@@ -384,7 +384,6 @@
}
DownsamplePadding (pSrcPic, pDstPic, iSrcWidth, iSrcHeight, iShrinkWidth, iShrinkHeight, iTargetWidth, iTargetHeight,
false);
-
if (pSvcParam->bEnableSceneChangeDetect && !pCtx->pVaa->bIdrPeriodFlag) {
if (pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) {
pCtx->pVaa->eSceneChangeIdc = (pDlayerParamInternal->bEncCurFrmAsIdrFlag ? LARGE_CHANGED_SCENE :