projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0195aac
)
let freerdp_image_scale() determine step size
author
Nathan Loewen
<loewen.nathan@gmail.com>
Mon, 7 Sep 2020 02:14:17 +0000
(21:14 -0500)
committer
akallabeth
<akallabeth@users.noreply.github.com>
Thu, 25 Feb 2021 08:51:41 +0000
(09:51 +0100)
(cherry picked from commit
cba618115471a7072902aa137af5962f0e0c4c1e
)
libfreerdp/codec/color.c
patch
|
blob
|
history
diff --git
a/libfreerdp/codec/color.c
b/libfreerdp/codec/color.c
index
6c29552
..
a0fce37
100644
(file)
--- a/
libfreerdp/codec/color.c
+++ b/
libfreerdp/codec/color.c
@@
-777,6
+777,13
@@
BOOL freerdp_image_scale(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT3
UINT32 nSrcWidth, UINT32 nSrcHeight)
{
BOOL rc = FALSE;
+
+ if (nDstStep == 0)
+ nDstStep = nDstWidth * GetBytesPerPixel(DstFormat);
+
+ if (nSrcStep == 0)
+ nSrcStep = nSrcWidth * GetBytesPerPixel(SrcFormat);
+
#if defined(SWSCALE_FOUND) || defined(CAIRO_FOUND)
const BYTE* src = &pSrcData[nXSrc * GetBytesPerPixel(SrcFormat) + nYSrc * nSrcStep];
BYTE* dst = &pDstData[nXDst * GetBytesPerPixel(DstFormat) + nYDst * nDstStep];