ref: 2dc76d74250d90dacd4f3ca0e1ec5348012db4ca
parent: c7bffb66735df8ea01e268bc906695ee04f007ae
author: Karina <ruil2@cisco.com>
date: Wed Dec 21 05:56:32 EST 2016
remove unusage code for cabac
--- a/codec/encoder/core/src/svc_encode_slice.cpp
+++ b/codec/encoder/core/src/svc_encode_slice.cpp
@@ -541,7 +541,8 @@
sDss.iStartPos = sDss.iCurrentPos = 0;
}
for (; ;) {
- pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag)
+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
iCurMbIdx = iNextMbIdx;
pCurMb = &pMbList[ iCurMbIdx ];
@@ -555,10 +556,12 @@
iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
- if ((iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) && (pCurMb->uiLumaQp < 50)) {
- pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
- UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
- goto TRY_REENCODING;
+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) {
+ if ((iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) && (pCurMb->uiLumaQp < 50)) {
+ pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
+ UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
+ goto TRY_REENCODING;
+ }
}
if (ENC_RETURN_SUCCESS != iEncReturn)
return iEncReturn;
@@ -1115,7 +1118,8 @@
}
pSlice->iMbSkipRun = 0;
for (;;) {
- pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag)
+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
//point to current pMb
iCurMbIdx = iNextMbIdx;
pCurMb = &pMbList[ iCurMbIdx ];
@@ -1145,10 +1149,12 @@
//step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped
iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
- if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND && (pCurMb->uiLumaQp < 50)) {
- pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
- UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
- goto TRY_REENCODING;
+ if (!pEncCtx->pSvcParam->iEntropyCodingModeFlag) {
+ if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND && (pCurMb->uiLumaQp < 50)) {
+ pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
+ UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
+ goto TRY_REENCODING;
+ }
}
if (ENC_RETURN_SUCCESS != iEncReturn)
return iEncReturn;