summaryrefslogtreecommitdiff
path: root/libavcodec/ppc
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-07-31 04:48:07 -0700
committerDiego Biurrun <diego@biurrun.de>2014-08-01 01:23:11 -0700
commit03c9f357a4c2307a7913cea2cbf0ba817e80beb6 (patch)
tree6b5037c3438340ad5b524986ee10c8cd903746c1 /libavcodec/ppc
parent706208ef47bffd525c982975d2756f7b2b220b8d (diff)
ppc: idctdsp: Immediately return if no AltiVec is available
This is how all the other init functions operate.
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r--libavcodec/ppc/idctdsp.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/ppc/idctdsp.c b/libavcodec/ppc/idctdsp.c
index e1dde82e21..17f7dbbc7f 100644
--- a/libavcodec/ppc/idctdsp.c
+++ b/libavcodec/ppc/idctdsp.c
@@ -231,14 +231,15 @@ av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx,
unsigned high_bit_depth)
{
#if HAVE_ALTIVEC
- if (PPC_ALTIVEC(av_get_cpu_flags())) {
- if (!high_bit_depth) {
- if ((avctx->idct_algo == FF_IDCT_AUTO) ||
- (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
- c->idct_add = idct_add_altivec;
- c->idct_put = idct_put_altivec;
- c->perm_type = FF_IDCT_PERM_TRANSPOSE;
- }
+ if (!PPC_ALTIVEC(av_get_cpu_flags()))
+ return;
+
+ if (!high_bit_depth) {
+ if ((avctx->idct_algo == FF_IDCT_AUTO) ||
+ (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
+ c->idct_add = idct_add_altivec;
+ c->idct_put = idct_put_altivec;
+ c->perm_type = FF_IDCT_PERM_TRANSPOSE;
}
}
#endif /* HAVE_ALTIVEC */