Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 15 files). Show all
Unified · Split
| @@ -81,6 +81,7 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | iLumaSize = iPicWidth * iPicHeight; | 82 | iLumaSize = iPicWidth * iPicHeight; |
| 83 | iChromaSize = iPicChromaWidth * iPicChromaHeight; | 83 | iChromaSize = iPicChromaWidth * iPicChromaHeight; |
| 84 | |||
| 84 | pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */ | 85 | pPic->pBuffer[0] = static_cast<uint8_t*> (WelsMalloc (iLumaSize /* luma */ |
| 85 | + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]")); | 86 | + (iChromaSize << 1) /* Cb,Cr */, "_pic->buffer[0]")); |
| 86 | memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1))); | 87 | memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1))); |
| @@ -94,8 +95,6 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 7 unmodified lines | |||
| 94 | pPic->pData[1] = pPic->pBuffer[1] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[1]) * PADDING_LENGTH) >> 1); | 95 | pPic->pData[1] = pPic->pBuffer[1] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[1]) * PADDING_LENGTH) >> 1); |
| 95 | pPic->pData[2] = pPic->pBuffer[2] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[2]) * PADDING_LENGTH) >> 1); | 96 | pPic->pData[2] = pPic->pBuffer[2] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[2]) * PADDING_LENGTH) >> 1); |
| 96 | 97 | ||
| 97 | |||
| 98 | |||
| 99 | pPic->iPlanes = 3; // yv12 in default | 98 | pPic->iPlanes = 3; // yv12 in default |
| 100 | pPic->iWidthInPixel = kiPicWidth; | 99 | pPic->iWidthInPixel = kiPicWidth; |
| 101 | pPic->iHeightInPixel = kiPicHeight; | 100 | pPic->iHeightInPixel = kiPicHeight; |