aboutsummaryrefslogtreecommitdiff
path: root/graphics/scaler/aspect.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-13 13:12:23 -0400
committerMatthew Hoops2011-06-13 13:12:23 -0400
commitd355475a0416897ed254fa85f4d63d0f75d9c7ea (patch)
tree184892480ebb704b28163c51999e50c414e85f8a /graphics/scaler/aspect.cpp
parent224c71e483e09931ba386555ff3b436b9defe63d (diff)
parentbfa26ffc44f80e4eb3d8590f5f865cda6a5188b7 (diff)
downloadscummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.gz
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.tar.bz2
scummvm-rg350-d355475a0416897ed254fa85f4d63d0f75d9c7ea.zip
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'graphics/scaler/aspect.cpp')
-rw-r--r--graphics/scaler/aspect.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp
index 64a1cd1534..943395aff3 100644
--- a/graphics/scaler/aspect.cpp
+++ b/graphics/scaler/aspect.cpp
@@ -57,19 +57,6 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
template<typename ColorMask, 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
- // that makeRectStretchable() guarantees that the width is even and that
- // the rect starts on a well-aligned address. (Even where unaligned memory
- // access is allowed there may be a speed penalty for it.)
-
- // These asserts are disabled for maximal speed; but I leave them in here
- // in case other people want to test if the memory alignment (to an
- // address divisible by 4) is really working properly.
- //assert(((int)dst & 3) == 0);
- //assert(((int)srcA & 3) == 0);
- //assert(((int)srcB & 3) == 0);
- //assert((width & 1) == 0);
-
if (scale == 1) {
while (width--) {
*dst++ = interpolate16_7_1<ColorMask>(*srcB++, *srcA++);
@@ -86,6 +73,18 @@ static inline void interpolate5Line(uint16 *dst, const uint16 *srcA, const uint1
template<typename ColorMask, 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
+ // that makeRectStretchable() guarantees that the width is even and that
+ // the rect starts on a well-aligned address. (Even where unaligned memory
+ // access is allowed there may be a speed penalty for it.)
+
+ // These asserts are disabled for maximal speed; but I leave them in here
+ // in case other people want to test if the memory alignment (to an
+ // address divisible by 4) is really working properly.
+ //assert(((int)dst & 3) == 0);
+ //assert(((int)srcA & 3) == 0);
+ //assert(((int)srcB & 3) == 0);
+ //assert((width & 1) == 0);
width /= 2;
const uint32 *sA = (const uint32 *)srcA;