[FFmpeg-cvslog] PPC: use Altivec IMDCT only for supported sizes

Mans Rullgard git at videolan.org
Wed Jul 6 01:37:07 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Tue Jul  5 15:53:05 2011 +0100| [6cbf2420b95db9c65921c2f1c23105b9f7998338] | committer: Mans Rullgard

PPC: use Altivec IMDCT only for supported sizes

The Altivec IMDCT works with size 32 and higher only.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6cbf2420b95db9c65921c2f1c23105b9f7998338
---

 libavcodec/ppc/fft_altivec.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ppc/fft_altivec.c b/libavcodec/ppc/fft_altivec.c
index 435024a..39830b2 100644
--- a/libavcodec/ppc/fft_altivec.c
+++ b/libavcodec/ppc/fft_altivec.c
@@ -141,7 +141,9 @@ av_cold void ff_fft_init_altivec(FFTContext *s)
 {
 #if HAVE_GNU_AS
     s->fft_calc   = ff_fft_calc_interleave_altivec;
-    s->imdct_calc = ff_imdct_calc_altivec;
-    s->imdct_half = ff_imdct_half_altivec;
+    if (s->mdct_bits >= 5) {
+        s->imdct_calc = ff_imdct_calc_altivec;
+        s->imdct_half = ff_imdct_half_altivec;
+    }
 #endif
 }



More information about the ffmpeg-cvslog mailing list