[gst-cvs] gst-plugins-ugly: a52dec: Allow liba52 to use djbfft based IMDCT transform

Sebastian Dröge slomo at kemper.freedesktop.org
Sun Aug 23 04:36:22 PDT 2009


Module: gst-plugins-ugly
Branch: master
Commit: ebfe6c07467c67c82cdd199903ddd36097564ed5
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=ebfe6c07467c67c82cdd199903ddd36097564ed5

Author: Mart Raudsepp <leio at gentoo.org>
Date:   Sun Aug 23 13:34:32 2009 +0200

a52dec: Allow liba52 to use djbfft based IMDCT transform

liba52 in a52dec-0.7.4 does not have any MMX, MMXEXT or 3DNOW based
IMDCT transform acceleration. It does however have a software based
acceleration using the djbfft library (D.J. Bernstein's library for
fourier transforms - Extremely fast library for floating-point
convolution). So allow liba52 to use it through the MM_ACCEL_DJBFFT
flag.
The liba52 copy in MPlayer sources does have SSE, 3dnowext, 3dnow
and AltiVec implementations, but those are checked for first, and
djbfft is chosen only if none of those is available - good in the
case of some distributions including a port of the MPlayer changes
in their system a52dec library.

The down and upmix code in liba52 doesn't seem to be disturbed by
this additional MM_ACCEL flag and will still use MMX, SSE or 3DNOW
versions if passed from oil_cpu_get_flags (SSE currently is not).

Fixes bug #592787.

---

 ext/a52dec/gsta52dec.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
index 8087a78..4c4127a 100644
--- a/ext/a52dec/gsta52dec.c
+++ b/ext/a52dec/gsta52dec.c
@@ -192,7 +192,9 @@ gst_a52dec_class_init (GstA52DecClass * klass)
 
   oil_init ();
 
-  klass->a52_cpuflags = 0;
+  /* If no CPU instruction based acceleration is available, end up using the
+   * generic software djbfft based one when available in the used liba52 */
+  klass->a52_cpuflags = MM_ACCEL_DJBFFT;
   cpuflags = oil_cpu_get_flags ();
   if (cpuflags & OIL_IMPL_FLAG_MMX)
     klass->a52_cpuflags |= MM_ACCEL_X86_MMX;





More information about the Gstreamer-commits mailing list