Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 1 file). Show all
Unified · Split
| @@ -541,7 +541,8 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 540 unmodified lines | ||
| 541 | 541 | sDss.iStartPos = sDss.iCurrentPos = 0; |
| 542 | 542 | } |
| 543 | 543 | for (; ;) { |
| 544 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0); | |
| 544 | + if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) | |
| 545 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0); | |
| 545 | 546 | iCurMbIdx = iNextMbIdx; |
| 546 | 547 | pCurMb = &pMbList[ iCurMbIdx ]; |
| 547 | 548 | |
| @@ -555,10 +556,12 @@ TRY_REENCODING: · 7 unmodified lines | ||
| 555 | 556 | |
| 556 | 557 | |
| 557 | 558 | 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 | + } | |
| 562 | 565 | } |
| 563 | 566 | if (ENC_RETURN_SUCCESS != iEncReturn) |
| 564 | 567 | return iEncReturn; |
| @@ -1115,7 +1118,8 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 550 unmodified lines | ||
| 1115 | 1118 | } |
| 1116 | 1119 | pSlice->iMbSkipRun = 0; |
| 1117 | 1120 | for (;;) { |
| 1118 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun); | |
| 1121 | + if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) | |
| 1122 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun); | |
| 1119 | 1123 | //point to current pMb |
| 1120 | 1124 | iCurMbIdx = iNextMbIdx; |
| 1121 | 1125 | pCurMb = &pMbList[ iCurMbIdx ]; |
| @@ -1145,10 +1149,12 @@ TRY_REENCODING: · 23 unmodified lines | ||
| 1145 | 1149 | //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped |
| 1146 | 1150 | |
| 1147 | 1151 | 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 | + } | |
| 1152 | 1158 | } |
| 1153 | 1159 | if (ENC_RETURN_SUCCESS != iEncReturn) |
| 1154 | 1160 | return iEncReturn; |