summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-02-26 19:44:41 +0000
committerjstebbins <[email protected]>2015-02-26 19:44:41 +0000
commit90a6fc70ae14396334ab8a3ffcb734b7c5f29661 (patch)
tree470a3bf59aab25c70f867bfd81b420493d72e3d1 /libhb
parentdf99e1727fd3f72f0a418f0634afcd58fdec997a (diff)
nlmeans: fix build on non-x86 architectures
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6945 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/nlmeans.c7
-rw-r--r--libhb/nlmeans_x86.c7
-rw-r--r--libhb/ports.h4
3 files changed, 10 insertions, 8 deletions
diff --git a/libhb/nlmeans.c b/libhb/nlmeans.c
index 3da7d7721..e0aac23c7 100644
--- a/libhb/nlmeans.c
+++ b/libhb/nlmeans.c
@@ -774,10 +774,9 @@ static int nlmeans_init(hb_filter_object_t *filter,
NLMeansFunctions *functions = &pv->functions;
functions->build_integral = build_integral_scalar;
- if (ARCH_X86 == 1)
- {
- nlmeans_init_x86(functions);
- }
+#if defined(ARCH_X86)
+ nlmeans_init_x86(functions);
+#endif
// Mark parameters unset
for (int c = 0; c < 3; c++)
diff --git a/libhb/nlmeans_x86.c b/libhb/nlmeans_x86.c
index aa727d96a..564668e0a 100644
--- a/libhb/nlmeans_x86.c
+++ b/libhb/nlmeans_x86.c
@@ -8,9 +8,12 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
+#include "hb.h" // needed for ARCH_X86
+
+#if defined(ARCH_X86)
+
#include <emmintrin.h>
-#include "hb.h"
#include "libavutil/cpu.h"
#include "nlmeans.h"
@@ -148,3 +151,5 @@ void nlmeans_init_x86(NLMeansFunctions *functions)
hb_log("NLMeans using SSE2 optimizations");
}
}
+
+#endif // ARCH_X86
diff --git a/libhb/ports.h b/libhb/ports.h
index 5c9cf9bda..7dde23028 100644
--- a/libhb/ports.h
+++ b/libhb/ports.h
@@ -11,9 +11,7 @@
#define HB_PORTS_H
#if ARCH_X86_64 || ARCH_X86_32
-#define ARCH_X86 1
-#else
-#define ARCH_X86 0
+#define ARCH_X86
#endif
#if defined(_WIN32)