 +
  #ifdef LIBA52_DJBFFT
      if (mm_accel & MM_ACCEL_DJBFFT) {
--	fprintf (stderr, "Using djbfft for IMDCT transform\n");
 +#ifndef LIBA52_DOUBLE
  	ifft128 = (void (*) (complex_t *)) fftc4_un128;
  	ifft64 = (void (*) (complex_t *)) fftc4_un64;

 
 static const uint16_t dither_lut[256] = {
     0x0000, 0xa011, 0xe033, 0x4022, 0x6077, 0xc066, 0x8044, 0x2055,
diff -ruN a52dec.orig/include.orig/a52.h a52dec/include/a52.h
--- a52dec.orig/include/a52.h	2008-07-23 14:10:23.000000000 +0200
+++ a52dec/include/a52.h	2008-07-23 14:10:36.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * a52.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of a52dec, a free ATSC A-52 stream decoder.
@@ -24,10 +24,15 @@
 #ifndef A52_H
 #define A52_H
 
-#ifndef LIBA52_DOUBLE
-typedef float sample_t;
-#else
+#if defined(LIBA52_FIXED)
+typedef int32_t sample_t;
+typedef int32_t level_t;
+#elif defined(LIBA52_DOUBLE)
 typedef double sample_t;
+typedef double level_t;
+#else
+typedef float sample_t;
+typedef float level_t;
 #endif
 
 typedef struct a52_state_s a52_state_t;
@@ -53,9 +58,9 @@
 int a52_syncinfo (uint8_t * buf, int * flags,
 		  int * sample_rate, int * bit_rate);
 int a52_frame (a52_state_t * state, uint8_t * buf, int * flags,
-	       sample_t * level, sample_t bias);
+	       level_t * level, sample_t bias);
 void a52_dynrng (a52_state_t * state,
-		 sample_t (* call) (sample_t, void *), void * data);
+		 level_t (* call) (level_t, void *), void * data);
 int a52_block (a52_state_t * state);
 void a52_free (a52_state_t * state);
 
diff -ruN a52dec.orig/include.orig/attributes.h a52dec/include/attributes.h
--- a52dec.orig/include/attributes.h	2008-07-23 14:10:23.000000000 +0200
+++ a52dec/include/attributes.h	2008-07-23 14:10:36.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * attributes.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of a52dec, a free ATSC A-52 stream decoder.
@@ -27,3 +27,11 @@
 #else
 #define ATTR_ALIGN(align)
 #endif
+
+#ifdef HAVE_BUILTIN_EXPECT
+#define likely(x) __builtin_expect ((x) != 0, 1)
+#define unlikely(x) __builtin_expect ((x) != 0, 0)
+#else
+#define likely(x) (x)
+#define unlikely(x) (x)
+#endif
diff -ruN a52dec.orig/include.orig/mm_accel.h a52dec/include/mm_accel.h
--- a52dec.orig/include/mm_accel.h	2008-07-23 14:10:23.000000000 +0200
+++ a52dec/include/mm_accel.h	2008-07-23 14:10:36.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * mm_accel.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of a52dec, a free ATSC A-52 stream decoder.
diff -ruN a52dec.orig/include.orig/tendra.h a52dec/include/tendra.h
--- a52dec.orig/include/tendra.h	2008-07-23 14:10:23.000000000 +0200
+++ a52dec/include/tendra.h	2008-07-23 14:10:36.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * tendra.h
- * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org>
+ * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
  * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *
  * This file is part of a52dec, a free ATSC A-52 stream decoder.

+
+static complex_t pre2[64]IDATA_ATTR={{1073721611,-6588355},{763894503,754577161},{994510674,404808624},{416982318,989468165},{1054375675,203010932},{602005783,889106597},{215934457,1051805026},{896427186,591049747},{1069197119,98686490},{686254647,825818420},{950043650,500338452},{317989594,1025575020},{111799753,1067905576},{834177638,676068911},{1029400017,305380267},{511959274,943832191},{1072751541,46104602},{725949012,791150766},{973449725,453119340},{367929143,1008736660},{1043144359,254502159},{557654248,917574653},{164064728,1061133483},{866345963,634323399},{59265442,1072104991},{799999705,716185713},{1013175760,355522688},{465030947,967815955},{1063066908,151030634},{644907034,858496605},{267283981,1039942680},{924348836,546352205},{1073559912,19764075},{745146182,773096806},{984276645,429093217},{392573967,999403414},{1049075979,228825463},{580004702,903612776},{190056834,1056787539},{881652112,612871159},{1066453209,124896178},{665781361,842411231},{937478594,523502998},{292724951,1033069991},{85558366,1070327646},{817334837,696337035},{1021595574,330551034},{488642280,956112036},{32936819,1073236539},{782182683,735602987},{1004145647,380280189},{441139495,978936897},{1059040255,177074114},{623644238,874064853},{241682009,1046188946},{910662286,568872310},{1071296985,72417357},{706314558,808728167},{962036435,476872521},{343062693,1017462280},{137973795,1064840239},{850517961,655393547},{1036584388,280025551},{534967883,930983817}};
+static complex_t post2[32]IDATA_ATTR={{1073660973,13176463},{1073014239,39521454},{1071721163,65842639},{1069782521,92124162},{1067199482,118350193},{1063973603,144504935},{1060106825,170572632},{1055601479,196537583},{1050460278,222384146},{1044686318,248096754},{1038283079,273659918},{1031254417,299058239},{1023604566,324276418},{1015338134,349299266},{1006460100,374111709},{996975812,398698801},{986890983,423045731},{976211688,447137835},{964944359,470960600},{953095785,494499675},{940673100,517740882},{927683790,540670222},{914135677,563273882},{900036924,585538247},{885396022,607449906},{870221790,628995659},{854523369,650162530},{838310215,670937766},{821592095,691308855},{804379078,711263525},{786681534,730789756},{768510121,749875787}};
diff -ruN a52dec.orig/liba52/parse.c a52dec/liba52/parse.c
--- a52dec.orig/liba52/parse.c	2012-11-13 17:25:33.438758556 +0100
+++ a52dec/liba52/parse.c	2012-11-13 17:27:31.150370945 +0100
@@ -1,6 +1,6 @@
 /*
  * parse.c
