diff options
author | Cameron Cawley | 2019-12-16 19:21:22 +0000 |
---|---|---|
committer | Filippos Karapetis | 2019-12-17 01:18:11 +0200 |
commit | de096f56a524ce32b598c6b5902252c62ddc8f9b (patch) | |
tree | 31fe865e3ba60ba9e7f5f0ddace4206bf75c7691 /graphics/scaler/aspect.cpp | |
parent | 7d13c60a8bb7a1d71d2eb86b6530749a791d4792 (diff) | |
download | scummvm-rg350-de096f56a524ce32b598c6b5902252c62ddc8f9b.tar.gz scummvm-rg350-de096f56a524ce32b598c6b5902252c62ddc8f9b.tar.bz2 scummvm-rg350-de096f56a524ce32b598c6b5902252c62ddc8f9b.zip |
GRAPHICS: Remove unused scaler code
Diffstat (limited to 'graphics/scaler/aspect.cpp')
-rw-r--r-- | graphics/scaler/aspect.cpp | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/graphics/scaler/aspect.cpp b/graphics/scaler/aspect.cpp index 0f2b2aed40..dae1d41079 100644 --- a/graphics/scaler/aspect.cpp +++ b/graphics/scaler/aspect.cpp @@ -279,100 +279,3 @@ int stretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, i } #endif } - -template<typename ColorMask> -void Normal1xAspectTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - - for (int y = 0; y < (height * 6 / 5); ++y) { - -#if ASPECT_MODE == kSuperFastAndUglyAspectMode - if ((y % 6) == 5) - srcPtr -= srcPitch; - memcpy(dstPtr, srcPtr, sizeof(uint16) * width); -#else - // Bilinear filter five input lines onto six output lines - switch (y % 6) { - case 0: - // First output line is copied from first input line - memcpy(dstPtr, srcPtr, sizeof(uint16) * width); - break; - case 1: - // Second output line is mixed from first and second input line - interpolate5Line<ColorMask, 1>((uint16 *)dstPtr, (const uint16 *)(srcPtr - srcPitch), (const uint16 *)srcPtr, width); - break; - case 2: - // Third output line is mixed from second and third input line - interpolate5Line<ColorMask, 2>((uint16 *)dstPtr, (const uint16 *)(srcPtr - srcPitch), (const uint16 *)srcPtr, width); - break; - case 3: - // Fourth output line is mixed from third and fourth input line - interpolate5Line<ColorMask, 2>((uint16 *)dstPtr, (const uint16 *)srcPtr, (const uint16 *)(srcPtr - srcPitch), width); - break; - case 4: - // Fifth output line is mixed from fourth and fifth input line - interpolate5Line<ColorMask, 1>((uint16 *)dstPtr, (const uint16 *)srcPtr, (const uint16 *)(srcPtr - srcPitch), width); - break; - case 5: - // Sixth (and last) output line is copied from fifth (and last) input line - srcPtr -= srcPitch; - memcpy(dstPtr, srcPtr, sizeof(uint16) * width); - break; - default: - break; - } -#endif - - srcPtr += srcPitch; - dstPtr += dstPitch; - } -} - -void Normal1xAspect(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { - extern int gBitFormat; - if (gBitFormat == 565) - Normal1xAspectTemplate<Graphics::ColorMasks<565> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height); - else - Normal1xAspectTemplate<Graphics::ColorMasks<555> >(srcPtr, srcPitch, dstPtr, dstPitch, width, height); -} - -#ifdef USE_ARM_SCALER_ASM -extern "C" void Normal2xAspectMask(const uint8 *srcPtr, - uint32 srcPitch, - uint8 *dstPtr, - uint32 dstPitch, - int width, - int height, - uint32 mask); - -/** - * A 2x scaler which also does aspect ratio correction. - * This is Normal2x combined with vertical stretching, - * so it will scale a 320x200 surface to a 640x480 surface. - */ -void Normal2xAspect(const uint8 *srcPtr, - uint32 srcPitch, - uint8 *dstPtr, - uint32 dstPitch, - int width, - int height) { - extern int gBitFormat; - if (gBitFormat == 565) { - Normal2xAspectMask(srcPtr, - srcPitch, - dstPtr, - dstPitch, - width, - height, - 0x07e0F81F); - } else { - Normal2xAspectMask(srcPtr, - srcPitch, - dstPtr, - dstPitch, - width, - height, - 0x03e07C1F); - } -} - -#endif // USE_ARM_SCALER_ASM |