Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 32 files). Show all
Unified · Split
| @@ -707,8 +707,11 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 706 unmodified lines | ||
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | if (pPps->bEntropyCodingModeFlag) { |
| 710 | − WelsLog (pLogCtx, WELS_LOG_WARNING, "ParseSliceHeaderSyntaxs(): CABAC in Enhancement layer not supported."); | |
| 711 | − return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_UNSUPPORTED_CABAC_EL); | |
| 710 | + if (pSliceHead->eSliceType != I_SLICE && pSliceHead->eSliceType != SI_SLICE) { | |
| 711 | + WELS_READ_VERIFY (BsGetUe (pBs, &uiCode)); | |
| 712 | + pSliceHead->iCabacInitIdc = uiCode; | |
| 713 | + } else | |
| 714 | + pSliceHead->iCabacInitIdc = 0; | |
| 712 | 715 | } |
| 713 | 716 | |
| 714 | 717 | WELS_READ_VERIFY (BsGetSe (pBs, &iCode)); //slice_qp_delta |
| @@ -1021,6 +1024,10 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 306 unmodified lines | ||
| 1021 | 1024 | "pCtx->sMb.pLumaQp[]"); |
| 1022 | 1025 | pCtx->sMb.pChromaQp[i] = (int8_t*)WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), |
| 1023 | 1026 | "pCtx->sMb.pChromaQp[]"); |
| 1027 | + pCtx->sMb.pMvd[i][0] = (int16_t (*)[16][2])WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof ( | |
| 1028 | + int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMvd[][]"); | |
| 1029 | + pCtx->sMb.pCbfDc[i] = (uint8_t*)WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (uint8_t), | |
| 1030 | + "pCtx->sMb.pCbfDc[]"); | |
| 1024 | 1031 | pCtx->sMb.pNzc[i] = (int8_t (*)[24])WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 24, |
| 1025 | 1032 | "pCtx->sMb.pNzc[]"); |
| 1026 | 1033 | pCtx->sMb.pNzcRs[i] = (int8_t (*)[24])WelsMalloc (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 24, |
| @@ -1057,6 +1064,8 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 30 unmodified lines | ||
| 1057 | 1064 | (NULL == pCtx->sMb.pRefIndex[i][0]) || |
| 1058 | 1065 | (NULL == pCtx->sMb.pLumaQp[i]) || |
| 1059 | 1066 | (NULL == pCtx->sMb.pChromaQp[i]) || |
| 1067 | + (NULL == pCtx->sMb.pMvd[i][0]) || | |
| 1068 | + (NULL == pCtx->sMb.pCbfDc[i]) || | |
| 1060 | 1069 | (NULL == pCtx->sMb.pNzc[i]) || |
| 1061 | 1070 | (NULL == pCtx->sMb.pNzcRs[i]) || |
| 1062 | 1071 | (NULL == pCtx->sMb.pScaledTCoeff[i]) || |
| @@ -1076,7 +1085,6 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 13 unmodified lines | ||
| 1076 | 1085 | ++ i; |
| 1077 | 1086 | } while (i < LAYER_NUM_EXCHANGEABLE); |
| 1078 | 1087 | |
| 1079 | − | |
| 1080 | 1088 | pCtx->bInitialDqLayersMem = true; |
| 1081 | 1089 | pCtx->iPicWidthReq = kiMaxWidth; |
| 1082 | 1090 | pCtx->iPicHeightReq = kiMaxHeight; |
| @@ -1124,6 +1132,16 @@ void UninitialDqLayersContext (PWelsDecoderContext pCtx) { · 41 unmodified lines | ||
| 1124 | 1132 | pCtx->sMb.pChromaQp[i] = NULL; |
| 1125 | 1133 | } |
| 1126 | 1134 | |
| 1135 | + if (pCtx->sMb.pMvd[i][0]) { | |
| 1136 | + WelsFree (pCtx->sMb.pMvd[i][0], "pCtx->sMb.pMvd[][]"); | |
| 1137 | + pCtx->sMb.pMvd[i][0] = NULL; | |
| 1138 | + } | |
| 1139 | + | |
| 1140 | + if (pCtx->sMb.pCbfDc[i]) { | |
| 1141 | + WelsFree (pCtx->sMb.pCbfDc[i], "pCtx->sMb.pCbfDc[]"); | |
| 1142 | + pCtx->sMb.pCbfDc[i] = NULL; | |
| 1143 | + } | |
| 1144 | + | |
| 1127 | 1145 | if (pCtx->sMb.pNzc[i]) { |
| 1128 | 1146 | WelsFree (pCtx->sMb.pNzc[i], "pCtx->sMb.pNzc[]"); |
| 1129 | 1147 | |
| @@ -1754,6 +1772,8 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 624 unmodified lines | ||
| 1754 | 1772 | pCurDq->pRefIndex[0] = pCtx->sMb.pRefIndex[0][0]; |
| 1755 | 1773 | pCurDq->pLumaQp = pCtx->sMb.pLumaQp[0]; |
| 1756 | 1774 | pCurDq->pChromaQp = pCtx->sMb.pChromaQp[0]; |
| 1775 | + pCurDq->pMvd[0] = pCtx->sMb.pMvd[0][0]; | |
| 1776 | + pCurDq->pCbfDc = pCtx->sMb.pCbfDc[0]; | |
| 1757 | 1777 | pCurDq->pNzc = pCtx->sMb.pNzc[0]; |
| 1758 | 1778 | pCurDq->pNzcRs = pCtx->sMb.pNzcRs[0]; |
| 1759 | 1779 | pCurDq->pScaledTCoeff = pCtx->sMb.pScaledTCoeff[0]; |