aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorCameron Cawley2019-12-16 23:07:15 +0000
committerFilippos Karapetis2019-12-17 01:18:11 +0200
commit6f62481548b22faf4784bb2a646e2089bc624eea (patch)
tree8e3e9d8bfa175669711b5bf89ecc20b9e69c68ae /graphics
parentde096f56a524ce32b598c6b5902252c62ddc8f9b (diff)
downloadscummvm-rg350-6f62481548b22faf4784bb2a646e2089bc624eea.tar.gz
scummvm-rg350-6f62481548b22faf4784bb2a646e2089bc624eea.tar.bz2
scummvm-rg350-6f62481548b22faf4784bb2a646e2089bc624eea.zip
GRAPHICS: Remove more unused scalers
Diffstat (limited to 'graphics')
-rw-r--r--graphics/scaler.cpp46
-rw-r--r--graphics/scaler.h1
2 files changed, 0 insertions, 47 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index a3ac7fc107..e084fd9473 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -253,52 +253,6 @@ void Normal3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
}
}
-#define interpolate_1_1 interpolate16_1_1<ColorMask>
-#define interpolate_1_1_1_1 interpolate16_1_1_1_1<ColorMask>
-
-/**
- * Trivial nearest-neighbor 1.5x scaler.
- */
-template<typename ColorMask>
-void Normal1o5xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
- int width, int height) {
- uint8 *r;
- const uint32 dstPitch2 = dstPitch * 2;
- const uint32 dstPitch3 = dstPitch * 3;
- const uint32 srcPitch2 = srcPitch * 2;
-
- assert(IS_ALIGNED(dstPtr, 2));
- while (height > 0) {
- r = dstPtr;
- for (int i = 0; i < width; i += 2, r += 6) {
- uint16 color0 = *(((const uint16 *)srcPtr) + i);
- uint16 color1 = *(((const uint16 *)srcPtr) + i + 1);
- uint16 color2 = *(((const uint16 *)(srcPtr + srcPitch)) + i);
- uint16 color3 = *(((const uint16 *)(srcPtr + srcPitch)) + i + 1);
-
- *(uint16 *)(r + 0) = color0;
- *(uint16 *)(r + 2) = interpolate_1_1(color0, color1);
- *(uint16 *)(r + 4) = color1;
- *(uint16 *)(r + 0 + dstPitch) = interpolate_1_1(color0, color2);
- *(uint16 *)(r + 2 + dstPitch) = interpolate_1_1_1_1(color0, color1, color2, color3);
- *(uint16 *)(r + 4 + dstPitch) = interpolate_1_1(color1, color3);
- *(uint16 *)(r + 0 + dstPitch2) = color2;
- *(uint16 *)(r + 2 + dstPitch2) = interpolate_1_1(color2, color3);
- *(uint16 *)(r + 4 + dstPitch2) = color3;
- }
- srcPtr += srcPitch2;
- dstPtr += dstPitch3;
- height -= 2;
- }
-}
-
-void Normal1o5x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- if (gBitFormat == 565)
- Normal1o5xTemplate<Graphics::ColorMasks<565> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
- else
- Normal1o5xTemplate<Graphics::ColorMasks<555> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
-}
-
/**
* The Scale2x filter, also known as AdvMame2x.
* See also http://scale2x.sourceforge.net
diff --git a/graphics/scaler.h b/graphics/scaler.h
index cf9a98a240..7309403eea 100644
--- a/graphics/scaler.h
+++ b/graphics/scaler.h
@@ -43,7 +43,6 @@ DECLARE_SCALER(Normal1x);
DECLARE_SCALER(Normal2x);
DECLARE_SCALER(Normal3x);
-DECLARE_SCALER(Normal1o5x);
DECLARE_SCALER(_2xSaI);
DECLARE_SCALER(Super2xSaI);