From 98bc4358e0128727cddcf5bc3f79e539245275c4 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 28 Nov 2018 11:05:45 +0100 Subject: [PATCH] Fixed padding of general_yCbCrToRGB_16s8u_P3AC4R* functions. --- libfreerdp/primitives/prim_colors.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libfreerdp/primitives/prim_colors.c b/libfreerdp/primitives/prim_colors.c index 602204a..1bfb558 100644 --- a/libfreerdp/primitives/prim_colors.c +++ b/libfreerdp/primitives/prim_colors.c @@ -42,8 +42,8 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX( const INT16* pY = pSrc[0]; const INT16* pCb = pSrc[1]; const INT16* pCr = pSrc[2]; - int srcPad = (srcStep - (roi->width * 2)) / 2; - int dstPad = (dstStep - (roi->width * 4)) / 4; + const size_t srcPad = (srcStep - (roi->width * 2)) / 2; + const size_t dstPad = (dstStep - (roi->width * 4)); const DWORD formatSize = GetBytesPerPixel(DstFormat); 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* pCb = pSrc[1]; const INT16* pCr = pSrc[2]; - int srcPad = (srcStep - (roi->width * 2)) / 2; - int dstPad = (dstStep - (roi->width * 4)) / 4; - fkt_writePixel writePixel = getPixelWriteFunction(DstFormat); + const size_t srcPad = (srcStep - (roi->width * 2)) / 2; + const size_t dstPad = (dstStep - (roi->width * 4)); + const fkt_writePixel writePixel = getPixelWriteFunction(DstFormat); const DWORD formatSize = GetBytesPerPixel(DstFormat); for (y = 0; y < roi->height; y++) -- 2.7.4