diff cpu.c @ 1010:6138233957fe libavutil

Clean up av_get_cpu_flag() Instead of defining functions in per-arch header files included by the main cpu.c, define them normally and call them from the generic one.
author mru
date Thu, 09 Sep 2010 18:51:45 +0000
parents 40b8596460af
children ec22b0df8cf6
line wrap: on
line diff
--- a/cpu.c	Wed Sep 08 15:07:14 2010 +0000
+++ b/cpu.c	Thu Sep 09 18:51:45 2010 +0000
@@ -19,18 +19,13 @@
 #include "cpu.h"
 #include "config.h"
 
-#if   ARCH_ARM
-#   include "arm/cpu.h"
-#elif ARCH_PPC
-#   include "ppc/cpu.h"
-#elif ARCH_X86
-#   include "x86/cpu.h"
-#else
 int av_get_cpu_flags(void)
 {
+    if (ARCH_ARM) return ff_get_cpu_flags_arm();
+    if (ARCH_PPC) return ff_get_cpu_flags_ppc();
+    if (ARCH_X86) return ff_get_cpu_flags_x86();
     return 0;
 }
-#endif
 
 #ifdef TEST