From 90a6fc70ae14396334ab8a3ffcb734b7c5f29661 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Thu, 26 Feb 2015 19:44:41 +0000 Subject: nlmeans: fix build on non-x86 architectures git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6945 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/nlmeans.c | 7 +++---- libhb/nlmeans_x86.c | 7 ++++++- libhb/ports.h | 4 +--- 3 files changed, 10 insertions(+), 8 deletions(-) (limited to 'libhb') 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 -#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) -- cgit v1.2.3