aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/scaler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/scaler.cpp b/common/scaler.cpp
index fd47ee33a7..d78a52de3b 100644
--- a/common/scaler.cpp
+++ b/common/scaler.cpp
@@ -638,7 +638,7 @@ void DotMatrix(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPi
}
-static inline uint32 interpolate5(uint16 A, uint16 B, int scale) {
+static inline uint16 interpolate5(uint16 A, uint16 B, int scale) {
uint16 r = (uint16)(((A & redMask) * scale + (B & redMask) * (5 - scale)) / 5);
uint16 g = (uint16)(((A & greenMask) * scale + (B & greenMask) * (5 - scale)) / 5);
uint16 b = (uint16)(((A & blueMask) * scale + (B & blueMask) * (5 - scale)) / 5);
@@ -650,7 +650,7 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
#if 1
// Accurate but slightly slower code
while (width--) {
- *dst++ = (uint16)interpolate5(*srcA++, *srcB++, scale);
+ *dst++ = interpolate5(*srcA++, *srcB++, scale);
}
#else
// Not fully accurate, but a bit faster