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
477477 const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight;
478478 int32_t iCurMbIdx = 0, iNumMbCoded = 0;
479479 const int32_t kiSliceIdx = pSlice->uiSliceIdx;
480− const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset;
480+
481481 SWelsMD sMd;
482482 int32_t iEncReturn = ENC_RETURN_SUCCESS;
483483
484484 for (; ;) {
485485 iCurMbIdx = iNextMbIdx;
486486 pCurMb = &pMbList[ iCurMbIdx ];
487− pCurMb->uiLumaQp = pEncCtx->iGlobalQp;
488− pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)];
489−
490487 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
491488
492489 sMd.iLambda = g_kiQpCostTable[pCurMb->uiLumaQp];
@@ -543,9 +540,6 @@ int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + · 50 unmodified lines
543540 for (; ;) {
544541 iCurMbIdx = iNextMbIdx;
545542 pCurMb = &pMbList[ iCurMbIdx ];
546− pCurMb->uiLumaQp = pEncCtx->iGlobalQp;
547− pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)];
548−
549543 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
550544 // if already reaches the largest number of slices, set QPs to the upper bound
551545 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