Showing the changes to codec/decoder/core/src/pic_queue.cpp (1 of 64 files). Show all
Unified · Split
| @@ -64,10 +64,10 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 63 unmodified lines | ||
| 64 | 64 | int32_t iPicWidth = 0; |
| 65 | 65 | int32_t iPicHeight = 0; |
| 66 | 66 | |
| 67 | − int32_t iPicChromaWidth = 0; | |
| 68 | − int32_t iPicChromaHeight = 0; | |
| 69 | − int32_t iLumaSize = 0; | |
| 70 | − int32_t iChromaSize = 0; | |
| 67 | + int32_t iPicChromaWidth = 0; | |
| 68 | + int32_t iPicChromaHeight = 0; | |
| 69 | + int32_t iLumaSize = 0; | |
| 70 | + int32_t iChromaSize = 0; | |
| 71 | 71 | |
| 72 | 72 | pPic = (PPicture) WelsMallocz (sizeof (SPicture), "PPicture"); |
| 73 | 73 | WELS_VERIFY_RETURN_IF (NULL, NULL == pPic); |
| @@ -76,11 +76,11 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 2 unmodified lines | ||
| 76 | 76 | |
| 77 | 77 | iPicWidth = WELS_ALIGN (kiPicWidth + (PADDING_LENGTH << 1), PICTURE_RESOLUTION_ALIGNMENT); |
| 78 | 78 | iPicHeight = WELS_ALIGN (kiPicHeight + (PADDING_LENGTH << 1), PICTURE_RESOLUTION_ALIGNMENT); |
| 79 | − iPicChromaWidth = iPicWidth >> 1; | |
| 80 | − iPicChromaHeight = iPicHeight >> 1; | |
| 79 | + iPicChromaWidth = iPicWidth >> 1; | |
| 80 | + iPicChromaHeight = iPicHeight >> 1; | |
| 81 | 81 | |
| 82 | − iLumaSize = iPicWidth * iPicHeight; | |
| 83 | − iChromaSize = iPicChromaWidth * iPicChromaHeight; | |
| 82 | + iLumaSize = iPicWidth * iPicHeight; | |
| 83 | + iChromaSize = iPicChromaWidth * iPicChromaHeight; | |
| 84 | 84 | |
| 85 | 85 | if (pCtx->bParseOnly) { |
| 86 | 86 | pPic->pBuffer[0] = pPic->pBuffer[1] = pPic->pBuffer[2] = NULL; |
| @@ -95,16 +95,16 @@ PPicture AllocPicture (PWelsDecoderContext pCtx, const int32_t kiPicWidth, const · 8 unmodified lines | ||
| 95 | 95 | memset (pPic->pBuffer[0], 128, (iLumaSize + (iChromaSize << 1))); |
| 96 | 96 | pPic->iLinesize[0] = iPicWidth; |
| 97 | 97 | pPic->iLinesize[1] = pPic->iLinesize[2] = iPicChromaWidth; |
| 98 | − pPic->pBuffer[1] = pPic->pBuffer[0] + iLumaSize; | |
| 99 | − pPic->pBuffer[2] = pPic->pBuffer[1] + iChromaSize; | |
| 100 | − pPic->pData[0] = pPic->pBuffer[0] + (1 + pPic->iLinesize[0]) * PADDING_LENGTH; | |
| 101 | − pPic->pData[1] = pPic->pBuffer[1] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[1]) * PADDING_LENGTH) >> 1); | |
| 102 | − pPic->pData[2] = pPic->pBuffer[2] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[2]) * PADDING_LENGTH) >> 1); | |
| 98 | + pPic->pBuffer[1] = pPic->pBuffer[0] + iLumaSize; | |
| 99 | + pPic->pBuffer[2] = pPic->pBuffer[1] + iChromaSize; | |
| 100 | + pPic->pData[0] = pPic->pBuffer[0] + (1 + pPic->iLinesize[0]) * PADDING_LENGTH; | |
| 101 | + pPic->pData[1] = pPic->pBuffer[1] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[1]) * PADDING_LENGTH) >> 1); | |
| 102 | + pPic->pData[2] = pPic->pBuffer[2] + /*WELS_ALIGN*/ (((1 + pPic->iLinesize[2]) * PADDING_LENGTH) >> 1); | |
| 103 | 103 | } |
| 104 | − pPic->iPlanes = 3; // yv12 in default | |
| 105 | − pPic->iWidthInPixel = kiPicWidth; | |
| 104 | + pPic->iPlanes = 3; // yv12 in default | |
| 105 | + pPic->iWidthInPixel = kiPicWidth; | |
| 106 | 106 | pPic->iHeightInPixel = kiPicHeight; |
| 107 | − pPic->iFrameNum = -1; | |
| 107 | + pPic->iFrameNum = -1; | |
| 108 | 108 | pPic->bAvailableFlag = true; |
| 109 | 109 | |
| 110 | 110 | return pPic; |