aboutsummaryrefslogtreecommitdiff
path: root/common/scaler
diff options
context:
space:
mode:
authorMax Horn2005-05-09 21:21:21 +0000
committerMax Horn2005-05-09 21:21:21 +0000
commit52bbc867979b1453f98191718c3eca726cc9ff8e (patch)
tree4bf1084cc670b2fff715916420c604684fa81135 /common/scaler
parent1c6788797ee3a5f4790ae1e42fa9321478f62c60 (diff)
downloadscummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.tar.gz
scummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.tar.bz2
scummvm-rg350-52bbc867979b1453f98191718c3eca726cc9ff8e.zip
Patch #1181544 (AmigaOS 4 changes)
svn-id: r18011
Diffstat (limited to 'common/scaler')
-rw-r--r--common/scaler/hq2x.cpp15
-rw-r--r--common/scaler/hq3x.cpp14
2 files changed, 29 insertions, 0 deletions
diff --git a/common/scaler/hq2x.cpp b/common/scaler/hq2x.cpp
index 3599c01b9b..fd6d2eb094 100644
--- a/common/scaler/hq2x.cpp
+++ b/common/scaler/hq2x.cpp
@@ -42,6 +42,20 @@ void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
#else
#ifdef HAS_ALTIVEC
+
+#ifdef __amigaos4__
+#include <proto/exec.h>
+#include <altivec.h>
+static bool isAltiVecAvailable() {
+ uint32 vecUnit;
+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
+ if (vecUnit == VECTORTYPE_NONE)
+ return false;
+ else
+ return true;
+}
+#else
+
#include <sys/sysctl.h>
static bool isAltiVecAvailable() {
@@ -54,6 +68,7 @@ static bool isAltiVecAvailable() {
return false;
}
#endif
+#endif
#define PIXEL00_0 *(q) = w5;
#define PIXEL00_10 *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
diff --git a/common/scaler/hq3x.cpp b/common/scaler/hq3x.cpp
index f0a92c533c..43bc0dd432 100644
--- a/common/scaler/hq3x.cpp
+++ b/common/scaler/hq3x.cpp
@@ -42,6 +42,19 @@ void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
#else
#ifdef HAS_ALTIVEC
+
+#ifdef __amigaos4__
+#include <proto/exec.h>
+static bool isAltiVecAvailable() {
+ uint32 vecUnit;
+ IExec->GetCPUInfo(GCIT_VectorUnit, &vecUnit, TAG_DONE);
+ if (vecUnit == VECTORTYPE_NONE)
+ return false;
+ else
+ return true;
+}
+#else
+
#include <sys/sysctl.h>
static bool isAltiVecAvailable() {
@@ -54,6 +67,7 @@ static bool isAltiVecAvailable() {
return false;
}
#endif
+#endif
#define PIXEL00_1M *(q) = interpolate16_2<bitFormat,3,1>(w5, w1);
#define PIXEL00_1U *(q) = interpolate16_2<bitFormat,3,1>(w5, w2);