diff options
Diffstat (limited to 'graphics/scaler.cpp')
-rw-r--r-- | graphics/scaler.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp index 11767848ed..7620e5b107 100644 --- a/graphics/scaler.cpp +++ b/graphics/scaler.cpp @@ -187,6 +187,61 @@ void Normal1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit } #ifndef DISABLE_SCALERS +#ifdef USE_ARM_SCALER_ASM +extern "C" void Normal2xAspectMask(const uint8 *srcPtr, + uint32 srcPitch, + uint8 *dstPtr, + uint32 dstPitch, + int width, + int height, + uint32 mask); + +void Normal2xAspect(const uint8 *srcPtr, + uint32 srcPitch, + uint8 *dstPtr, + uint32 dstPitch, + int width, + int height) +{ + if (gBitFormat == 565) + { + Normal2xAspectMask(srcPtr, + srcPitch, + dstPtr, + dstPitch, + width, + height, + 0x07e0F81F); + } + else + { + Normal2xAspectMask(srcPtr, + srcPitch, + dstPtr, + dstPitch, + width, + height, + 0x03e07C1F); + } +} + +extern "C" void Normal2xARM(const uint8 *srcPtr, + uint32 srcPitch, + uint8 *dstPtr, + uint32 dstPitch, + int width, + int height); + +void Normal2x(const uint8 *srcPtr, + uint32 srcPitch, + uint8 *dstPtr, + uint32 dstPitch, + int width, + int height) +{ + Normal2xARM(srcPtr, srcPitch, dstPtr, dstPitch, width, height); +} +#else /** * Trivial nearest-neighbour 2x scaler. */ @@ -210,6 +265,7 @@ void Normal2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit dstPtr += dstPitch << 1; } } +#endif /** * Trivial nearest-neighbour 3x scaler. |