Commit 2dbda937 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'cb44b21d'

* commit 'cb44b21d':
  dct-test: Move cpu_flags variable out of global scope
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 0f701310 cb44b21d
...@@ -66,8 +66,6 @@ struct algo { ...@@ -66,8 +66,6 @@ struct algo {
int nonspec; int nonspec;
}; };
static int cpu_flags;
static const struct algo fdct_tab[] = { static const struct algo fdct_tab[] = {
{ "REF-DBL", ff_ref_fdct, NO_PERM }, { "REF-DBL", ff_ref_fdct, NO_PERM },
{ "FAAN", ff_faandct, NO_PERM }, { "FAAN", ff_faandct, NO_PERM },
...@@ -538,8 +536,6 @@ int main(int argc, char **argv) ...@@ -538,8 +536,6 @@ int main(int argc, char **argv)
int err = 0; int err = 0;
int bits=8; int bits=8;
cpu_flags = av_get_cpu_flags();
ff_ref_dct_init(); ff_ref_dct_init();
idct_mmx_init(); idct_mmx_init();
...@@ -573,6 +569,7 @@ int main(int argc, char **argv) ...@@ -573,6 +569,7 @@ int main(int argc, char **argv)
if (test_248_dct) { if (test_248_dct) {
idct248_error("SIMPLE-C", ff_simple_idct248_put, speed); idct248_error("SIMPLE-C", ff_simple_idct248_put, speed);
} else { } else {
const int cpu_flags = av_get_cpu_flags();
const struct algo *algos = test_idct ? idct_tab : fdct_tab; const struct algo *algos = test_idct ? idct_tab : fdct_tab;
for (i = 0; algos[i].name; i++) for (i = 0; algos[i].name; i++)
if (!(~cpu_flags & algos[i].mm_support)) { if (!(~cpu_flags & algos[i].mm_support)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment