Commit 9da79c3a authored by gpoirier's avatar gpoirier

check mm_flags for each DCT and skips the ones that can't be run

patch by Alexander Strange %astrange A ithinksw P com%


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12628 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 64e774ab
...@@ -74,6 +74,7 @@ struct algo { ...@@ -74,6 +74,7 @@ struct algo {
void (* func) (DCTELEM *block); void (* func) (DCTELEM *block);
void (* ref) (DCTELEM *block); void (* ref) (DCTELEM *block);
enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM } format; enum formattag { NO_PERM,MMX_PERM, MMX_SIMPLE_PERM, SCALE_PERM } format;
int mm_support;
}; };
#ifndef FAAN_POSTSCALE #ifndef FAAN_POSTSCALE
...@@ -93,22 +94,22 @@ struct algo algos[] = { ...@@ -93,22 +94,22 @@ struct algo algos[] = {
{"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM}, {"SIMPLE-C", 1, ff_simple_idct, idct, NO_PERM},
#ifdef HAVE_MMX #ifdef HAVE_MMX
{"MMX", 0, ff_fdct_mmx, fdct, NO_PERM}, {"MMX", 0, ff_fdct_mmx, fdct, NO_PERM, MM_MMX},
#ifdef HAVE_MMX2 #ifdef HAVE_MMX2
{"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM}, {"MMX2", 0, ff_fdct_mmx2, fdct, NO_PERM, MM_MMXEXT},
#endif #endif
#ifdef CONFIG_GPL #ifdef CONFIG_GPL
{"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM}, {"LIBMPEG2-MMX", 1, ff_mmx_idct, idct, MMX_PERM, MM_MMX},
{"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM}, {"LIBMPEG2-MMXEXT", 1, ff_mmxext_idct, idct, MMX_PERM, MM_MMXEXT},
#endif #endif
{"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM}, {"SIMPLE-MMX", 1, ff_simple_idct_mmx, idct, MMX_SIMPLE_PERM, MM_MMX},
{"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM}, {"XVID-MMX", 1, ff_idct_xvid_mmx, idct, NO_PERM, MM_MMX},
{"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM}, {"XVID-MMX2", 1, ff_idct_xvid_mmx2, idct, NO_PERM, MM_MMXEXT},
#endif #endif
#ifdef HAVE_ALTIVEC #ifdef HAVE_ALTIVEC
{"altivecfdct", 0, fdct_altivec, fdct, NO_PERM}, {"altivecfdct", 0, fdct_altivec, fdct, NO_PERM, MM_ALTIVEC},
#endif #endif
#ifdef ARCH_BFIN #ifdef ARCH_BFIN
...@@ -562,7 +563,7 @@ int main(int argc, char **argv) ...@@ -562,7 +563,7 @@ int main(int argc, char **argv)
idct248_error("SIMPLE-C", ff_simple_idct248_put); idct248_error("SIMPLE-C", ff_simple_idct248_put);
} else { } else {
for (i=0;algos[i].name;i++) for (i=0;algos[i].name;i++)
if (algos[i].is_idct == test_idct) { if (algos[i].is_idct == test_idct && !(~mm_flags & algos[i].mm_support)) {
dct_error (algos[i].name, algos[i].is_idct, algos[i].func, algos[i].ref, algos[i].format, test); dct_error (algos[i].name, algos[i].is_idct, algos[i].func, algos[i].ref, algos[i].format, test);
} }
} }
......
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