Commit 33a0421b authored by Josh Allmann's avatar Josh Allmann Committed by Luca Barbato

swscale: simplify initialization code

Simplify the fallthrough case when no accelerated functions
can be initialized.
parent 735bf195
...@@ -1211,8 +1211,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c) ...@@ -1211,8 +1211,6 @@ SwsFunc ff_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 {
return swScale_c;
} }
#else #else
...@@ -1220,11 +1218,8 @@ SwsFunc ff_getSwsFunc(SwsContext *c) ...@@ -1220,11 +1218,8 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
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 {
return swScale_c;
} }
#endif #endif
return swScale_c;
#endif /* ARCH_X86 */ #endif /* ARCH_X86 */
#else //CONFIG_RUNTIME_CPUDETECT #else //CONFIG_RUNTIME_CPUDETECT
#if COMPILE_TEMPLATE_MMX2 #if COMPILE_TEMPLATE_MMX2
...@@ -1239,10 +1234,10 @@ SwsFunc ff_getSwsFunc(SwsContext *c) ...@@ -1239,10 +1234,10 @@ SwsFunc ff_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
return swScale_c;
#endif #endif
#endif //!CONFIG_RUNTIME_CPUDETECT #endif //!CONFIG_RUNTIME_CPUDETECT
return swScale_c;
} }
static void copyPlane(const uint8_t *src, int srcStride, static void copyPlane(const uint8_t *src, int srcStride,
......
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