mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
Cache detected CPU flags
Originally committed as revision 25085 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9275438a19
commit
a3f0d2b967
@ -21,10 +21,17 @@
|
||||
|
||||
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;
|
||||
static int flags, checked;
|
||||
|
||||
if (checked)
|
||||
return flags;
|
||||
|
||||
if (ARCH_ARM) flags = ff_get_cpu_flags_arm();
|
||||
if (ARCH_PPC) flags = ff_get_cpu_flags_ppc();
|
||||
if (ARCH_X86) flags = ff_get_cpu_flags_x86();
|
||||
|
||||
checked = 1;
|
||||
return flags;
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
|
Loading…
Reference in New Issue
Block a user