History

remove unusage code for cabac

Karina committed 9 years ago

Commit 2dc76d71 parent c7bffb61 file · +16 −10Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+16−10
@@ -541,7 +541,8 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 540 unmodified lines
541541 sDss.iStartPos = sDss.iCurrentPos = 0;
542542 }
543543 for (; ;) {
544− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
544+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag)
545+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
545546 iCurMbIdx = iNextMbIdx;
546547 pCurMb = &pMbList[ iCurMbIdx ];
547548
@@ -555,10 +556,12 @@ TRY_REENCODING: · 7 unmodified lines
555556
556557
557558 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
558− if ((iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) && (pCurMb->uiLumaQp < 50)) {
559− pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
560− UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
561− goto TRY_REENCODING;
559+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) {
560+ if ((iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) && (pCurMb->uiLumaQp < 50)) {
561+ pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
562+ UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
563+ goto TRY_REENCODING;
564+ }
562565 }
563566 if (ENC_RETURN_SUCCESS != iEncReturn)
564567 return iEncReturn;
@@ -1115,7 +1118,8 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 550 unmodified lines
11151118 }
11161119 pSlice->iMbSkipRun = 0;
11171120 for (;;) {
1118− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
1121+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag)
1122+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
11191123 //point to current pMb
11201124 iCurMbIdx = iNextMbIdx;
11211125 pCurMb = &pMbList[ iCurMbIdx ];
@@ -1145,10 +1149,12 @@ TRY_REENCODING: · 23 unmodified lines
11451149 //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped
11461150
11471151 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
1148− if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND && (pCurMb->uiLumaQp < 50)) {
1149− pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
1150− UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
1151− goto TRY_REENCODING;
1152+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) {
1153+ if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND && (pCurMb->uiLumaQp < 50)) {
1154+ pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
1155+ UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
1156+ goto TRY_REENCODING;
1157+ }
11521158 }
11531159 if (ENC_RETURN_SUCCESS != iEncReturn)
11541160 return iEncReturn;

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