ref: 32ebf966c5cb2cd5370b5a36477f268aac7e0943
parent: 77fde5c9bc72cfe5a9859eacf45907fde015a448
parent: 2f87e0c90899f4b28440f763680e0566df713446
author: Ethan Hugg <ethanhugg@gmail.com>
date: Thu Dec 26 04:57:36 EST 2013
Merge branch 'master' of https://github.com/ethanhugg/openh264 into cosmetic
--- a/codec/encoder/core/src/wels_preprocess.cpp
+++ b/codec/encoder/core/src/wels_preprocess.cpp
@@ -410,6 +410,7 @@
DownsamplePadding (pSrcPic, pDstPic, iSrcWidth, iSrcHeight, iShrinkWidth, iShrinkHeight, iTargetWidth, iTargetHeight);
if (pSvcParam->bEnableSceneChangeDetect && !pEncCtx->pVaa->bIdrPeriodFlag
+ && !pEncCtx->bEncCurFrmAsIdrFlag
&& ! (pEncCtx->iCodingIndex & (pSvcParam->uiGopSize - 1))) {
SPicture* pRefPic = pEncCtx->pLtr[iDependencyId].bReceivedT0LostFlag ?
pEncCtx->pSpatialPic[iDependencyId][pEncCtx->uiSpatialLayersInTemporal[iDependencyId] +
@@ -510,7 +511,7 @@
} while (i < kiSpatialNum);
if (pSvcParam->bEnableSceneChangeDetect && (kiSpatialNum == pSvcParam->iNumDependencyLayer)
- && !pEncCtx->pVaa->bIdrPeriodFlag) {
+ && !pEncCtx->pVaa->bIdrPeriodFlag && !pEncCtx->bEncCurFrmAsIdrFlag) {
SPicture* pRef = pEncCtx->pLtr[0].bReceivedT0LostFlag ?
pEncCtx->pSpatialPic[0][pEncCtx->uiSpatialLayersInTemporal[0] + pEncCtx->pVaa->uiValidLongTermPicIdx] :
m_pLastSpatialPicture[0][0];