Merge pull request #5074 from akallabeth/ycbcr_padding_fix

Fixed padding of general_yCbCrToRGB_16s8u_P3AC4R* functions.
This commit is contained in:
David Fort 2018-11-29 10:02:28 +01:00 committed by GitHub
commit 7478a938aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,8 +42,8 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(
const INT16* pY = pSrc[0]; const INT16* pY = pSrc[0];
const INT16* pCb = pSrc[1]; const INT16* pCb = pSrc[1];
const INT16* pCr = pSrc[2]; const INT16* pCr = pSrc[2];
int srcPad = (srcStep - (roi->width * 2)) / 2; const size_t srcPad = (srcStep - (roi->width * 2)) / 2;
int dstPad = (dstStep - (roi->width * 4)) / 4; const size_t dstPad = (dstStep - (roi->width * 4));
const DWORD formatSize = GetBytesPerPixel(DstFormat); const DWORD formatSize = GetBytesPerPixel(DstFormat);
for (y = 0; y < roi->height; y++) for (y = 0; y < roi->height; y++)
@ -85,9 +85,9 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(
const INT16* pY = pSrc[0]; const INT16* pY = pSrc[0];
const INT16* pCb = pSrc[1]; const INT16* pCb = pSrc[1];
const INT16* pCr = pSrc[2]; const INT16* pCr = pSrc[2];
int srcPad = (srcStep - (roi->width * 2)) / 2; const size_t srcPad = (srcStep - (roi->width * 2)) / 2;
int dstPad = (dstStep - (roi->width * 4)) / 4; const size_t dstPad = (dstStep - (roi->width * 4));
fkt_writePixel writePixel = getPixelWriteFunction(DstFormat); const fkt_writePixel writePixel = getPixelWriteFunction(DstFormat);
const DWORD formatSize = GetBytesPerPixel(DstFormat); const DWORD formatSize = GetBytesPerPixel(DstFormat);
for (y = 0; y < roi->height; y++) for (y = 0; y < roi->height; y++)