changeset 27587:18b87a2461da

External liba52 support part 1 of 2. Conditionalize enabling of some the acceleration because liba52-0.7.4 doesn't support all that MPlayer's included copy does.
author rathann
date Mon, 15 Sep 2008 16:30:24 +0000
parents 6f6fbfe8e691
children 9b767bba79fb
files libmpcodecs/ad_liba52.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_liba52.c	Mon Sep 15 15:34:26 2008 +0000
+++ b/libmpcodecs/ad_liba52.c	Mon Sep 15 16:30:24 2008 +0000
@@ -158,12 +158,18 @@
   sample_t level=a52_level, bias=384;
   int flags=0;
   /* Dolby AC3 audio:*/
+#ifdef MM_ACCEL_X86_SSE
   if(gCpuCaps.hasSSE) a52_accel|=MM_ACCEL_X86_SSE;
+#endif
   if(gCpuCaps.hasMMX) a52_accel|=MM_ACCEL_X86_MMX;
   if(gCpuCaps.hasMMX2) a52_accel|=MM_ACCEL_X86_MMXEXT;
   if(gCpuCaps.has3DNow) a52_accel|=MM_ACCEL_X86_3DNOW;
+#ifdef MM_ACCEL_X86_3DNOWEXT
   if(gCpuCaps.has3DNowExt) a52_accel|=MM_ACCEL_X86_3DNOWEXT;
+#endif
+#ifdef MM_ACCEL_PPC_ALTIVEC
   if(gCpuCaps.hasAltiVec) a52_accel|=MM_ACCEL_PPC_ALTIVEC;
+#endif
   a52_state=a52_init (a52_accel);
   if (a52_state == NULL) {
 	mp_msg(MSGT_DECAUDIO,MSGL_ERR,"A52 init failed\n");