History

fix cabac bug in deltaqp

dongzha committed 12 years ago

Commit ba0351f1 parent 63180b91 file · +4 −0Browse files

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

Unified · Split

codec/decoder/core/src/decode_slice.cpp+4−0
@@ -514,6 +514,7 @@ int32_t WelsDecodeMbCabacISliceBaseMode0 (PWelsDecoderContext pCtx, uint32_t& ui · 513 unmodified lines
514514 return ERR_INFO_INVALID_MB_TYPE;
515515 } else if (25 == uiMbType) { //I_PCM
516516 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
517+ pSlice->iLastDeltaQp = 0;
517518 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
518519 if (uiEosFlag) {
519520 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
@@ -527,6 +528,7 @@ int32_t WelsDecodeMbCabacISliceBaseMode0 (PWelsDecoderContext pCtx, uint32_t& ui · 7 unmodified lines
527528 //get uiCbp for I4x4
528529 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, &sNeighAvail, uiCbp));
529530 pCurLayer->pCbp[iMbXy] = uiCbp;
531+ pSlice->iLastDeltaQp = uiCbp == 0 ? 0: pSlice->iLastDeltaQp;
530532 uiCbpChroma = uiCbp >> 4;
531533 uiCbpLuma = uiCbp & 15;
532534 } else { //I16x16;
@@ -695,6 +697,7 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 162 unmodified lines
695697
696698 if (25 == uiMbType) { //I_PCM
697699 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
700+ pSlice->iLastDeltaQp = 0;
698701 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
699702 if (uiEosFlag) {
700703 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
@@ -721,6 +724,7 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 20 unmodified lines
721724 if (MB_TYPE_INTRA16x16 != pCurLayer->pMbType[iMbXy]) {
722725 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, pNeighAvail, uiCbp));
723726 pCurLayer->pCbp[iMbXy] = uiCbp;
727+ pSlice->iLastDeltaQp = uiCbp == 0 ? 0: pSlice->iLastDeltaQp;
724728 uiCbpChroma = pCurLayer->pCbp[iMbXy] >> 4;
725729 uiCbpLuma = pCurLayer->pCbp[iMbXy] & 15;
726730 }

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