Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 4 files). Show all
Unified · Split
| @@ -927,6 +927,7 @@ void CWelsPreProcess::SaveBestRefToLocal (SRefInfoParam* pRefPicInfo, const SSce · 926 unmodified lines | ||
| 927 | 927 | SRefInfoParam* pRefSaved) { |
| 928 | 928 | pRefSaved->iSrcListIdx = pRefPicInfo->iSrcListIdx; |
| 929 | 929 | pRefSaved->bSceneLtrFlag = pRefPicInfo->bSceneLtrFlag; |
| 930 | + pRefSaved->pBestBlockStaticIdc = sSceneChangeResult.pStaticBlockIdc; | |
| 930 | 931 | } |
| 931 | 932 | |
| 932 | 933 | void CWelsPreProcess::SaveBestRefToVaa (SRefInfoParam& sRefSaved, SRefInfoParam* pVaaBestRef) { |
| @@ -974,8 +975,6 @@ ESceneChangeIdc CWelsPreProcess::DetectSceneChangeScreen (sWelsEncCtx* pCtx, SPi · 41 unmodified lines | ||
| 974 | 975 | SPicture* pRefPic = NULL; |
| 975 | 976 | SRefInfoParam* pRefPicInfo = NULL; |
| 976 | 977 | uint8_t* pCurBlockStaticPointer = NULL; |
| 977 | − uint8_t* pBestStrBlockStaticPointer = NULL; | |
| 978 | − uint8_t* pBestLtrBlockStaticPointer = NULL; | |
| 979 | 978 | |
| 980 | 979 | const int32_t iNegligibleMotionBlocks = (static_cast<int32_t> ((pCurPicture->iWidthInPixel >> 3) * |
| 981 | 980 | (pCurPicture->iHeightInPixel >> 3) * STATIC_SCENE_MOTION_RATIO)); |
| @@ -1046,12 +1045,10 @@ ESceneChangeIdc CWelsPreProcess::DetectSceneChangeScreen (sWelsEncCtx* pCtx, SPi · 64 unmodified lines | ||
| 1046 | 1045 | SaveBestRefToJudgement (iRefPicAvQP, iFrameComplexity, &sLtrJudgement); |
| 1047 | 1046 | SaveBestRefToLocal (pRefPicInfo, sSceneChangeResult, &sLtrSaved); |
| 1048 | 1047 | bBestRefIsLtr = bCurRefIsLtr; |
| 1049 | − pBestStrBlockStaticPointer = sSceneChangeResult.pStaticBlockIdc; | |
| 1050 | 1048 | } |
| 1051 | 1049 | if (bCurRefIsLtr && JudgeBestRef (pRefPic, sSceneLtrJudgement, iFrameComplexity, bIsClosestLtrFrame)) { |
| 1052 | 1050 | SaveBestRefToJudgement (iRefPicAvQP, iFrameComplexity, &sSceneLtrJudgement); |
| 1053 | 1051 | SaveBestRefToLocal (pRefPicInfo, sSceneChangeResult, &sSceneLtrSaved); |
| 1054 | − pBestLtrBlockStaticPointer = sSceneChangeResult.pStaticBlockIdc; | |
| 1055 | 1052 | } |
| 1056 | 1053 | |
| 1057 | 1054 | if (iMotionBlockNum <= iNegligibleMotionBlocks) { |
| @@ -1072,6 +1069,7 @@ ESceneChangeIdc CWelsPreProcess::DetectSceneChangeScreen (sWelsEncCtx* pCtx, SPi · 14 unmodified lines | ||
| 1072 | 1069 | pCtx->iCodingIndex); |
| 1073 | 1070 | |
| 1074 | 1071 | SaveBestRefToVaa (sLtrSaved, & (pVaaExt->sVaaStrBestRefCandidate[0])); |
| 1072 | + pVaaExt->pVaaBestBlockStaticIdc = sLtrSaved.pBestBlockStaticIdc; | |
| 1075 | 1073 | |
| 1076 | 1074 | if (0 == iAvailableSceneRefNum) { |
| 1077 | 1075 | SaveBestRefToVaa (sSceneLtrSaved, & (pVaaExt->sVaaStrBestRefCandidate[1])); |