aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler/aspect.cpp
diff options
context:
space:
mode:
authorMax Horn2006-04-17 18:17:02 +0000
committerMax Horn2006-04-17 18:17:02 +0000
commitb47e531425a00cd29e81d4ad98b3be2fd6f4189b (patch)
tree786ce1004f15840ace3de92f9db25cc6c0d729a7 /graphics/scaler/aspect.cpp
parentbdd5a25c16096604fa3001900699e2e8cec9cced (diff)
downloadscummvm-rg350-b47e531425a00cd29e81d4ad98b3be2fd6f4189b.tar.gz
scummvm-rg350-b47e531425a00cd29e81d4ad98b3be2fd6f4189b.tar.bz2
scummvm-rg350-b47e531425a00cd29e81d4ad98b3be2fd6f4189b.zip
Renamed and merge some of the pixel interpolation functions (the names still could be better)
svn-id: r21981
Diffstat (limited to 'graphics/scaler/aspect.cpp')
-rw-r--r--graphics/scaler/aspect.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp
index 45939b922d..575a117295 100644
--- a/graphics/scaler/aspect.cpp
+++ b/graphics/scaler/aspect.cpp
@@ -55,20 +55,6 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
#if ASPECT_MODE == kFastAndNiceAspectMode
-template<int bitFormat>
-static inline uint32 INTERPOLATE_1_1(uint32 A, uint32 B) {
- return (((A & highBits) >> 1) + ((B & highBits) >> 1) + (A & B & lowBits));
-}
-
-template<int bitFormat>
-static inline uint32 INTERPOLATE_1_3(uint32 A, uint32 B) {
- register uint32 x = ((A & qhighBits) >> 2) + ((B & qhighBits) >> 2) * 3;
- register uint32 y = ((A & qlowBits) + (B & qlowBits) * 3) >> 2;
-
- y &= qlowBits;
- return x + y;
-}
-
template<int bitFormat, int scale>
static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint16 *srcB, int width) {
// For efficiency reasons we blit two pixels at a time, so it is important
@@ -90,11 +76,11 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
uint32 *d = (uint32 *)dst;
if (scale == 1) {
while (width--) {
- *d++ = INTERPOLATE_1_3<bitFormat>(*sA++, *sB++);
+ *d++ = interpolate32_3_1<bitFormat>(*sB++, *sA++);
}
} else {
while (width--) {
- *d++ = INTERPOLATE_1_1<bitFormat>(*sA++, *sB++);
+ *d++ = interpolate32_1_1<bitFormat>(*sB++, *sA++);
}
}
}