[vlc-devel] [PATCH] contribs: Update liba52 fixed patch
Edward Wang
edward.c.wang at compdigitec.com
Mon Nov 12 04:20:13 CET 2012
---
contrib/src/a52/liba52-fixed.diff | 23 +++++++++--------------
1 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/contrib/src/a52/liba52-fixed.diff b/contrib/src/a52/liba52-fixed.diff
index 2b36c60..4633085 100644
--- a/contrib/src/a52/liba52-fixed.diff
+++ b/contrib/src/a52/liba52-fixed.diff
@@ -1103,7 +1103,7 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
static double besselI0 (double x)
{
double bessel = 1;
-@@ -361,71 +356,121 @@
+@@ -361,66 +356,119 @@
while (--i);
return bessel;
}
@@ -1118,8 +1118,8 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
+ double local_imdct_window[256];*/
/* compute imdct window - kaiser-bessel derived window, alpha = 5.0 */
-- sum = 0;
-+ /* sum = 0;
++ /*
+ sum = 0;
for (i = 0; i < 256; i++) {
sum += besselI0 (i * (256 - i) * (5 * M_PI / 256) * (5 * M_PI / 256));
- a52_imdct_window[i] = sum;
@@ -1139,12 +1139,12 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
+ }
+ printf("\n}\n");
+ */
-+
-+ /* for (i = 0; i < 3; i++)
-+ roots16[i] = SAMPLE (cos ((M_PI / 8) * (i + 1)));
- for (i = 0; i < 3; i++)
- roots16[i] = cos ((M_PI / 8) * (i + 1));
++ /* for (i = 0; i < 3; i++)
++ roots16[i] = SAMPLE (cos ((M_PI / 8) * (i + 1)));
++
+ printf("static sample_t roots16[3]={%d,%d,%d};\n\n",roots16[0],roots16[1],roots16[2]);
for (i = 0; i < 7; i++)
@@ -1153,7 +1153,7 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
+
+ printf("static sample_t roots32[7]={");
+ for (i=0;i<7;i++) { printf("%d%s",roots32[i],(i < 6 ? "," : "")); }
-+ printf("};\n");
++ printf("};\n")
for (i = 0; i < 15; i++)
- roots64[i] = cos ((M_PI / 32) * (i + 1));
@@ -1166,12 +1166,13 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
for (i = 0; i < 31; i++)
- roots128[i] = cos ((M_PI / 64) * (i + 1));
+ roots128[i] = SAMPLE (cos ((M_PI / 64) * (i + 1)));
-
++
+ printf("static sample_t roots128[31]={");
+ for (i=0;i<31;i++) { printf("%d%s",roots128[i],(i < 30 ? "," : "")); }
+ printf("};\n");
+ */
+ /*
+
for (i = 0; i < 64; i++) {
k = fftorder[i] / 2 + 64;
- pre1[i].real = cos ((M_PI / 256) * (k - 0.25));
@@ -1229,10 +1230,8 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
+ for (i=0;i<32;i++) { printf("{%d,%d}%s",post2[i].real,post2[i].imag,(i < 31 ? "," : "")); }
+ printf("};\n");
+ */
-+
#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;
@@ -1243,10 +1242,6 @@ diff -ruN a52dec.orig/liba52.orig/imdct.c a52dec/liba52/imdct.c
} else
#endif
{
-- fprintf (stderr, "No accelerated IMDCT transform found\n");
- ifft128 = ifft128_c;
- ifft64 = ifft64_c;
- }
diff -ruN a52dec.orig/liba52.orig/imdct_lookups.h a52dec/liba52/imdct_lookups.h
--- a52dec.orig/liba52/imdct_lookups.h 1970-01-01 01:00:00.000000000 +0100
+++ a52dec/liba52/imdct_lookups.h 2008-07-23 14:03:02.000000000 +0200
--
1.7.5.4
More information about the vlc-devel
mailing list