aboutsummaryrefslogtreecommitdiff
path: root/common/scaler/hq3x.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2004-05-21 02:08:48 +0000
committerEugene Sandulenko2004-05-21 02:08:48 +0000
commitd33b24036e7a0753a6de8a416c5c649f7ba84180 (patch)
tree03ce5d46129d6731a81eb894a4ddfdd3902aab00 /common/scaler/hq3x.cpp
parent5464e0951bf5145faa6f4dbe54d012da2364ce27 (diff)
downloadscummvm-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/hq3x.cpp')
-rw-r--r--common/scaler/hq3x.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/common/scaler/hq3x.cpp b/common/scaler/hq3x.cpp
index 39156275d8..60f8b7b30a 100644
--- a/common/scaler/hq3x.cpp
+++ b/common/scaler/hq3x.cpp
@@ -22,6 +22,25 @@
#include "common/scaler/intern.h"
+#ifdef USE_NASM
+// Assembly version of HQ3x
+
+extern "C" {
+
+#ifndef _MSC_VER
+#define hq3x_16 _hq3x_16
+#endif
+
+void hq3x_16(const byte *, byte *, uint32, uint32, uint32, uint32);
+
+}
+
+void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+ hq3x_16(srcPtr, dstPtr, width, height, srcPitch, dstPitch);
+}
+
+#else
+
#ifdef HAS_ALTIVEC
#include <sys/sysctl.h>
@@ -122,7 +141,6 @@ void HQ3x_555(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPit
#undef bitFormat
#endif
-
void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
#ifdef HAS_ALTIVEC
if (isAltiVecAvailable()) {
@@ -133,8 +151,11 @@ void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
return;
}
#endif
+
if (gBitFormat == 565)
HQ3x_565(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
else
HQ3x_555(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
}
+
+#endif