Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 4 files). Show all
Unified · Split
| @@ -111,8 +111,8 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 110 unmodified lines | |||
| 111 | uint32_t uiMbWidth = (kiPicWidth + 15) >> 4; | 111 | uint32_t uiMbWidth = (kiPicWidth + 15) >> 4; |
| 112 | uint32_t uiMbHeight = (kiPicHeight + 15) >> 4; | 112 | uint32_t uiMbHeight = (kiPicHeight + 15) >> 4; |
| 113 | uint32_t uiMbCount = uiMbWidth * uiMbHeight; | 113 | uint32_t uiMbCount = uiMbWidth * uiMbHeight; |
| 114 | pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), | 114 | pPic->pMbCorrectlyDecodedFlag = (bool*)pMa->WelsMallocz (uiMbCount * sizeof (bool), "pPic->pMbCorrectlyDecodedFlag"); |
| 115 | "pPic->pMbType"); | 115 | pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), "pPic->pMbType"); |
| 116 | pPic->pMv[LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( | 116 | pPic->pMv[LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( |
| 117 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]"); | 117 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]"); |
| 118 | pPic->pMv[LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( | 118 | pPic->pMv[LIST_1] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( |
| @@ -140,6 +140,11 @@ void FreePicture (PPicture pPic, CMemoryAlign* pMa) { · 21 unmodified lines | |||
| 140 | pPic->pBuffer[0] = NULL; | 140 | pPic->pBuffer[0] = NULL; |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | if (pPic->pMbCorrectlyDecodedFlag) { | ||
| 144 | pMa->WelsFree (pPic->pMbCorrectlyDecodedFlag, "pPic->pMbCorrectlyDecodedFlag"); | ||
| 145 | pPic->pMbCorrectlyDecodedFlag = NULL; | ||
| 146 | } | ||
| 147 | |||
| 143 | if (pPic->pMbType) { | 148 | if (pPic->pMbType) { |
| 144 | pMa->WelsFree (pPic->pMbType, "pPic->pMbType"); | 149 | pMa->WelsFree (pPic->pMbType, "pPic->pMbType"); |
| 145 | pPic->pMbType = NULL; | 150 | pPic->pMbType = NULL; |