aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale.c
diff options
context:
space:
mode:
authorJosh Allmann <joshua.allmann@gmail.com>2011-04-13 20:57:32 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-04-14 22:16:47 +0200
commit33a0421bbaa64f4e9c3d852b7f225ede8dad1388 (patch)
tree0a4319b9c39f8569efae67089fd547731649a77e /libswscale/swscale.c
parent735bf1951171a1e0ee4292e84a1b1beac45dd0ab (diff)
downloadffmpeg-33a0421bbaa64f4e9c3d852b7f225ede8dad1388.tar.gz
swscale: simplify initialization code
Simplify the fallthrough case when no accelerated functions can be initialized.
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r--libswscale/swscale.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index e830bb6f2c..277a0d373c 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -1211,8 +1211,6 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
} else if (flags & SWS_CPU_CAPS_MMX) {
sws_init_swScale_MMX(c);
return swScale_MMX;
- } else {
- return swScale_c;
}
#else
@@ -1220,11 +1218,8 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
if (flags & SWS_CPU_CAPS_ALTIVEC) {
sws_init_swScale_altivec(c);
return swScale_altivec;
- } else {
- return swScale_c;
}
#endif
- return swScale_c;
#endif /* ARCH_X86 */
#else //CONFIG_RUNTIME_CPUDETECT
#if COMPILE_TEMPLATE_MMX2
@@ -1239,10 +1234,10 @@ SwsFunc ff_getSwsFunc(SwsContext *c)
#elif COMPILE_TEMPLATE_ALTIVEC
sws_init_swScale_altivec(c);
return swScale_altivec;
-#else
- return swScale_c;
#endif
#endif //!CONFIG_RUNTIME_CPUDETECT
+
+ return swScale_c;
}
static void copyPlane(const uint8_t *src, int srcStride,