From f6a8615ab0c922ac2cb5c82c9824f6f4742b1725 Mon Sep 17 00:00:00 2001 From: David Wolstencroft Date: Mon, 29 Oct 2012 09:07:39 -0700 Subject: [PATCH] Disable ARM NEON MRC CPU test for Apple devices The Apple A6 CPU doesn't support performance counters, so this test caused a crash. --- common/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/cpu.c b/common/cpu.c index fa57407b..3cae6f84 100644 --- a/common/cpu.c +++ b/common/cpu.c @@ -376,7 +376,10 @@ uint32_t x264_cpu_detect( void ) // Note that there is potential for a race condition if another program or // x264 instance disables or reinits the counters while x264 is using them, // which may result in incorrect detection and the counters stuck enabled. + // right now Apple does not seem to support performance counters for this test +#ifndef __MACH__ flags |= x264_cpu_fast_neon_mrc_test() ? X264_CPU_FAST_NEON_MRC : 0; +#endif // TODO: write dual issue test? currently it's A8 (dual issue) vs. A9 (fast mrc) #endif return flags; -- 2.47.3