]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ppc/idctdsp.c
Merge commit 'e0d73fda361729d207e51fa2afd8ba6102e58d98'
[ffmpeg] / libavcodec / ppc / idctdsp.c
index 6cc660faa8fb47e4b18cd51699d806466fb2ac18..5ef514b51bf66a05b807e3a60e9a2c6cbdd2a8f9 100644 (file)
@@ -247,15 +247,16 @@ 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 && avctx->lowres == 0) {
-            if ((avctx->idct_algo == FF_IDCT_AUTO) ||
-                (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
-                c->idct      = 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 && avctx->lowres == 0) {
+        if ((avctx->idct_algo == FF_IDCT_AUTO && !(avctx->flags & CODEC_FLAG_BITEXACT)) ||
+            (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
+            c->idct      = idct_altivec;
+            c->idct_add  = idct_add_altivec;
+            c->idct_put  = idct_put_altivec;
+            c->perm_type = FF_IDCT_PERM_TRANSPOSE;
         }
     }
 #endif /* HAVE_ALTIVEC */