From 0824452869f53f2391f40fe5ca91a5c659b928f0 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Wed, 22 Sep 2021 13:22:27 +0300 Subject: [PATCH] Copy-paste bug in SSE2 scaling to under 0.5x --- common/rfb/EncodeManager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index 30489c7..9a079bc 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -1024,7 +1024,7 @@ PixelBuffer *rfb::progressiveBilinearScale(const PixelBuffer *pb, rdr::U8 *newpx = ((ManagedPixelBuffer *) newpb)->getBufferRW(newpb->getRect(), &newstride); - SSE2_scale(oldpx, tgtw, tgth, newpx, oldstride, newstride, tgtdiff); + SSE2_scale(oldpx, tgtw, tgth, newpx, oldstride, newstride, tgtw / (float) oldw); if (del) delete pb; }