History

support scalinglist8x8

fix issue update according to wayne's suggestiong

zhuiling committed 11 years ago

Commit 17e5ea91 parent 698ba112 files · +39 −26Browse files

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

Unified · Split

codec/decoder/core/src/decode_slice.cpp+28−8
@@ -936,19 +936,32 @@ int32_t WelsCalcDeqCoeffScalingList (PWelsDecoderContext pCtx) { · 935 unmodified lines
936936 pCtx->bUseScalingList = true;
937937
938938 if (!pCtx->bDequantCoeff4x4Init || (pCtx->iDequantCoeffPpsid != pCtx->pPps->iPpsId)) {
939− int i, q, x;
939+ int i, q, x, y;
940940 // Rewrite pps scaling list for scalingList present flag=0
941941 if (pCtx->bSpsLatePps) {
942− for (i = 0; i < 6; i++) {
943− if (!pCtx->pSps->bSeqScalingListPresentFlag[i]) {
944− if (i == 0 || i == 3)
945− memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pSps->iScalingList4x4[i], 16 * sizeof (uint8_t));
946− else
947− memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pPps->iScalingList4x4[i - 1], 16 * sizeof (uint8_t));
942+ for (i = 0; i < 12; i++) {
943+ //if (!pCtx->pSps->bSeqScalingListPresentFlag[i]) {
944+ if (!pCtx->pPps->bPicScalingListPresentFlag[i]) {
945+ if (i < 6) {
946+
947+
948+ if (i == 0 || i == 3)
949+ memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pSps->iScalingList4x4[i], 16 * sizeof (uint8_t));
950+ else
951+ memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pPps->iScalingList4x4[i - 1], 16 * sizeof (uint8_t));
952+ } else {
953+
954+ if (i == 6 || i == 7)
955+ memcpy (pCtx->pPps->iScalingList8x8[ i - 6 ], pCtx->pSps->iScalingList8x8[ i - 6 ], 64 * sizeof (uint8_t));
956+ else
957+ memcpy (pCtx->pPps->iScalingList8x8[ i - 6 ], pCtx->pPps->iScalingList8x8[i - 8], 64 * sizeof (uint8_t));
958+
959+
960+ }
948961
949962 }
950963 }
951− //TO DO, SUPPORT 8x8 SCALINGlist
964+
952965
953966 }
954967 //Init dequant coeff value for different QP
@@ -959,10 +972,17 @@ int32_t WelsCalcDeqCoeffScalingList (PWelsDecoderContext pCtx) { · 4 unmodified lines
959972 pCtx->pDequant_coeff4x4[i][q][x] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList4x4[i][x] *
960973 g_kuiDequantCoeff[q][x & 0x07] : pCtx->pSps->iScalingList4x4[i][x] * g_kuiDequantCoeff[q][x & 0x07];
961974 }
975+ for (y = 0; y < 64; y++) {
976+ pCtx->pDequant_coeff8x8[i][q][y] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList8x8[i][y] *
977+ g_kuiDequantCoeff[q][x & 0x07] : pCtx->pSps->iScalingList8x8[i][y] * g_kuiDequantCoeff[q][x &
978+ 0x07];//pseudo-code ,holding for 8x8transform into
979+ }
962980 }
963981 }
964982
983+
965984 pCtx->bDequantCoeff4x4Init = true;
985+ pCtx->iDequantCoeffPpsid = pCtx->pPps->iPpsId;
966986 }
967987 } else
968988 pCtx->bUseScalingList = false;

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