Factorize the code which calls the non optimized C functions in

getSwsFunc().


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30331 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
stefano 2010-01-16 19:19:54 +00:00
parent 5ffab28a7c
commit 5cd08a9945
1 changed files with 3 additions and 12 deletions

View File

@ -1863,23 +1863,14 @@ static SwsFunc getSwsFunc(SwsContext *c)
} else if (flags & SWS_CPU_CAPS_MMX) { } else if (flags & SWS_CPU_CAPS_MMX) {
sws_init_swScale_MMX(c); sws_init_swScale_MMX(c);
return swScale_MMX; return swScale_MMX;
} else {
sws_init_swScale_C(c);
return swScale_C;
} }
#else #else
#if ARCH_PPC #if ARCH_PPC
if (flags & SWS_CPU_CAPS_ALTIVEC) { if (flags & SWS_CPU_CAPS_ALTIVEC) {
sws_init_swScale_altivec(c); sws_init_swScale_altivec(c);
return swScale_altivec; return swScale_altivec;
} else {
sws_init_swScale_C(c);
return swScale_C;
} }
#endif #endif
sws_init_swScale_C(c);
return swScale_C;
#endif /* ARCH_X86 && CONFIG_GPL */ #endif /* ARCH_X86 && CONFIG_GPL */
#else //CONFIG_RUNTIME_CPUDETECT #else //CONFIG_RUNTIME_CPUDETECT
#if COMPILE_TEMPLATE_MMX2 #if COMPILE_TEMPLATE_MMX2
@ -1894,11 +1885,11 @@ static SwsFunc getSwsFunc(SwsContext *c)
#elif COMPILE_TEMPLATE_ALTIVEC #elif COMPILE_TEMPLATE_ALTIVEC
sws_init_swScale_altivec(c); sws_init_swScale_altivec(c);
return swScale_altivec; return swScale_altivec;
#else
sws_init_swScale_C(c);
return swScale_C;
#endif #endif
#endif //!CONFIG_RUNTIME_CPUDETECT #endif //!CONFIG_RUNTIME_CPUDETECT
sws_init_swScale_C(c);
return swScale_C;
} }
static int PlanarToNV12Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY, static int PlanarToNV12Wrapper(SwsContext *c, const uint8_t* src[], int srcStride[], int srcSliceY,