History

refactor ME for easier adding other search methods

sijchen committed 12 years ago

Commit 6c3d83a1 parent 8492aac4 files · +59 −44Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+8−4
@@ -2471,7 +2471,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2470 unmodified lines
24712471 if (P_SLICE == pCtx->eSliceType) {
24722472 if (kbBaseAvail) {
24732473 if (pCtx->pSvcParam->iSpatialLayerNum == (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1)) { //
2474− pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearchSad;
2474+ pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearch;
2475+ pCtx->pFuncList->pfCalculateSatd = NotCalculateSatdCost;
24752476 pCtx->pFuncList->pfFirstIntraMode = WelsMdFirstIntraMode;
24762477 pCtx->pFuncList->pfIntraFineMd = WelsMdIntraFinePartitionVaa;
24772478 pCtx->pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa;
@@ -2480,7 +2481,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2 unmodified lines
24802481 pCtx->pFuncList->sSampleDealingFuncs.pfIntra16x16Combined3Sad;
24812482 pCtx->pFuncList->sSampleDealingFuncs.pfMdCost = pCtx->pFuncList->sSampleDealingFuncs.pfSampleSad;
24822483 } else {
2483− pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearchSatd;
2484+ pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearch;
2485+ pCtx->pFuncList->pfCalculateSatd = CalculateSatdCost;
24842486 pCtx->pFuncList->pfFirstIntraMode = WelsMdFirstIntraMode;
24852487 pCtx->pFuncList->pfIntraFineMd = WelsMdIntraFinePartition;
24862488 pCtx->pFuncList->pfInterFineMd = WelsMdInterFinePartition;
@@ -2494,7 +2496,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 7 unmodified lines
24942496 } else {
24952497 //case 3: pBase layer MD + encoding
24962498 if (pCurLayer->sLayerInfo.sNalHeaderExt.uiDependencyId + 1 == pCtx->pSvcParam->iSpatialLayerNum) {
2497− pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearchSad;
2499+ pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearch;
2500+ pCtx->pFuncList->pfCalculateSatd = NotCalculateSatdCost;
24982501 pCtx->pFuncList->pfFirstIntraMode = WelsMdFirstIntraMode;
24992502 pCtx->pFuncList->pfIntraFineMd = WelsMdIntraFinePartitionVaa;
25002503 pCtx->pFuncList->pfInterFineMd = WelsMdInterFinePartitionVaa;
@@ -2503,7 +2506,8 @@ void PreprocessSliceCoding (sWelsEncCtx* pCtx) { · 2 unmodified lines
25032506 pCtx->pFuncList->sSampleDealingFuncs.pfIntra16x16Combined3Sad;
25042507 pCtx->pFuncList->sSampleDealingFuncs.pfIntra8x8Combined3 = pCtx->pFuncList->sSampleDealingFuncs.pfIntra8x8Combined3Sad;
25052508 } else {
2506− pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearchSatd;
2509+ pCtx->pFuncList->pfMotionSearch = WelsMotionEstimateSearch;
2510+ pCtx->pFuncList->pfCalculateSatd = CalculateSatdCost;
25072511 pCtx->pFuncList->pfFirstIntraMode = WelsMdFirstIntraMode;
25082512 pCtx->pFuncList->pfIntraFineMd = WelsMdIntraFinePartition;
25092513 pCtx->pFuncList->pfInterFineMd = WelsMdInterFinePartition;

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