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
149149 WelsChromaDcIdct (pCurLayer->pScaledTCoeff[iMbXy] + 320); // 320 = 16*16 + 16*4
150150
151151 for (i = 0; i < 16; i++) { //luma
152− iIndex = g_kuiMbNonZeroCountIdx[i];
152+ iIndex = g_kuiMbCountScan4Idx[i];
153153 if (pCurLayer->pNzc[iMbXy][iIndex]) {
154154 iOffset = ((iIndex >> 2) << 2) * iStrideL + ((iIndex % 4) << 2);
155155 pCtx->pIdctResAddPredFunc (pDstY + iOffset, iStrideL, pCurLayer->pScaledTCoeff[iMbXy] + (i << 4));
@@ -157,13 +157,13 @@ int32_t WelsMbInterSampleConstruction (PWelsDecoderContext pCtx, PDqLayer pCurLa · 1 unmodified line
157157 }
158158
159159 for (i = 0; i < 4; i++) { //chroma
160− iIndex = g_kuiMbNonZeroCountIdx[i + 16]; //Cb
160+ iIndex = g_kuiMbCountScan4Idx[i + 16]; //Cb
161161 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4))) {
162162 iOffset = (((iIndex - 16) >> 2) << 2) * iStrideC + (((iIndex - 16) % 4) << 2);
163163 pCtx->pIdctResAddPredFunc (pDstU + iOffset, iStrideC, pCurLayer->pScaledTCoeff[iMbXy] + ((i + 16) << 4));
164164 }
165165
166− iIndex = g_kuiMbNonZeroCountIdx[i + 20]; //Cr
166+ iIndex = g_kuiMbCountScan4Idx[i + 20]; //Cr
167167 if (pCurLayer->pNzc[iMbXy][iIndex] || * (pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4))) {
168168 iOffset = (((iIndex - 18) >> 2) << 2) * iStrideC + (((iIndex - 18) % 4) << 2);
169169 pCtx->pIdctResAddPredFunc (pDstV + iOffset, iStrideC , pCurLayer->pScaledTCoeff[iMbXy] + ((i + 20) << 4));
@@ -553,7 +553,7 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 383 unmodified lines
553553
554554 if (pCurLayer->pCbp[iMbXy] == 0 && IS_INTRA4x4 (pCurLayer->pMbType[iMbXy])) {
555555 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] +
557557 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
558558
559559 }
@@ -582,7 +582,7 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 22 unmodified lines
582582 return ERR_INFO_INVALID_QP;
583583 }
584584 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,
586586 51)];
587587
588588
@@ -622,8 +622,8 @@ int32_t WelsActualDecodeMbCavlcISlice (PWelsDecoderContext pCtx) { · 33 unmodified lines
622622 iIndex++;
623623 }
624624 } else {
625− ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2)]], 0);
626− ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
625+ ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2)]], 0);
626+ ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
627627 }
628628 }
629629 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
@@ -857,7 +857,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 227 unmodified lines
857857 ST32A4 (&pNzc[20], 0);
858858 if (pCurLayer->pCbp[iMbXy] == 0 && !IS_INTRA16x16 (pCurLayer->pMbType[iMbXy]) && !IS_I_BL (pCurLayer->pMbType[iMbXy])) {
859859 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] +
861861 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
862862 }
863863
@@ -885,7 +885,7 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 21 unmodified lines
885885 return ERR_INFO_INVALID_QP;
886886 }
887887 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,
889889 51)];
890890
891891 BsStartCavlc (pBs);
@@ -924,8 +924,8 @@ int32_t WelsActualDecodeMbCavlcPSlice (PWelsDecoderContext pCtx) { · 32 unmodified lines
924924 iIndex++;
925925 }
926926 } else {
927− ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[iId8x8 << 2]], 0);
928− ST16 (&pNonZeroCount[g_kuiCacheNzcScanIdx[ (iId8x8 << 2) + 2]], 0);
927+ ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[iId8x8 << 2]], 0);
928+ ST16 (&pNonZeroCount[g_kuiCache48CountScan4Idx[ (iId8x8 << 2) + 2]], 0);
929929 }
930930 }
931931 ST32A4 (&pNzc[0], LD32 (&pNonZeroCount[1 + 8 * 1]));
@@ -1019,7 +1019,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur) { · 87 unmodified lines
10191019 if (!pSlice->sSliceHeaderExt.bDefaultResidualPredFlag ||
10201020 (pNalCur->sNalHeaderExt.uiQualityId == 0 && pNalCur->sNalHeaderExt.uiDependencyId == 0)) {
10211021 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] +
10231023 pSliceHeader->pPps->iChromaQpIndexOffset, 0, 51)];
10241024 }
10251025

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