History

add blockstaticidc pointer for MD

lyao2 committed 12 years ago

Commit bfa16ba1 parent e57e19f4 files · +41 −10Browse files

Showing the changes to codec/encoder/core/src/wels_preprocess.cpp (1 of 4 files). Show all

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t