The parameter didn't make sense since it only pointed to the pSliceBsa field, which isn't what should be used to stash the cabac context.
Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 3 files). Show all
Unified · Split
| @@ -493,13 +493,12 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 492 unmodified lines | ||
| 493 | 493 | |
| 494 | 494 | SWelsMD sMd; |
| 495 | 495 | int32_t iEncReturn = ENC_RETURN_SUCCESS; |
| 496 | − SBitStringAux* pBs = pSlice->pSliceBsa; | |
| 497 | 496 | SDynamicSlicingStack sDss; |
| 498 | 497 | if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) { |
| 499 | 498 | WelsInitSliceCabac (pEncCtx, pSlice); |
| 500 | 499 | } |
| 501 | 500 | for (; ;) { |
| 502 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0); | |
| 501 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0); | |
| 503 | 502 | iCurMbIdx = iNextMbIdx; |
| 504 | 503 | pCurMb = &pMbList[ iCurMbIdx ]; |
| 505 | 504 | |
| @@ -514,7 +513,7 @@ TRY_REENCODING: · 8 unmodified lines | ||
| 514 | 513 | |
| 515 | 514 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 516 | 515 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 517 | − pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 516 | + pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 518 | 517 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 519 | 518 | goto TRY_REENCODING; |
| 520 | 519 | } |
| @@ -567,7 +566,7 @@ int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + · 46 unmodified lines | ||
| 567 | 566 | iCurMbIdx = iNextMbIdx; |
| 568 | 567 | pCurMb = &pMbList[ iCurMbIdx ]; |
| 569 | 568 | |
| 570 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0); | |
| 569 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0); | |
| 571 | 570 | pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice); |
| 572 | 571 | // if already reaches the largest number of slices, set QPs to the upper bound |
| 573 | 572 | if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) { |
| @@ -583,7 +582,7 @@ TRY_REENCODING: · 9 unmodified lines | ||
| 583 | 582 | |
| 584 | 583 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 585 | 584 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 586 | − pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 585 | + pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 587 | 586 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 588 | 587 | goto TRY_REENCODING; |
| 589 | 588 | } |
| @@ -593,7 +592,7 @@ TRY_REENCODING: · 3 unmodified lines | ||
| 593 | 592 | sDss.iCurrentPos = BsGetBitsPos (pBs); |
| 594 | 593 | |
| 595 | 594 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { //islice |
| 596 | − pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 595 | + pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 597 | 596 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - |
| 598 | 597 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back |
| 599 | 598 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; |
| @@ -954,7 +953,7 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 354 unmodified lines | ||
| 954 | 953 | } |
| 955 | 954 | pSlice->iMbSkipRun = 0; |
| 956 | 955 | for (;;) { |
| 957 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun); | |
| 956 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun); | |
| 958 | 957 | //point to current pMb |
| 959 | 958 | iCurMbIdx = iNextMbIdx; |
| 960 | 959 | pCurMb = &pMbList[ iCurMbIdx ]; |
| @@ -985,7 +984,7 @@ TRY_REENCODING: · 24 unmodified lines | ||
| 985 | 984 | |
| 986 | 985 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 987 | 986 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 988 | − pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 987 | + pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 989 | 988 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 990 | 989 | goto TRY_REENCODING; |
| 991 | 990 | } |
| @@ -1050,7 +1049,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 58 unmodified lines | ||
| 1050 | 1049 | for (;;) { |
| 1051 | 1050 | //DYNAMIC_SLICING_ONE_THREAD - MultiD |
| 1052 | 1051 | //stack pBs pointer |
| 1053 | − pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun); | |
| 1052 | + pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun); | |
| 1054 | 1053 | |
| 1055 | 1054 | //point to current pMb |
| 1056 | 1055 | iCurMbIdx = iNextMbIdx; |
| @@ -1091,7 +1090,7 @@ TRY_REENCODING: · 34 unmodified lines | ||
| 1091 | 1090 | |
| 1092 | 1091 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 1093 | 1092 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 1094 | − pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 1093 | + pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 1095 | 1094 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 1096 | 1095 | goto TRY_REENCODING; |
| 1097 | 1096 | } |
| @@ -1102,7 +1101,7 @@ TRY_REENCODING: · 4 unmodified lines | ||
| 1102 | 1101 | //DYNAMIC_SLICING_ONE_THREAD - MultiD |
| 1103 | 1102 | sDss.iCurrentPos = BsGetBitsPos (pBs); |
| 1104 | 1103 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { |
| 1105 | − pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); | |
| 1104 | + pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice); | |
| 1106 | 1105 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - |
| 1107 | 1106 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back |
| 1108 | 1107 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; |