Fixed destination buffer offset in planar_decompress

This commit is contained in:
Armin Novak 2021-03-17 09:37:10 +01:00 committed by akallabeth
parent 1407925aba
commit 67dbb7907a

View File

@ -834,6 +834,7 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar, const BYTE* pSrcData, UINT
BYTE* pTempData = planar->pTempData;
UINT32 nTempStep = planar->nTempStep;
UINT32 nTotalHeight = planar->maxHeight;
BYTE* dst = &pDstData[nXDst * GetBytesPerPixel(DstFormat) + nYDst * nDstStep];
if (useAlpha)
TempFormat = PIXEL_FORMAT_BGRA32;
@ -928,8 +929,8 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar, const BYTE* pSrcData, UINT
srcp++; /* pad */
}
if (prims->YCoCgToRGB_8u_AC4R(pTempData, nTempStep, pDstData, DstFormat, nDstStep, w, h,
cll, useAlpha) != PRIMITIVES_SUCCESS)
if (prims->YCoCgToRGB_8u_AC4R(pTempData, nTempStep, dst, DstFormat, nDstStep, w, h, cll,
useAlpha) != PRIMITIVES_SUCCESS)
return FALSE;
}