This function actually zero-initializes the allocated memory, thus make this clear in the function name. This makes the function name match the same behaviour in the encoder.
Showing the changes to test/decoder/DecUT_PredMv.cpp (1 of 12 files). Show all
Unified · Split
| @@ -414,22 +414,22 @@ void AnchorPredPSkipMvFromNeighbor (PDqLayer pCurLayer, int16_t iMvp[2]) { · 413 unmodified lines | ||
| 414 | 414 | |
| 415 | 415 | int32_t AllocLayerData (PDqLayer pDqLayer) { |
| 416 | 416 | |
| 417 | − pDqLayer->pSliceIdc = (int32_t*) WelsMalloc (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof (int32_t), | |
| 417 | + pDqLayer->pSliceIdc = (int32_t*) WelsMallocz (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof (int32_t), | |
| 418 | 418 | "pDqLayer->pSliceIdc"); |
| 419 | 419 | if (pDqLayer->pSliceIdc == NULL) |
| 420 | 420 | return 1; |
| 421 | 421 | |
| 422 | − pDqLayer->pMbType = (int8_t*) WelsMalloc (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof (int8_t), | |
| 422 | + pDqLayer->pMbType = (int8_t*) WelsMallocz (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof (int8_t), | |
| 423 | 423 | "pDqLayer->pMbType"); |
| 424 | 424 | if (pDqLayer->pMbType == NULL) |
| 425 | 425 | return 1; |
| 426 | 426 | |
| 427 | − pDqLayer->pMv[0] = (int16_t (*)[MB_BLOCK4x4_NUM][MV_A]) WelsMalloc (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof ( | |
| 427 | + pDqLayer->pMv[0] = (int16_t (*)[MB_BLOCK4x4_NUM][MV_A]) WelsMallocz (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof ( | |
| 428 | 428 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pDqLayer->pMv"); |
| 429 | 429 | if (pDqLayer->pMv[0] == NULL) |
| 430 | 430 | return 1; |
| 431 | 431 | |
| 432 | − pDqLayer->pRefIndex[0] = (int8_t (*)[MB_BLOCK4x4_NUM]) WelsMalloc (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof ( | |
| 432 | + pDqLayer->pRefIndex[0] = (int8_t (*)[MB_BLOCK4x4_NUM]) WelsMallocz (pDqLayer->iMbWidth * pDqLayer->iMbHeight * sizeof ( | |
| 433 | 433 | int8_t) * MB_BLOCK4x4_NUM, "pDqLayer->pRefIndex"); |
| 434 | 434 | if (pDqLayer->pRefIndex[0] == NULL) |
| 435 | 435 | return 1; |