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 (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
514 return ERR_INFO_INVALID_MB_TYPE;514 return ERR_INFO_INVALID_MB_TYPE;
515 } else if (25 == uiMbType) { //I_PCM515 } else if (25 == uiMbType) { //I_PCM
516 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));516 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
517 pSlice->iLastDeltaQp = 0;
517 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));518 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
518 if (uiEosFlag) {519 if (uiEosFlag) {
519 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);520 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
@@ -527,6 +528,7 @@ int32_t WelsDecodeMbCabacISliceBaseMode0 (PWelsDecoderContext pCtx, uint32_t& ui · 7 unmodified lines
527 //get uiCbp for I4x4528 //get uiCbp for I4x4
528 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, &sNeighAvail, uiCbp));529 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, &sNeighAvail, uiCbp));
529 pCurLayer->pCbp[iMbXy] = uiCbp;530 pCurLayer->pCbp[iMbXy] = uiCbp;
531 pSlice->iLastDeltaQp = uiCbp == 0 ? 0: pSlice->iLastDeltaQp;
530 uiCbpChroma = uiCbp >> 4;532 uiCbpChroma = uiCbp >> 4;
531 uiCbpLuma = uiCbp & 15;533 uiCbpLuma = uiCbp & 15;
532 } else { //I16x16;534 } else { //I16x16;
@@ -695,6 +697,7 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 162 unmodified lines
695 697
696 if (25 == uiMbType) { //I_PCM698 if (25 == uiMbType) { //I_PCM
697 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));699 WELS_READ_VERIFY (ParseIPCMInfoCabac (pCtx));
700 pSlice->iLastDeltaQp = 0;
698 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));701 WELS_READ_VERIFY (ParseEndOfSliceCabac (pCtx, uiEosFlag));
699 if (uiEosFlag) {702 if (uiEosFlag) {
700 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);703 RestoreCabacDecEngineToBS (pCtx->pCabacDecEngine, pCtx->pCurDqLayer->pBitStringAux);
@@ -721,6 +724,7 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 20 unmodified lines
721 if (MB_TYPE_INTRA16x16 != pCurLayer->pMbType[iMbXy]) {724 if (MB_TYPE_INTRA16x16 != pCurLayer->pMbType[iMbXy]) {
722 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, pNeighAvail, uiCbp));725 WELS_READ_VERIFY (ParseCbpInfoCabac (pCtx, pNeighAvail, uiCbp));
723 pCurLayer->pCbp[iMbXy] = uiCbp;726 pCurLayer->pCbp[iMbXy] = uiCbp;
727 pSlice->iLastDeltaQp = uiCbp == 0 ? 0: pSlice->iLastDeltaQp;
724 uiCbpChroma = pCurLayer->pCbp[iMbXy] >> 4;728 uiCbpChroma = pCurLayer->pCbp[iMbXy] >> 4;
725 uiCbpLuma = pCurLayer->pCbp[iMbXy] & 15;729 uiCbpLuma = pCurLayer->pCbp[iMbXy] & 15;
726 }730 }

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