[x264-devel] Disable ARM NEON MRC CPU test for Apple devices

David Wolstencroft git at videolan.org
Thu Nov 8 00:55:03 CET 2012


x264 | branch: master | David Wolstencroft <d.wolstencroft at yahoo.com> | Mon Oct 29 09:07:39 2012 -0700| [f6a8615ab0c922ac2cb5c82c9824f6f4742b1725] | committer: Jason Garrett-Glaser

Disable ARM NEON MRC CPU test for Apple devices
The Apple A6 CPU doesn't support performance counters, so this test caused a crash.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=f6a8615ab0c922ac2cb5c82c9824f6f4742b1725
---

 common/cpu.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/cpu.c b/common/cpu.c
index fa57407..3cae6f8 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;



More information about the x264-devel mailing list