History

Rename some decoder tables to match the name used in the encoder

Martin Storsjö committed 12 years ago

Commit eb7cdf21 parent 4aa22da6 files · +23 −23Browse files

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

Unified · Split

codec/decoder/core/src/decode_slice.cpp+12−12
@@ -149,7 +149,7 @@ int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLa · 148 unmodified lines
149 WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4149 WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4
150 150
151 for (i = 0; i < 16; i++) { //luma151 for (i = 0; i < 16; i++) { //luma
152 iIndex = g_kuiMbNonZeroCountIdx[i];152 iIndex = g_kuiMbCountScan4Idx[i];
153 if (pCurLayer->pNzc[iMbXy][iIndex]) {153 if (pCurLayer->pNzc[iMbXy][iIndex]) {
154 iOffset = ((iIndex >> 2) << 2) * iStrideL + ((iIndex % 4) << 2);154 iOffset = ((iIndex >> 2) << 2) * iStrideL + ((iIndex % 4) << 2);
155 pCtx->pIdctResAddPredFunc (pDstY + iOffset, iStrideL, pCurLayer->pScaledTCoeff[iMbXy] + (i << 4));155 pCtx->pIdctResAddPredFunc (pDstY + iOffset, iStrideL, pCurLayer->pScaledTCoeff[iMbXy] + (i << 4));
@@ -157,13 +157,13 @@ int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLa · 1 unmodified line
157 }157 }
158 158
159 for (i = 0; i < 4; i++) { //chroma159 for (i = 0; i < 4; i++) { //chroma
160 iIndex = g_kuiMbNonZeroCountIdx[i + 16]; //Cb160 iIndex = g_kuiMbCountScan4Idx[i + 16]; //Cb
161 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4))) {161 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4))) {
162 iOffset = (((iIndex - 16) >> 2) << 2) * iStrideC + (((iIndex - 16) % 4) << 2);162 iOffset = (((iIndex - 16) >> 2) << 2) * iStrideC + (((iIndex - 16) % 4) << 2);
163 pCtx->pIdctResAddPredFunc (pDstU + iOffset, iStrideC, pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4));163 pCtx->pIdctResAddPredFunc (pDstU + iOffset, iStrideC, pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4));
164 }164 }
165 165
166 iIndex = g_kuiMbNonZeroCountIdx[i + 20]; //Cr166 iIndex = g_kuiMbCountScan4Idx[i + 20]; //Cr
167 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4))) {167 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4))) {
168 iOffset = (((iIndex - 18) >> 2) << 2) * iStrideC + (((iIndex - 18) % 4) << 2);168 iOffset = (((iIndex - 18) >> 2) << 2) * iStrideC + (((iIndex - 18) % 4) << 2);
169 pCtx->pIdctResAddPredFunc (pDstV + iOffset, iStrideC , pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4));169 pCtx->pIdctResAddPredFunc (pDstV + iOffset, iStrideC , pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4));
@@ -553,7 +553,7 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 383 unmodified lines
553 553
554 if (pCurLayer->pCbp[iMbXy] == 0 && IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) {554 if (pCurLayer->pCbp[iMbXy] == 0 && IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) {
555 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;555 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
556 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQp[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +556 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +
557 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];557 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
558 558
559 }559 }
@@ -582,7 +582,7 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 22 unmodified lines
582 return ERR_INFO_INVALID_QP;582 return ERR_INFO_INVALID_QP;
583 }583 }
584 pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];584 pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
585 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQp[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,585 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,
586 51)];586 51)];
587 587
588 588
@@ -622,8 +622,8 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 33 unmodified lines
622 iIndex++;622 iIndex++;
623 }623 }
624 } else {624 } else {
625 ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2)]], 0);625 ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2)]], 0);
626 ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);626 ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
627 }627 }
628 }628 }
629 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));629 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
@@ -857,7 +857,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 227 unmodified lines
857 ST32A4 (&pNzc[20], 0);857 ST32A4 (&pNzc[20], 0);
858 if (pCurLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurLayer->pMbType[iMbXy]) && !IS_I_BL (pCurLayer->pMbType[iMbXy])) {858 if (pCurLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurLayer->pMbType[iMbXy]) && !IS_I_BL (pCurLayer->pMbType[iMbXy])) {
859 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;859 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
860 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQp[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +860 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +
861 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];861 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
862 }862 }
863 863
@@ -885,7 +885,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 21 unmodified lines
885 return ERR_INFO_INVALID_QP;885 return ERR_INFO_INVALID_QP;
886 }886 }
887 pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];887 pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
888 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQp[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,888 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp + pSliceHeader->pPps->iChromaQpIndexOffset, 0,
889 51)];889 51)];
890 890
891 BsStartCavlc (pBs);891 BsStartCavlc (pBs);
@@ -924,8 +924,8 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 32 unmodified lines
924 iIndex++;924 iIndex++;
925 }925 }
926 } else {926 } else {
927 ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[iId8x8 << 2]], 0);927 ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
928 ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);928 ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
929 }929 }
930 }930 }
931 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));931 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
@@ -1019,7 +1019,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) { · 87 unmodified lines
1019 if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag ||1019 if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag ||
1020 (pNalCur->sNalHeaderExt.uiQualityId == 0 && pNalCur->sNalHeaderExt.uiDependencyId == 0)) {1020 (pNalCur->sNalHeaderExt.uiQualityId == 0 && pNalCur->sNalHeaderExt.uiDependencyId == 0)) {
1021 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;1021 pCurLayer->pLumaQp[iMbXy] = pSlice->iLastMbQp;
1022 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQp[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +1022 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pCurLayer->pLumaQp[iMbXy] +
1023 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];1023 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
1024 }1024 }
1025 1025

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