Align width and height for AVC444 decoding to 16.

This commit is contained in:
Armin Novak 2017-06-01 13:01:23 +02:00
parent c42ccb5087
commit 8adc2ba201

View File

@ -1711,12 +1711,14 @@ static BOOL avc444_process_rects(H264_CONTEXT* h264, const BYTE* pSrcData,
for (x = 0; x < nrRects; x++)
{
const RECTANGLE_16* rect = &rects[x];
const UINT32 alignedWidth = h264->width + ((h264->width % 16 != 0) ? 16 - h264->width % 16 : 0);
const UINT32 alignedHeight = h264->height + ((h264->height % 16 != 0) ? 16 - h264->height % 16 : 0);
if (!check_rect(h264, rect, nDstWidth, nDstHeight))
continue;
if (prims->YUV420CombineToYUV444(type, ppYUVData, piStride,
h264->width, h264->height,
alignedWidth, alignedHeight,
ppYUVDstData, piDstStride,
rect) != PRIMITIVES_SUCCESS)
return FALSE;