diff options
author | Eugene Sandulenko | 2004-05-21 02:08:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-05-21 02:08:48 +0000 |
commit | d33b24036e7a0753a6de8a416c5c649f7ba84180 (patch) | |
tree | 03ce5d46129d6731a81eb894a4ddfdd3902aab00 /common/scaler/hq2x.cpp | |
parent | 5464e0951bf5145faa6f4dbe54d012da2364ce27 (diff) | |
download | scummvm-rg350-d33b24036e7a0753a6de8a416c5c649f7ba84180.tar.gz scummvm-rg350-d33b24036e7a0753a6de8a416c5c649f7ba84180.tar.bz2 scummvm-rg350-d33b24036e7a0753a6de8a416c5c649f7ba84180.zip |
Added assembly versions of HQ2x and HQ3x scalers.
svn-id: r13844
Diffstat (limited to 'common/scaler/hq2x.cpp')
-rw-r--r-- | common/scaler/hq2x.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/common/scaler/hq2x.cpp b/common/scaler/hq2x.cpp index 98790e1383..ab4d7b371f 100644 --- a/common/scaler/hq2x.cpp +++ b/common/scaler/hq2x.cpp @@ -22,6 +22,25 @@ #include "common/scaler/intern.h" +#ifdef USE_NASM +// Assembly version of HQ2x + +extern "C" { + +#ifndef _MSC_VER +#define hq2x_16 _hq2x_16 +#endif + +void hq2x_16(const byte *, byte *, uint32, uint32, uint32, uint32); + +} + +void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { + hq2x_16(srcPtr, dstPtr, width, height, srcPitch, dstPitch); +} + +#else + #ifdef HAS_ALTIVEC #include <sys/sysctl.h> @@ -120,7 +139,6 @@ void HQ2x_555(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit #undef bitFormat #endif - void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { #ifdef HAS_ALTIVEC if (isAltiVecAvailable()) { @@ -131,8 +149,11 @@ void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, return; } #endif + if (gBitFormat == 565) HQ2x_565(srcPtr, srcPitch, dstPtr, dstPitch, width, height); else HQ2x_555(srcPtr, srcPitch, dstPtr, dstPitch, width, height); } + +#endif //Assembly version |