Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 6 files). Show all
Unified · Split
| @@ -113,7 +113,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 112 unmodified lines | ||
| 113 | 113 | uint32_t uiMbCount = uiMbWidth * uiMbHeight; |
| 114 | 114 | |
| 115 | 115 | pPic->pMbCorrectlyDecodedFlag = (bool*)pMa->WelsMallocz (uiMbCount * sizeof (bool), "pPic->pMbCorrectlyDecodedFlag"); |
| 116 | − | |
| 116 | + pPic->pNzc = GetThreadCount (pCtx) > 1 ? (int8_t (*)[24])pMa->WelsMallocz (uiMbCount * 24, "pPic->pNzc") : NULL; | |
| 117 | 117 | pPic->pMbType = (uint32_t*)pMa->WelsMallocz (uiMbCount * sizeof (uint32_t), "pPic->pMbType"); |
| 118 | 118 | pPic->pMv[LIST_0] = (int16_t (*)[16][2])pMa->WelsMallocz (uiMbCount * sizeof ( |
| 119 | 119 | int16_t) * MV_A * MB_BLOCK4x4_NUM, "pPic->pMv[]"); |
| @@ -147,6 +147,11 @@ void FreePicture (PPicture pPic, CMemoryAlign* pMa) { · 27 unmodified lines | ||
| 147 | 147 | pPic->pMbCorrectlyDecodedFlag = NULL; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | + if (pPic->pNzc) { | |
| 151 | + pMa->WelsFree (pPic->pNzc, "pPic->pNzc"); | |
| 152 | + pPic->pNzc = NULL; | |
| 153 | + } | |
| 154 | + | |
| 150 | 155 | if (pPic->pMbType) { |
| 151 | 156 | pMa->WelsFree (pPic->pMbType, "pPic->pMbType"); |
| 152 | 157 | pPic->pMbType = NULL; |