History

Remove the pBuffer parameter from the entropy encoder stash functions

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.

Martin Storsjö committed 12 years ago

Commit f2c13951 parent 9a9f92b3 files · +18 −19Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+10−11
@@ -493,13 +493,12 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 492 unmodified lines
493493
494494 SWelsMD sMd;
495495 int32_t iEncReturn = ENC_RETURN_SUCCESS;
496− SBitStringAux* pBs = pSlice->pSliceBsa;
497496 SDynamicSlicingStack sDss;
498497 if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) {
499498 WelsInitSliceCabac (pEncCtx, pSlice);
500499 }
501500 for (; ;) {
502− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0);
501+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
503502 iCurMbIdx = iNextMbIdx;
504503 pCurMb = &pMbList[ iCurMbIdx ];
505504
@@ -514,7 +513,7 @@ TRY_REENCODING: · 8 unmodified lines
514513
515514 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
516515 if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) {
517− pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
516+ pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
518517 UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
519518 goto TRY_REENCODING;
520519 }
@@ -567,7 +566,7 @@ int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + · 46 unmodified lines
567566 iCurMbIdx = iNextMbIdx;
568567 pCurMb = &pMbList[ iCurMbIdx ];
569568
570− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0);
569+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, 0);
571570 pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice);
572571 // if already reaches the largest number of slices, set QPs to the upper bound
573572 if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) {
@@ -583,7 +582,7 @@ TRY_REENCODING: · 9 unmodified lines
583582
584583 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
585584 if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) {
586− pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
585+ pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
587586 UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
588587 goto TRY_REENCODING;
589588 }
@@ -593,7 +592,7 @@ TRY_REENCODING: · 3 unmodified lines
593592 sDss.iCurrentPos = BsGetBitsPos (pBs);
594593
595594 if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { //islice
596− pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
595+ pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
597596 pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx -
598597 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
599598 ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId];
@@ -954,7 +953,7 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 354 unmodified lines
954953 }
955954 pSlice->iMbSkipRun = 0;
956955 for (;;) {
957− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun);
956+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
958957 //point to current pMb
959958 iCurMbIdx = iNextMbIdx;
960959 pCurMb = &pMbList[ iCurMbIdx ];
@@ -985,7 +984,7 @@ TRY_REENCODING: · 24 unmodified lines
985984
986985 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
987986 if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) {
988− pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
987+ pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
989988 UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
990989 goto TRY_REENCODING;
991990 }
@@ -1050,7 +1049,7 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 58 unmodified lines
10501049 for (;;) {
10511050 //DYNAMIC_SLICING_ONE_THREAD - MultiD
10521051 //stack pBs pointer
1053− pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun);
1052+ pEncCtx->pFuncList->pfStashMBStatus (&sDss, pSlice, pSlice->iMbSkipRun);
10541053
10551054 //point to current pMb
10561055 iCurMbIdx = iNextMbIdx;
@@ -1091,7 +1090,7 @@ TRY_REENCODING: · 34 unmodified lines
10911090
10921091 iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb);
10931092 if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) {
1094− pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
1093+ pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
10951094 UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset);
10961095 goto TRY_REENCODING;
10971096 }
@@ -1102,7 +1101,7 @@ TRY_REENCODING: · 4 unmodified lines
11021101 //DYNAMIC_SLICING_ONE_THREAD - MultiD
11031102 sDss.iCurrentPos = BsGetBitsPos (pBs);
11041103 if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) {
1105− pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice);
1104+ pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pSlice);
11061105 pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx -
11071106 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back
11081107 ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId];

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