History

remove redundant code for mb qp calculation

ruil2 committed 12 years ago

Commit 31120dd1 parent e57e19f2 files · +13 −13Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+1−7
@@ -477,16 +477,13 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 476 unmodified lines
477 const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight;477 const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight;
478 int32_t iCurMbIdx = 0, iNumMbCoded = 0;478 int32_t iCurMbIdx = 0, iNumMbCoded = 0;
479 const int32_t kiSliceIdx = pSlice->uiSliceIdx;479 const int32_t kiSliceIdx = pSlice->uiSliceIdx;
480 const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;480
481 SWelsMD sMd;481 SWelsMD sMd;
482 int32_t iEncReturn = ENC_RETURN_SUCCESS;482 int32_t iEncReturn = ENC_RETURN_SUCCESS;
483 483
484 for (; ;) {484 for (; ;) {
485 iCurMbIdx = iNextMbIdx;485 iCurMbIdx = iNextMbIdx;
486 pCurMb = &pMbList[ iCurMbIdx ];486 pCurMb = &pMbList[ iCurMbIdx ];
487 pCurMb->uiLumaQp = pEncCtx->iGlobalQp;
488 pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)];
489
490 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);487 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
491 488
492 sMd.iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];489 sMd.iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
@@ -543,9 +540,6 @@ int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + · 50 unmodified lines
543 for (; ;) {540 for (; ;) {
544 iCurMbIdx = iNextMbIdx;541 iCurMbIdx = iNextMbIdx;
545 pCurMb = &pMbList[ iCurMbIdx ];542 pCurMb = &pMbList[ iCurMbIdx ];
546 pCurMb->uiLumaQp = pEncCtx->iGlobalQp;
547 pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)];
548
549 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);543 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
550 // if already reaches the largest number of slices, set QPs to the upper bound544 // if already reaches the largest number of slices, set QPs to the upper bound
551 if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) {545 if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) {

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