Browse Source

dct-test: Move cpu_flags variable out of global scope

tags/n2.4
Diego Biurrun 12 years ago
parent
commit
cb44b21da1
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      libavcodec/dct-test.c

+ 1
- 4
libavcodec/dct-test.c View File

@@ -66,8 +66,6 @@ struct algo {
int nonspec;
};

static int cpu_flags;

static const struct algo fdct_tab[] = {
{ "REF-DBL", ff_ref_fdct, NO_PERM },
{ "FAAN", ff_faandct, NO_PERM },
@@ -470,8 +468,6 @@ int main(int argc, char **argv)
int speed = 0;
int err = 0;

cpu_flags = av_get_cpu_flags();

ff_ref_dct_init();
idct_mmx_init();

@@ -504,6 +500,7 @@ int main(int argc, char **argv)
if (test_248_dct) {
idct248_error("SIMPLE-C", ff_simple_idct248_put, speed);
} else {
const int cpu_flags = av_get_cpu_flags();
const struct algo *algos = test_idct ? idct_tab : fdct_tab;
for (i = 0; algos[i].name; i++)
if (!(~cpu_flags & algos[i].mm_support)) {


Loading…
Cancel
Save