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
936 pCtx->bUseScalingList = true;936 pCtx->bUseScalingList = true;
937 937
938 if (!pCtx->bDequantCoeff4x4Init || (pCtx->iDequantCoeffPpsid != pCtx->pPps->iPpsId)) {938 if (!pCtx->bDequantCoeff4x4Init || (pCtx->iDequantCoeffPpsid != pCtx->pPps->iPpsId)) {
939 int i, q, x;939 int i, q, x, y;
940 // Rewrite pps scaling list for scalingList present flag=0940 // Rewrite pps scaling list for scalingList present flag=0
941 if (pCtx->bSpsLatePps) {941 if (pCtx->bSpsLatePps) {
942 for (i = 0; i < 6; i++) {942 for (i = 0; i < 12; i++) {
943 if (!pCtx->pSps->bSeqScalingListPresentFlag[i]) {943 //if (!pCtx->pSps->bSeqScalingListPresentFlag[i]) {
944 if (i == 0 || i == 3)944 if (!pCtx->pPps->bPicScalingListPresentFlag[i]) {
945 memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pSps->iScalingList4x4[i], 16 * sizeof (uint8_t));945 if (i < 6) {
946 else946
947 memcpy (pCtx->pPps->iScalingList4x4[i], pCtx->pPps->iScalingList4x4[i - 1], 16 * sizeof (uint8_t));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 }
948 961
949 }962 }
950 }963 }
951 //TO DO, SUPPORT 8x8 SCALINGlist964
952 965
953 }966 }
954 //Init dequant coeff value for different QP967 //Init dequant coeff value for different QP
@@ -959,10 +972,17 @@ int32_t WelsCalcDeqCoeffScalingList (PWelsDecoderContext pCtx) { · 4 unmodified lines
959 pCtx->pDequant_coeff4x4[i][q][x] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList4x4[i][x] *972 pCtx->pDequant_coeff4x4[i][q][x] = pCtx->pPps->bPicScalingMatrixPresentFlag ? pCtx->pPps->iScalingList4x4[i][x] *
960 g_kuiDequantCoeff[q][x & 0x07] : pCtx->pSps->iScalingList4x4[i][x] * g_kuiDequantCoeff[q][x & 0x07];973 g_kuiDequantCoeff[q][x & 0x07] : pCtx->pSps->iScalingList4x4[i][x] * g_kuiDequantCoeff[q][x & 0x07];
961 }974 }
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 }
962 }980 }
963 }981 }
964 982
983
965 pCtx->bDequantCoeff4x4Init = true;984 pCtx->bDequantCoeff4x4Init = true;
985 pCtx->iDequantCoeffPpsid = pCtx->pPps->iPpsId;
966 }986 }
967 } else987 } else
968 pCtx->bUseScalingList = false;988 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