aboutsummaryrefslogtreecommitdiff
path: root/common/scaler
diff options
context:
space:
mode:
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);