diff options
author | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-03-30 22:09:14 +0000 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-03-30 22:09:14 +0000 |
commit | ca6e7708b42e7d33ba3053bcd447d52a077bca25 (patch) | |
tree | 7d7b95250ce17fbfb3cd66a8be480af5825e58c8 /libavcodec/eac3dec_data.c | |
parent | 1052b76f0f4142942f0fc2481a4e377a6839b954 (diff) | |
download | ffmpeg-ca6e7708b42e7d33ba3053bcd447d52a077bca25.tar.gz |
Add spectral extension to the E-AC-3 decoder.
Original patch by Justin, updated and resubmitted by
Christophe Gisquet, christophe D gisquet A gmail
Originally committed as revision 22734 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/eac3dec_data.c')
-rw-r--r-- | libavcodec/eac3dec_data.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/libavcodec/eac3dec_data.c b/libavcodec/eac3dec_data.c index 6c6a551804..9e9f8a254b 100644 --- a/libavcodec/eac3dec_data.c +++ b/libavcodec/eac3dec_data.c @@ -1093,3 +1093,42 @@ const uint8_t ff_eac3_frm_expstr[32][6] = { { EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D25, EXP_REUSE}, { EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45, EXP_D45}, }; + +/** + * Table E.25: Spectral Extension Attenuation Table + * ff_eac3_spx_atten_tab[code][bin]=pow(2.0,(bin+1)*(code+1)/-15.0); + */ +const float ff_eac3_spx_atten_tab[32][3] = { + { 0.954841603910416503f, 0.911722488558216804f, 0.870550563296124125f }, + { 0.911722488558216804f, 0.831237896142787758f, 0.757858283255198995f }, + { 0.870550563296124125f, 0.757858283255198995f, 0.659753955386447100f }, + { 0.831237896142787758f, 0.690956439983888004f, 0.574349177498517438f }, + { 0.793700525984099792f, 0.629960524947436595f, 0.500000000000000000f }, + { 0.757858283255198995f, 0.574349177498517438f, 0.435275281648062062f }, + { 0.723634618720189082f, 0.523647061410313364f, 0.378929141627599553f }, + { 0.690956439983888004f, 0.477420801955208307f, 0.329876977693223550f }, + { 0.659753955386447100f, 0.435275281648062062f, 0.287174588749258719f }, + { 0.629960524947436595f, 0.396850262992049896f, 0.250000000000000000f }, + { 0.601512518041058319f, 0.361817309360094541f, 0.217637640824031003f }, + { 0.574349177498517438f, 0.329876977693223550f, 0.189464570813799776f }, + { 0.548412489847312945f, 0.300756259020529160f, 0.164938488846611775f }, + { 0.523647061410313364f, 0.274206244923656473f, 0.143587294374629387f }, + { 0.500000000000000000f, 0.250000000000000000f, 0.125000000000000000f }, + { 0.477420801955208307f, 0.227930622139554201f, 0.108818820412015502f }, + { 0.455861244279108402f, 0.207809474035696939f, 0.094732285406899888f }, + { 0.435275281648062062f, 0.189464570813799776f, 0.082469244423305887f }, + { 0.415618948071393879f, 0.172739109995972029f, 0.071793647187314694f }, + { 0.396850262992049896f, 0.157490131236859149f, 0.062500000000000000f }, + { 0.378929141627599553f, 0.143587294374629387f, 0.054409410206007751f }, + { 0.361817309360094541f, 0.130911765352578369f, 0.047366142703449930f }, + { 0.345478219991944002f, 0.119355200488802049f, 0.041234622211652958f }, + { 0.329876977693223550f, 0.108818820412015502f, 0.035896823593657347f }, + { 0.314980262473718298f, 0.099212565748012460f, 0.031250000000000000f }, + { 0.300756259020529160f, 0.090454327340023621f, 0.027204705103003875f }, + { 0.287174588749258719f, 0.082469244423305887f, 0.023683071351724965f }, + { 0.274206244923656473f, 0.075189064755132290f, 0.020617311105826479f }, + { 0.261823530705156682f, 0.068551561230914118f, 0.017948411796828673f }, + { 0.250000000000000000f, 0.062500000000000000f, 0.015625000000000000f }, + { 0.238710400977604098f, 0.056982655534888536f, 0.013602352551501938f }, + { 0.227930622139554201f, 0.051952368508924235f, 0.011841535675862483f } +}; |