[FFmpeg-soc] [soc]: r3727 - eac3/ffmpeg.patch

jbr subversion at mplayerhq.hu
Mon Sep 8 02:55:37 CEST 2008


Author: jbr
Date: Mon Sep  8 02:55:37 2008
New Revision: 3727

Log:
add spectral extension attenuation table

Modified:
   eac3/ffmpeg.patch

Modified: eac3/ffmpeg.patch
==============================================================================
--- eac3/ffmpeg.patch	(original)
+++ eac3/ffmpeg.patch	Mon Sep  8 02:55:37 2008
@@ -65,7 +65,7 @@ Index: libavcodec/ac3dec_data.c
 ===================================================================
 --- libavcodec/ac3dec_data.c	(revision 15141)
 +++ libavcodec/ac3dec_data.c	(working copy)
-@@ -1128,6 +1128,12 @@
+@@ -1128,6 +1128,51 @@
  { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 };
  
  /**
@@ -75,6 +75,45 @@ Index: libavcodec/ac3dec_data.c
 +{ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 };
 +
 +/**
++ * Table E.25: Spectral Extension Attenuation Table
++ * spx_attenuation_tab[code][bin]=lrint(pow(1<<(bin+1),(code+1)/-15.0)*(1<<23));
++ */
++const int32_t ff_eac3_spx_atten_tab[32][3] = {
++    { 8009792, 7648083, 7302707 },
++    { 7648083, 6972929, 6357376 },
++    { 7302707, 6357376, 5534417 },
++    { 6972929, 5796163, 4817990 },
++    { 6658043, 5284492, 4194304 },
++    { 6357376, 4817990, 3651354 },
++    { 6070287, 4392670, 3178688 },
++    { 5796163, 4004896, 2767209 },
++    { 5534417, 3651354, 2408995 },
++    { 5284492, 3329021, 2097152 },
++    { 5045853, 3035144, 1825677 },
++    { 4817990, 2767209, 1589344 },
++    { 4600417, 2522926, 1383604 },
++    { 4392670, 2300209, 1204498 },
++    { 4194304, 2097152, 1048576 },
++    { 4004896, 1912021,  912838 },
++    { 3824041, 1743232,  794672 },
++    { 3651354, 1589344,  691802 },
++    { 3486464, 1449041,  602249 },
++    { 3329021, 1321123,  524288 },
++    { 3178688, 1204498,  456419 },
++    { 3035144, 1098167,  397336 },
++    { 2898081, 1001224,  345901 },
++    { 2767209,  912838,  301124 },
++    { 2642246,  832255,  262144 },
++    { 2522926,  758786,  228210 },
++    { 2408995,  691802,  198668 },
++    { 2300209,  630732,  172951 },
++    { 2196335,  575052,  150562 },
++    { 2097152,  524288,  131072 },
++    { 2002448,  478005,  114105 },
++    { 1912021,  435808,   99334 }
++};
++
++/**
   * Table of bin locations for rematrixing bands
   * reference: Section 7.5.2 Rematrixing : Frequency Band Definitions
   */
@@ -82,11 +121,12 @@ Index: libavcodec/ac3dec_data.h
 ===================================================================
 --- libavcodec/ac3dec_data.h	(revision 15141)
 +++ libavcodec/ac3dec_data.h	(working copy)
-@@ -34,6 +34,7 @@
+@@ -34,6 +34,8 @@
  extern const int16_t (*ff_eac3_mantissa_vq[8])[6];
  extern const uint8_t ff_eac3_frm_expstr[32][6];
  extern const uint8_t ff_eac3_default_cpl_band_struct[18];
 +extern const uint8_t ff_eac3_default_spx_band_struct[17];
++extern const int32_t ff_eac3_spx_atten_tab[32][3];
  
  extern const uint8_t ff_ac3_rematrix_band_tab[5];
  



More information about the FFmpeg-soc mailing list