Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 25 files). Show all
Unified · Split
| @@ -1238,11 +1238,16 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 1237 unmodified lines | |||
| 1238 | int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[][]"); | 1238 | int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pRefIndex[][]"); |
| 1239 | pCtx->sMb.pLumaQp[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), | 1239 | pCtx->sMb.pLumaQp[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), |
| 1240 | "pCtx->sMb.pLumaQp[]"); | 1240 | "pCtx->sMb.pLumaQp[]"); |
| 1241 | pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i] = (bool*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof ( | ||
| 1242 | bool), | ||
| 1243 | "pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[]"); | ||
| 1244 | pCtx->sMb.pTransformSize8x8Flag[i] = (bool*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (bool), | ||
| 1245 | "pCtx->sMb.pTransformSize8x8Flag[]"); | ||
| 1241 | pCtx->sMb.pChromaQp[i] = (int8_t (*)[2])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 2, | 1246 | pCtx->sMb.pChromaQp[i] = (int8_t (*)[2])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 2, |
| 1242 | "pCtx->sMb.pChromaQp[]"); | 1247 | "pCtx->sMb.pChromaQp[]"); |
| 1243 | pCtx->sMb.pMvd[i][0] = (int16_t (*)[16][2])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof ( | 1248 | pCtx->sMb.pMvd[i][0] = (int16_t (*)[16][2])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof ( |
| 1244 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMvd[][]"); | 1249 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pCtx->sMb.pMvd[][]"); |
| 1245 | pCtx->sMb.pCbfDc[i] = (uint8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (uint8_t), | 1250 | pCtx->sMb.pCbfDc[i] = (uint16_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (uint16_t), |
| 1246 | "pCtx->sMb.pCbfDc[]"); | 1251 | "pCtx->sMb.pCbfDc[]"); |
| 1247 | pCtx->sMb.pNzc[i] = (int8_t (*)[24])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 24, | 1252 | pCtx->sMb.pNzc[i] = (int8_t (*)[24])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * 24, |
| 1248 | "pCtx->sMb.pNzc[]"); | 1253 | "pCtx->sMb.pNzc[]"); |
| @@ -1255,6 +1260,8 @@ int32_t InitialDqLayersContext (PWelsDecoderContext pCtx, const int32_t kiMaxWid · 6 unmodified lines | |||
| 1255 | "pCtx->sMb.pIntraPredMode[]"); | 1260 | "pCtx->sMb.pIntraPredMode[]"); |
| 1256 | pCtx->sMb.pIntra4x4FinalMode[i] = (int8_t (*)[MB_BLOCK4x4_NUM])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * | 1261 | pCtx->sMb.pIntra4x4FinalMode[i] = (int8_t (*)[MB_BLOCK4x4_NUM])WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * |
| 1257 | sizeof (int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pIntra4x4FinalMode[]"); | 1262 | sizeof (int8_t) * MB_BLOCK4x4_NUM, "pCtx->sMb.pIntra4x4FinalMode[]"); |
| 1263 | pCtx->sMb.pIntraNxNAvailFlag[i] = (uint8_t (*))WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), | ||
| 1264 | "pCtx->sMb.pIntraNxNAvailFlag"); | ||
| 1258 | pCtx->sMb.pChromaPredMode[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), | 1265 | pCtx->sMb.pChromaPredMode[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), |
| 1259 | "pCtx->sMb.pChromaPredMode[]"); | 1266 | "pCtx->sMb.pChromaPredMode[]"); |
| 1260 | pCtx->sMb.pCbp[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), | 1267 | pCtx->sMb.pCbp[i] = (int8_t*)WelsMallocz (pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t), |
| @@ -1341,6 +1348,18 @@ void UninitialDqLayersContext (PWelsDecoderContext pCtx) { · 80 unmodified lines | |||
| 1341 | pCtx->sMb.pRefIndex[i][0] = NULL; | 1348 | pCtx->sMb.pRefIndex[i][0] = NULL; |
| 1342 | } | 1349 | } |
| 1343 | 1350 | ||
| 1351 | if (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i]) { | ||
| 1352 | WelsFree (pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i], "pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[]"); | ||
| 1353 | |||
| 1354 | pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[i] = NULL; | ||
| 1355 | } | ||
| 1356 | |||
| 1357 | if (pCtx->sMb.pTransformSize8x8Flag[i]) { | ||
| 1358 | WelsFree (pCtx->sMb.pTransformSize8x8Flag[i], "pCtx->sMb.pTransformSize8x8Flag[]"); | ||
| 1359 | |||
| 1360 | pCtx->sMb.pTransformSize8x8Flag[i] = NULL; | ||
| 1361 | } | ||
| 1362 | |||
| 1344 | if (pCtx->sMb.pLumaQp[i]) { | 1363 | if (pCtx->sMb.pLumaQp[i]) { |
| 1345 | WelsFree (pCtx->sMb.pLumaQp[i], "pCtx->sMb.pLumaQp[]"); | 1364 | WelsFree (pCtx->sMb.pLumaQp[i], "pCtx->sMb.pLumaQp[]"); |
| 1346 | 1365 | ||
| @@ -1393,6 +1412,12 @@ void UninitialDqLayersContext (PWelsDecoderContext pCtx) { · 46 unmodified lines | |||
| 1393 | pCtx->sMb.pIntra4x4FinalMode[i] = NULL; | 1412 | pCtx->sMb.pIntra4x4FinalMode[i] = NULL; |
| 1394 | } | 1413 | } |
| 1395 | 1414 | ||
| 1415 | if (pCtx->sMb.pIntraNxNAvailFlag[i]) { | ||
| 1416 | WelsFree (pCtx->sMb.pIntraNxNAvailFlag[i], "pCtx->sMb.pIntraNxNAvailFlag"); | ||
| 1417 | |||
| 1418 | pCtx->sMb.pIntraNxNAvailFlag[i] = NULL; | ||
| 1419 | } | ||
| 1420 | |||
| 1396 | if (pCtx->sMb.pChromaPredMode[i]) { | 1421 | if (pCtx->sMb.pChromaPredMode[i]) { |
| 1397 | WelsFree (pCtx->sMb.pChromaPredMode[i], "pCtx->sMb.pChromaPredMode[]"); | 1422 | WelsFree (pCtx->sMb.pChromaPredMode[i], "pCtx->sMb.pChromaPredMode[]"); |
| 1398 | 1423 | ||
| @@ -1989,7 +2014,7 @@ static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PN · 590 unmodified lines | |||
| 1989 | if (kuiQualityId == BASE_QUALITY_ID) { | 2014 | if (kuiQualityId == BASE_QUALITY_ID) { |
| 1990 | pDqLayer->pRefPicListReordering = &pSh->pRefPicListReordering; | 2015 | pDqLayer->pRefPicListReordering = &pSh->pRefPicListReordering; |
| 1991 | pDqLayer->pRefPicMarking = &pSh->sRefMarking; | 2016 | pDqLayer->pRefPicMarking = &pSh->sRefMarking; |
| 1992 | 2017 | ||
| 1993 | if (pSh->pPps->bWeightedPredFlag) { | 2018 | if (pSh->pPps->bWeightedPredFlag) { |
| 1994 | pDqLayer->bUseWeightPredictionFlag = true; | 2019 | pDqLayer->bUseWeightPredictionFlag = true; |
| 1995 | pDqLayer->pPredWeightTable = &pSh->sPredWeightTable; | 2020 | pDqLayer->pPredWeightTable = &pSh->sPredWeightTable; |
| @@ -2029,6 +2054,8 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 33 unmodified lines | |||
| 2029 | pCurDq->pSliceIdc = pCtx->sMb.pSliceIdc[0]; | 2054 | pCurDq->pSliceIdc = pCtx->sMb.pSliceIdc[0]; |
| 2030 | pCurDq->pMv[0] = pCtx->sMb.pMv[0][0]; | 2055 | pCurDq->pMv[0] = pCtx->sMb.pMv[0][0]; |
| 2031 | pCurDq->pRefIndex[0] = pCtx->sMb.pRefIndex[0][0]; | 2056 | pCurDq->pRefIndex[0] = pCtx->sMb.pRefIndex[0][0]; |
| 2057 | pCurDq->pNoSubMbPartSizeLessThan8x8Flag = pCtx->sMb.pNoSubMbPartSizeLessThan8x8Flag[0]; | ||
| 2058 | pCurDq->pTransformSize8x8Flag = pCtx->sMb.pTransformSize8x8Flag[0]; | ||
| 2032 | pCurDq->pLumaQp = pCtx->sMb.pLumaQp[0]; | 2059 | pCurDq->pLumaQp = pCtx->sMb.pLumaQp[0]; |
| 2033 | pCurDq->pChromaQp = pCtx->sMb.pChromaQp[0]; | 2060 | pCurDq->pChromaQp = pCtx->sMb.pChromaQp[0]; |
| 2034 | pCurDq->pMvd[0] = pCtx->sMb.pMvd[0][0]; | 2061 | pCurDq->pMvd[0] = pCtx->sMb.pMvd[0][0]; |
| @@ -2038,6 +2065,7 @@ void InitCurDqLayerData (PWelsDecoderContext pCtx, PDqLayer pCurDq) { · 3 unmodified lines | |||
| 2038 | pCurDq->pScaledTCoeff = pCtx->sMb.pScaledTCoeff[0]; | 2065 | pCurDq->pScaledTCoeff = pCtx->sMb.pScaledTCoeff[0]; |
| 2039 | pCurDq->pIntraPredMode = pCtx->sMb.pIntraPredMode[0]; | 2066 | pCurDq->pIntraPredMode = pCtx->sMb.pIntraPredMode[0]; |
| 2040 | pCurDq->pIntra4x4FinalMode = pCtx->sMb.pIntra4x4FinalMode[0]; | 2067 | pCurDq->pIntra4x4FinalMode = pCtx->sMb.pIntra4x4FinalMode[0]; |
| 2068 | pCurDq->pIntraNxNAvailFlag = pCtx->sMb.pIntraNxNAvailFlag[0]; | ||
| 2041 | pCurDq->pChromaPredMode = pCtx->sMb.pChromaPredMode[0]; | 2069 | pCurDq->pChromaPredMode = pCtx->sMb.pChromaPredMode[0]; |
| 2042 | pCurDq->pCbp = pCtx->sMb.pCbp[0]; | 2070 | pCurDq->pCbp = pCtx->sMb.pCbp[0]; |
| 2043 | pCurDq->pSubMbType = pCtx->sMb.pSubMbType[0]; | 2071 | pCurDq->pSubMbType = pCtx->sMb.pSubMbType[0]; |