diff --git a/codec/decoder/core/src/decode_slice.cpp b/codec/decoder/core/src/decode_slice.cpp index be6f023f..50bc3f37 100644 --- a/codec/decoder/core/src/decode_slice.cpp +++ b/codec/decoder/core/src/decode_slice.cpp @@ -517,7 +517,7 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { //step 3: update QP and pNonZeroCount pCurLayer->pLumaQp[iMbXy] = 0; pCurLayer->pChromaQp[iMbXy] = 0; - memset (pCurLayer->pNzc[iMbXy], 16, sizeof (pCurLayer->pNzc[iMbXy])); //JVT-x201wcm1.doc, page229, 2009.10.23 + memset (pCurLayer->pNzc[iMbXy], 16, sizeof (pCurLayer->pNzc[iMbXy])); //Rec. 9.2.1 for PCM, nzc=16 return 0; } else if (0 == uiMbType) { //reference to JM ENFORCE_STACK_ALIGN_1D (int8_t, pIntraPredMode, 48, 16); @@ -683,13 +683,6 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { ST16 (&pCurLayer->pNzc[iMbXy][22], 0); } BsEndCavlc (pBs); - } else { - ST32 (&pCurLayer->pNzc[iMbXy][0], 0); - ST32 (&pCurLayer->pNzc[iMbXy][4], 0); - ST32 (&pCurLayer->pNzc[iMbXy][8], 0); - ST32 (&pCurLayer->pNzc[iMbXy][12], 0); - ST32 (&pCurLayer->pNzc[iMbXy][16], 0); - ST32 (&pCurLayer->pNzc[iMbXy][20], 0); } return 0; @@ -827,10 +820,13 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { //step 3: update QP and pNonZeroCount pCurLayer->pLumaQp[iMbXy] = 0; pCurLayer->pChromaQp[iMbXy] = 0; - ST32 (&pCurLayer->pNzc[iMbXy][0], 0); - ST32 (&pCurLayer->pNzc[iMbXy][4], 0); - ST32 (&pCurLayer->pNzc[iMbXy][8], 0); - ST32 (&pCurLayer->pNzc[iMbXy][12], 0); + //Rec. 9.2.1 for PCM, nzc=16 + ST32 (&pCurLayer->pNzc[iMbXy][0], 0x10101010); + ST32 (&pCurLayer->pNzc[iMbXy][4], 0x10101010); + ST32 (&pCurLayer->pNzc[iMbXy][8], 0x10101010); + ST32 (&pCurLayer->pNzc[iMbXy][12], 0x10101010); + ST32 (&pCurLayer->pNzc[iMbXy][16], 0x10101010); + ST32 (&pCurLayer->pNzc[iMbXy][20], 0x10101010); return 0; } else { if (0 == uiMbType) { @@ -883,6 +879,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { ST32 (&pCurLayer->pNzc[iMbXy][4], 0); ST32 (&pCurLayer->pNzc[iMbXy][8], 0); ST32 (&pCurLayer->pNzc[iMbXy][12], 0); + ST32 (&pCurLayer->pNzc[iMbXy][16], 0); ST32 (&pCurLayer->pNzc[iMbXy][20], 0); if (pCurLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurLayer->pMbType[iMbXy]) && !IS_I_BL (pCurLayer->pMbType[iMbXy])) { pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp; @@ -1004,13 +1001,6 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { ST32 (&pCurLayer->pNzc[iMbXy][20], 0); } BsEndCavlc (pBs); - } else { - ST32 (&pCurLayer->pNzc[iMbXy][0], 0); - ST32 (&pCurLayer->pNzc[iMbXy][4], 0); - ST32 (&pCurLayer->pNzc[iMbXy][8], 0); - ST32 (&pCurLayer->pNzc[iMbXy][12], 0); - ST32 (&pCurLayer->pNzc[iMbXy][16], 0); - ST32 (&pCurLayer->pNzc[iMbXy][20], 0); } return 0;