Mercurial > libavutil.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
1009:40b8596460af | 1010:6138233957fe |
---|---|
17 */ | 17 */ |
18 | 18 |
19 #include "cpu.h" | 19 #include "cpu.h" |
20 #include "config.h" | 20 #include "config.h" |
21 | 21 |
22 #if ARCH_ARM | |
23 # include "arm/cpu.h" | |
24 #elif ARCH_PPC | |
25 # include "ppc/cpu.h" | |
26 #elif ARCH_X86 | |
27 # include "x86/cpu.h" | |
28 #else | |
29 int av_get_cpu_flags(void) | 22 int av_get_cpu_flags(void) |
30 { | 23 { |
24 if (ARCH_ARM) return ff_get_cpu_flags_arm(); | |
25 if (ARCH_PPC) return ff_get_cpu_flags_ppc(); | |
26 if (ARCH_X86) return ff_get_cpu_flags_x86(); | |
31 return 0; | 27 return 0; |
32 } | 28 } |
33 #endif | |
34 | 29 |
35 #ifdef TEST | 30 #ifdef TEST |
36 | 31 |
37 #undef printf | 32 #undef printf |
38 | 33 |