[FFmpeg-soc] [soc]: r1924 - in eac3: ac3dec.c checkout.sh ffmpeg.patch

jbr subversion at mplayerhq.hu
Sun Feb 24 22:28:35 CET 2008


Author: jbr
Date: Sun Feb 24 22:28:34 2008
New Revision: 1924

Log:
update eac3 decoder to work with ffmpeg-svn r12191

Modified:
   eac3/ac3dec.c
   eac3/checkout.sh
   eac3/ffmpeg.patch

Modified: eac3/ac3dec.c
==============================================================================
--- eac3/ac3dec.c	(original)
+++ eac3/ac3dec.c	Sun Feb 24 22:28:34 2008
@@ -120,30 +120,6 @@ static const uint8_t ac3_default_coeffs[
 };
 
 /**
- * Generate a Kaiser-Bessel Derived Window.
- */
-static void ac3_window_init(float *window)
-{
-   int i, j;
-   double sum = 0.0, bessel, tmp;
-   double local_window[256];
-   double alpha2 = (5.0 * M_PI / 256.0) * (5.0 * M_PI / 256.0);
-
-   for (i = 0; i < 256; i++) {
-       tmp = i * (256 - i) * alpha2;
-       bessel = 1.0;
-       for (j = 100; j > 0; j--) /* default to 100 iterations */
-           bessel = bessel * tmp / (j * j) + 1;
-       sum += bessel;
-       local_window[i] = sum;
-   }
-
-   sum++;
-   for (i = 0; i < 256; i++)
-       window[i] = sqrt(local_window[i] / sum);
-}
-
-/**
  * Symmetrical Dequantization
  * reference: Section 7.3.3 Expansion of Mantissas for Symmetrical Quantization
  *            Tables 7.19 to 7.23
@@ -225,7 +201,7 @@ static int ac3_decode_init(AVCodecContex
     ff_eac3_tables_init();
     ff_mdct_init(&s->imdct_256, 8, 1);
     ff_mdct_init(&s->imdct_512, 9, 1);
-    ac3_window_init(s->window);
+    ff_kbd_window_init(s->window, 5.0, 256);
     dsputil_init(&s->dsp, avctx);
     av_init_random(0, &s->dith_state);
 

Modified: eac3/checkout.sh
==============================================================================
--- eac3/checkout.sh	(original)
+++ eac3/checkout.sh	Sun Feb 24 22:28:34 2008
@@ -4,7 +4,7 @@ echo "checking out ffmpeg svn"
 for i in $FILES Makefile ac3_parser.c ac3enc.c ac3.c ac3.h; do
     rm -f ffmpeg/libavcodec/$i
 done
-svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpeg -r 11483
+svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk/ ffmpeg -r 12191
 echo "patching ffmpeg"
 cd ffmpeg
 patch -p0 <../ffmpeg.patch

Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch	(original)
+++ eac3/ffmpeg.patch	Sun Feb 24 22:28:34 2008
@@ -1,6 +1,6 @@
 Index: libavcodec/Makefile
 ===================================================================
---- libavcodec/Makefile	(revision 11483)
+--- libavcodec/Makefile	(revision 12191)
 +++ libavcodec/Makefile	(working copy)
 @@ -33,7 +33,7 @@
  HEADERS = avcodec.h opt.h
@@ -13,7 +13,7 @@ Index: libavcodec/Makefile
  OBJS-$(CONFIG_AMV_DECODER)             += sp5xdec.o mjpegdec.o mjpeg.o
 Index: libavcodec/ac3_parser.c
 ===================================================================
---- libavcodec/ac3_parser.c	(revision 11483)
+--- libavcodec/ac3_parser.c	(revision 12191)
 +++ libavcodec/ac3_parser.c	(working copy)
 @@ -38,7 +38,6 @@
  {
@@ -63,7 +63,7 @@ Index: libavcodec/ac3_parser.c
  
 Index: libavcodec/ac3.c
 ===================================================================
---- libavcodec/ac3.c	(revision 11483)
+--- libavcodec/ac3.c	(revision 12191)
 +++ libavcodec/ac3.c	(working copy)
 @@ -173,7 +173,8 @@
  }
@@ -96,7 +96,7 @@ Index: libavcodec/ac3.c
  /**
 Index: libavcodec/ac3.h
 ===================================================================
---- libavcodec/ac3.h	(revision 11483)
+--- libavcodec/ac3.h	(revision 12191)
 +++ libavcodec/ac3.h	(working copy)
 @@ -94,6 +94,7 @@
      uint32_t bit_rate;
@@ -122,9 +122,9 @@ Index: libavcodec/ac3.h
                                     int8_t *exp, int start, int end,
 Index: libavcodec/ac3enc.c
 ===================================================================
---- libavcodec/ac3enc.c	(revision 11483)
+--- libavcodec/ac3enc.c	(revision 12191)
 +++ libavcodec/ac3enc.c	(working copy)
-@@ -479,7 +479,8 @@
+@@ -463,7 +463,8 @@
          for(ch=0;ch<s->nb_all_channels;ch++) {
              ff_ac3_bit_alloc_calc_bap(mask[i][ch], psd[i][ch], 0,
                                        s->nb_coefs[ch], snr_offset,



More information about the FFmpeg-soc mailing list