[SCM] libav/experimental: ppc: idctdsp: Immediately return if no AltiVec is available

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:04:06 UTC 2014


The following commit has been merged in the experimental branch:
commit 03c9f357a4c2307a7913cea2cbf0ba817e80beb6
Author: Diego Biurrun <diego at biurrun.de>
Date:   Thu Jul 31 04:48:07 2014 -0700

    ppc: idctdsp: Immediately return if no AltiVec is available
    
    This is how all the other init functions operate.

diff --git a/libavcodec/ppc/idctdsp.c b/libavcodec/ppc/idctdsp.c
index e1dde82..17f7dbb 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 */

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list