From 941e237aff74f94859741d6088ce0fc85d3a4fadba0daa381b7e1ee7707105f1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Apr 2007 21:19:21 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvorbis?expand=0&rev=3 --- libvorbis-1.1.2-aotuv-b5.diff | 3465 ++++++++++++++++++++++++++++ libvorbis-1.1.2-warning-fixes.diff | 43 +- libvorbis.changes | 12 + libvorbis.spec | 16 +- 4 files changed, 3507 insertions(+), 29 deletions(-) create mode 100644 libvorbis-1.1.2-aotuv-b5.diff diff --git a/libvorbis-1.1.2-aotuv-b5.diff b/libvorbis-1.1.2-aotuv-b5.diff new file mode 100644 index 0000000..1a0784a --- /dev/null +++ b/libvorbis-1.1.2-aotuv-b5.diff @@ -0,0 +1,3465 @@ +--- lib/block.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/block.c 2007-04-23 17:54:23.000000000 +0200 +@@ -106,7 +106,7 @@ int vorbis_block_init(vorbis_dsp_state * + oggpack_writeinit(vbi->packetblob[i]); + } + } +- ++ + return(0); + } + +@@ -287,6 +287,11 @@ int vorbis_analysis_init(vorbis_dsp_stat + b=v->backend_state; + b->psy_g_look=_vp_global_look(vi); + ++ /* added by aoyumi */ ++ b->nblock = _ogg_calloc((128*vi->channels), sizeof(*b->nblock)); ++ b->tblock = _ogg_calloc((128*vi->channels), sizeof(*b->tblock)); ++ b->lownoise_compand_level = _ogg_calloc(vi->channels, sizeof(*b->lownoise_compand_level)); ++ + /* Initialize the envelope state storage */ + b->ve=_ogg_calloc(1,sizeof(*b->ve)); + _ve_envelope_init(b->ve,vi); +@@ -348,6 +353,11 @@ void vorbis_dsp_clear(vorbis_dsp_state * + + drft_clear(&b->fft_look[0]); + drft_clear(&b->fft_look[1]); ++ ++ /* added by aoyumi */ ++ if(b->nblock) _ogg_free(b->nblock); ++ if(b->tblock) _ogg_free(b->tblock); ++ if(b->lownoise_compand_level) _ogg_free(b->lownoise_compand_level); + + } + +--- lib/modes/setup_X.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_X.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,13 +15,14 @@ + + ********************************************************************/ + +-static double rate_mapping_X[12]={ +- -1.,-1.,-1.,-1.,-1.,-1., ++static double rate_mapping_X[13]={ ++ -1.,-1.,-1.,-1.,-1.,-1.,-1. + -1.,-1.,-1.,-1.,-1.,-1. + }; + + ve_setup_data_template ve_setup_X_stereo={ +- 11, ++// 11, ++ 12, + rate_mapping_X, + quality_mapping_44, + 2, +@@ -72,7 +73,8 @@ ve_setup_data_template ve_setup_X_stereo + }; + + ve_setup_data_template ve_setup_X_uncoupled={ +- 11, ++// 11, ++ 12, + rate_mapping_X, + quality_mapping_44, + -1, +@@ -123,7 +125,8 @@ ve_setup_data_template ve_setup_X_uncoup + }; + + ve_setup_data_template ve_setup_XX_stereo={ +- 2, ++// 2, ++ 3, + rate_mapping_X, + quality_mapping_8, + 2, +@@ -174,7 +177,8 @@ ve_setup_data_template ve_setup_XX_stere + }; + + ve_setup_data_template ve_setup_XX_uncoupled={ +- 2, ++// 2, ++ 3, + rate_mapping_X, + quality_mapping_8, + -1, +--- lib/modes/psych_16.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/psych_16.h 2007-04-23 17:54:23.000000000 +0200 +@@ -16,9 +16,13 @@ + ********************************************************************/ + + /* stereo mode by base quality level */ +-static adj_stereo _psy_stereo_modes_16[4]={ ++static adj_stereo _psy_stereo_modes_16[5]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, ++ { 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4}, ++ { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, ++ {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +@@ -36,32 +40,38 @@ static adj_stereo _psy_stereo_modes_16[4 + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + }; + +-static double _psy_lowpass_16[4]={6.5,8,30.,99.}; ++static double _psy_lowpass_16[5]={6.,6.5,8,30.,99.}; + +-static att3 _psy_tone_masteratt_16[4]={ +- {{ 30, 25, 12}, 0, 0}, /* 0 */ +- {{ 25, 22, 12}, 0, 0}, /* 0 */ +- {{ 20, 12, 0}, 0, 0}, /* 0 */ +- {{ 15, 0, -14}, 0, 0}, /* 0 */ ++static att3 _psy_tone_masteratt_16[5]={ ++ {{ 30, 28, 12}, 0, 0}, /* -2 */ ++ {{ 30, 28, 12}, 0, 0}, /* -1 */ ++ {{ 25, 23, 12}, 0, 0}, /* 0.5 */ ++ {{ 20, 12, 0}, 0, 0}, /* 5 */ ++ {{ 15, 0, -14}, 0, 0}, /* 10 */ + }; + +-static vp_adjblock _vp_tonemask_adj_16[4]={ ++static vp_adjblock _vp_tonemask_adj_16[5]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ +- {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ ++ {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -2 */ ++ {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -1 */ ++ {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-4, 0, 0, 0, 0, 0, 0, 0}}, /* 0.5 */ ++ {{-20,-20,-20,-20,-20,-16,-10,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /* 5 */ ++ {{-30,-30,-30,-30,-30,-26,-20,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /* 10 */ + }; + + +-static noise3 _psy_noisebias_16_short[4]={ ++static noise3 _psy_noisebias_16_short[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +- {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, ++ {-12,-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 5, 6, 7, 8, 8, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, ++ ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +- {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 6, 6, 6, 6, 8, 10, 12, 20}, ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 6, 6, 6, 6, 8, 10, 12, 20}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +@@ -74,13 +84,17 @@ static noise3 _psy_noisebias_16_short[4] + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +-static noise3 _psy_noisebias_16_impulse[4]={ ++static noise3 _psy_noisebias_16_impulse[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +- {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, ++ {-12,-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 5, 6, 7, 8, 8, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, ++ ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +- {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 4, 4, 4, 5, 5, 6, 8, 15}, ++ {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 4, 4, 4, 5, 5, 6, 8, 15}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 0, 0, 0, 0, 4, 10}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +@@ -93,9 +107,13 @@ static noise3 _psy_noisebias_16_impulse[ + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +-static noise3 _psy_noisebias_16[4]={ ++static noise3 _psy_noisebias_16[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, ++ {-10,-10,-10,-10,-10, -5, -2, -2, 2, 2, 2, 4, 5, 6, 8, 8, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, ++ ++ {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, + {-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +@@ -112,17 +130,17 @@ static noise3 _psy_noisebias_16[4]={ + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +-static double _noise_thresh_16[4]={ .3,.5,.5,.5 }; ++static double _noise_thresh_16[5]={ .3,.3,.5,.5,.5 }; + +-static int _noise_start_16[3]={ 256,256,9999 }; +-static int _noise_part_16[4]={ 8,8,8,8 }; ++static int _noise_start_16[4]={ 256,256,256,9999 }; ++static int _noise_part_16[5]={ 8,8,8,8,8 }; + +-static int _psy_ath_floater_16[4]={ +- -100,-100,-100,-105, ++static int _psy_ath_floater_16[5]={ ++ -100,-100,-100,-100,-105, + }; + +-static int _psy_ath_abs_16[4]={ +- -130,-130,-130,-140, ++static int _psy_ath_abs_16[5]={ ++ -130,-130,-130,-130,-140, + }; + + +--- lib/modes/psych_11.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/psych_11.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,25 +15,31 @@ + + ********************************************************************/ + +-static double _psy_lowpass_11[3]={4.5,5.5,30.,}; ++static double _psy_lowpass_11[4]={4.1,4.5,5.5,30.,}; + +-static att3 _psy_tone_masteratt_11[3]={ +- {{ 30, 25, 12}, 0, 0}, /* 0 */ +- {{ 30, 25, 12}, 0, 0}, /* 0 */ +- {{ 20, 0, -14}, 0, 0}, /* 0 */ ++static att3 _psy_tone_masteratt_11[4]={ ++ {{ 31, 28, 13}, 0, 0}, /* -2 */ ++ {{ 30, 28, 12}, 0, 0}, /* -1 */ ++ {{ 30, 26, 12}, 0, 0}, /* 0 */ ++ {{ 20, 0, -14}, 0, 0}, /* 10 */ + }; + +-static vp_adjblock _vp_tonemask_adj_11[3]={ ++static vp_adjblock _vp_tonemask_adj_11[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */ +- {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */ ++ {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 3, 3,99,99,99}}, /* -2 */ ++ {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */ ++ {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /* 0 */ ++ {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /* 10 */ + }; + + +-static noise3 _psy_noisebias_11[3]={ ++static noise3 _psy_noisebias_11[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ ++ {{{-10,-10,-10,-10, -5, -5, -4, 2, 4, 10, 10, 12, 12, 12, 99, 99, 99}, ++ {-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 4, 5, 6, 12, 99, 99, 99}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, ++ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, + {-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +@@ -47,5 +53,5 @@ static noise3 _psy_noisebias_11[3]={ + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, + }; + +-static double _noise_thresh_11[3]={ .3,.5,.5 }; ++static double _noise_thresh_11[4]={ .3,.3,.5,.5 }; + +--- lib/modes/setup_32.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_32.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,22 +15,26 @@ + + ********************************************************************/ + +-static double rate_mapping_32[12]={ +- 18000.,28000.,35000.,45000.,56000.,60000., ++static double rate_mapping_32[13]={ ++// 18000.,28000.,35000.,45000.,56000.,60000., ++ 14000.,21000.,28000.,35000.,45000.,56000.,60000., + 75000.,90000.,100000.,115000.,150000.,190000., + }; + +-static double rate_mapping_32_un[12]={ +- 30000.,42000.,52000.,64000.,72000.,78000., ++static double rate_mapping_32_un[13]={ ++// 30000.,42000.,52000.,64000.,72000.,78000., ++ 26000.,32000.,42000.,52000.,64000.,72000.,78000., + 86000.,92000.,110000.,120000.,140000.,190000., + }; + +-static double _psy_lowpass_32[12]={ +- 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. ++static double _psy_lowpass_32[13]={ ++// 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. ++ 12.1,12.6,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. + }; + + ve_setup_data_template ve_setup_32_stereo={ +- 11, ++// 11, ++ 12, + rate_mapping_32, + quality_mapping_44, + 2, +@@ -59,7 +63,7 @@ ve_setup_data_template ve_setup_32_stere + _psy_compand_short_mapping, + _psy_compand_long_mapping, + +- {_noise_start_short_44,_noise_start_long_44}, ++ {_noise_start_short_32,_noise_start_long_32}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + +@@ -81,7 +85,8 @@ ve_setup_data_template ve_setup_32_stere + }; + + ve_setup_data_template ve_setup_32_uncoupled={ +- 11, ++// 11, ++ 12, + rate_mapping_32_un, + quality_mapping_44, + -1, +@@ -110,7 +115,7 @@ ve_setup_data_template ve_setup_32_uncou + _psy_compand_short_mapping, + _psy_compand_long_mapping, + +- {_noise_start_short_44,_noise_start_long_44}, ++ {_noise_start_short_32,_noise_start_long_32}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + +--- lib/modes/residue_44u.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/residue_44u.h 2007-04-23 17:54:23.000000000 +0200 +@@ -304,6 +304,7 @@ static vorbis_residue_template _res_44u_ + }; + + static vorbis_mapping_template _mapres_template_44_uncoupled[]={ ++ { _map_nominal_u, _res_44u_n1 }, /* -2 */ + { _map_nominal_u, _res_44u_n1 }, /* -1 */ + { _map_nominal_u, _res_44u_0 }, /* 0 */ + { _map_nominal_u, _res_44u_1 }, /* 1 */ +--- lib/modes/psych_8.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/psych_8.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,23 +15,29 @@ + + ********************************************************************/ + +-static att3 _psy_tone_masteratt_8[3]={ +- {{ 32, 25, 12}, 0, 0}, /* 0 */ +- {{ 30, 25, 12}, 0, 0}, /* 0 */ +- {{ 20, 0, -14}, 0, 0}, /* 0 */ ++static att3 _psy_tone_masteratt_8[4]={ ++ {{ 33, 28, 13}, 0, 0}, /* -2 */ ++ {{ 32, 28, 12}, 0, 0}, /* -1 */ ++ {{ 30, 26, 12}, 0, 0}, /* 0 */ ++ {{ 20, 0, -14}, 0, 0}, /* 10 */ + }; + +-static vp_adjblock _vp_tonemask_adj_8[3]={ ++static vp_adjblock _vp_tonemask_adj_8[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +- {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ +- {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ +- {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */ ++ {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 3, 3,99,99,99}}, /* -2 */ ++ {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */ ++ {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 0 */ ++ {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 10 */ + }; + + +-static noise3 _psy_noisebias_8[3]={ ++static noise3 _psy_noisebias_8[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ ++ {{{-10,-10,-10,-10, -5, -5, -5, 3, 4, 8, 8, 8, 10, 10, 99, 99, 99}, ++ {-10,-10,-10,-10, -5, -2, -2, 3, 3, 4, 4, 5, 6, 8, 99, 99, 99}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, ++ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, + {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +@@ -46,9 +52,13 @@ static noise3 _psy_noisebias_8[3]={ + }; + + /* stereo mode by base quality level */ +-static adj_stereo _psy_stereo_modes_8[3]={ ++static adj_stereo _psy_stereo_modes_8[4]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, ++ { 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4}, ++ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, ++ {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +@@ -62,12 +72,20 @@ static adj_stereo _psy_stereo_modes_8[3] + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + }; + +-static noiseguard _psy_noiseguards_8[2]={ ++static noiseguard _psy_noiseguards_8[3]={ ++ {10,10,-1}, + {10,10,-1}, + {10,10,-1}, + }; + +-static compandblock _psy_compand_8[2]={ ++static compandblock _psy_compand_8[3]={ ++ {{ ++ 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ ++ 8, 8, 9, 9,10,10,11, 11, /* 15dB */ ++ 12,12,13,13,14,14,15, 16, /* 23dB */ ++ 17,18,19,20,21,22,23, 24, /* 31dB */ ++ 25,26,27,28,29,30,31, 32, /* 39dB */ ++ }}, + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ + 8, 8, 9, 9,10,10,11, 11, /* 15dB */ +@@ -84,19 +102,19 @@ static compandblock _psy_compand_8[2]={ + }}, + }; + +-static double _psy_lowpass_8[3]={3.,4.,4.}; +-static int _noise_start_8[2]={ +- 64,64, ++static double _psy_lowpass_8[4]={2.6,3.,4.,4.}; ++static int _noise_start_8[3]={ ++ 64,64,64, + }; +-static int _noise_part_8[2]={ +- 8,8, ++static int _noise_part_8[3]={ ++ 8,8,8, + }; + +-static int _psy_ath_floater_8[3]={ +- -100,-100,-105, ++static int _psy_ath_floater_8[4]={ ++ -100,-100,-100,-105, + }; + +-static int _psy_ath_abs_8[3]={ +- -130,-130,-140, ++static int _psy_ath_abs_8[4]={ ++ -130,-130,-130,-140, + }; + +--- lib/modes/setup_16.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_16.h 2007-04-23 17:54:23.000000000 +0200 +@@ -18,36 +18,40 @@ + #include "psych_16.h" + #include "residue_16.h" + +-static int blocksize_16_short[3]={ +- 1024,512,512 ++static int blocksize_16_short[4]={ ++ 1024,1024,512,512 + }; +-static int blocksize_16_long[3]={ +- 1024,1024,1024 ++static int blocksize_16_long[4]={ ++ 1024,1024,1024,1024 + }; + +-static int _floor_mapping_16_short[3]={ +- 9,3,3 ++static int _floor_mapping_16_short[4]={ ++ 9,9,3,3 + }; +-static int _floor_mapping_16[3]={ +- 9,9,9 ++static int _floor_mapping_16[4]={ ++ 9,9,9,9 + }; + +-static double rate_mapping_16[4]={ +- 12000.,20000.,44000.,86000. ++static double rate_mapping_16[5]={ ++// 12000.,20000.,44000.,86000. ++ 10000.,12000.,20000.,44000.,86000. + }; + +-static double rate_mapping_16_uncoupled[4]={ +- 16000.,28000.,64000.,100000. ++static double rate_mapping_16_uncoupled[5]={ ++// 16000.,28000.,64000.,100000. ++ 16000.,18000.,28000.,64000.,100000. + }; + +-static double _global_mapping_16[4]={ 1., 2., 3., 4. }; ++static double _global_mapping_16[5]={ 2., 2., 3., 4., 5. }; + +-static double quality_mapping_16[4]={ -.1,.05,.5,1. }; ++static double quality_mapping_16[5]={ -.2,-.1,.05,.5,1. }; + +-static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.}; ++//static double _psy_compand_16_mapping[5]={ 0., 0., .8, 1., 1.}; ++static double _psy_compand_16_mapping[5]={ 0., 1., 1.8, 2., 2.}; + + ve_setup_data_template ve_setup_16_stereo={ +- 3, ++// 3, ++ 4, + rate_mapping_16, + quality_mapping_16, + 2, +@@ -98,7 +102,8 @@ ve_setup_data_template ve_setup_16_stere + }; + + ve_setup_data_template ve_setup_16_uncoupled={ +- 3, ++// 3, ++ 4, + rate_mapping_16_uncoupled, + quality_mapping_16, + -1, +--- lib/modes/setup_11.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_11.h 2007-04-23 17:54:23.000000000 +0200 +@@ -17,28 +17,31 @@ + + #include "psych_11.h" + +-static int blocksize_11[2]={ +- 512,512 ++static int blocksize_11[3]={ ++ 512,512,512 + }; + +-static int _floor_mapping_11[2]={ +- 6,6, ++static int _floor_mapping_11[3]={ ++ 6,6,6 + }; + +-static double rate_mapping_11[3]={ +- 8000.,13000.,44000., ++static double rate_mapping_11[4]={ ++// 8000.,13000.,44000., ++ 8000.,10000.,13000.,44000., + }; + +-static double rate_mapping_11_uncoupled[3]={ +- 12000.,20000.,50000., ++static double rate_mapping_11_uncoupled[4]={ ++// 12000.,20000.,50000., ++ 14000.,16000.,20000.,50000., + }; + +-static double quality_mapping_11[3]={ +- -.1,.0,1. ++static double quality_mapping_11[4]={ ++ -.2,-.1,.0,1. + }; + + ve_setup_data_template ve_setup_11_stereo={ +- 2, ++// 2, ++ 3, + rate_mapping_11, + quality_mapping_11, + 2, +@@ -89,7 +92,8 @@ ve_setup_data_template ve_setup_11_stere + }; + + ve_setup_data_template ve_setup_11_uncoupled={ +- 2, ++// 2, ++ 3, + rate_mapping_11_uncoupled, + quality_mapping_11, + -1, +--- lib/modes/residue_44.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/residue_44.h 2007-04-23 17:54:23.000000000 +0200 +@@ -278,6 +278,7 @@ static vorbis_residue_template _res_44s_ + }; + + static vorbis_mapping_template _mapres_template_44_stereo[]={ ++ { _map_nominal, _res_44s_n1 }, /* -2 */ + { _map_nominal, _res_44s_n1 }, /* -1 */ + { _map_nominal, _res_44s_0 }, /* 0 */ + { _map_nominal, _res_44s_1 }, /* 1 */ +--- lib/modes/setup_22.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_22.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,18 +15,21 @@ + + ********************************************************************/ + +-static double rate_mapping_22[4]={ +- 15000.,20000.,44000.,86000. ++static double rate_mapping_22[5]={ ++// 15000.,20000.,44000.,86000. ++ 14000.,16000.,20000.,44000.,86000. + }; + +-static double rate_mapping_22_uncoupled[4]={ +- 16000.,28000.,50000.,90000. ++static double rate_mapping_22_uncoupled[5]={ ++// 16000.,28000.,50000.,90000. ++ 22000.,24000.,28000.,50000.,90000. + }; + +-static double _psy_lowpass_22[4]={9.5,11.,30.,99.}; ++static double _psy_lowpass_22[5]={8.5,9.5,11.,30.,99.}; + + ve_setup_data_template ve_setup_22_stereo={ +- 3, ++// 3, ++ 4, + rate_mapping_22, + quality_mapping_16, + 2, +@@ -77,7 +80,8 @@ ve_setup_data_template ve_setup_22_stere + }; + + ve_setup_data_template ve_setup_22_uncoupled={ +- 3, ++// 3, ++ 4, + rate_mapping_22_uncoupled, + quality_mapping_16, + -1, +--- lib/modes/psych_44.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/psych_44.h 2007-04-23 17:54:23.000000000 +0200 +@@ -18,10 +18,26 @@ + + /* preecho trigger settings *****************************************/ + +-static vorbis_info_psy_global _psy_global_44[5]={ +- ++static vorbis_info_psy_global _psy_global_44[6]={ ++/* ++ { lines per eighth octave, ++ { pre-echo thresh.}, ++ { post-echo thresh.}, stretch penalty, pre-echo minimum energy, ++ ampmax att 1/sec, ++ {coupling point(kHz)},{{coupling point limit0},{coupling point limit1}}, ++ {coupling pre-point amp},{coupling post-point amp},{{sliding lowpass0},{sliding lowpass1}} ++ }, ++*/ ++/* q-2 */ ++ {8, /* lines per eighth octave */ ++ {24.f,16.f,16.f,16.f,16.f,16.f,14.f}, ++ {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, ++ -6.f, ++ {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} ++ }, + {8, /* lines per eighth octave */ +- {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, ++// {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, ++ {20.f,14.f,14.f,14.f,14.f,14.f,14.f}, + {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} +@@ -39,14 +55,17 @@ static vorbis_info_psy_global _psy_globa + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +- {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, ++// {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, ++ {8.f,8.f,8.f,6.f,6.f,6.f,7.f}, + {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +- {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, +- {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, ++// {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, ++ {6.f,6.f,6.f,6.f,6.f,6.f,6.f}, ++// {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, ++ {-15.f,-14.f,-10.f,-10.f,-10.f,-11.f,-12.f}, 0,-85.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, +@@ -56,26 +75,41 @@ static vorbis_info_psy_global _psy_globa + static compandblock _psy_compand_44[6]={ + /* sub-mode Z short */ + {{ +- 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +- 8, 9,10,11,12,13,14, 15, /* 15dB */ +- 16,17,18,19,20,21,22, 23, /* 23dB */ +- 24,25,26,27,28,29,30, 31, /* 31dB */ +- 32,33,34,35,36,37,38, 39, /* 39dB */ ++// 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ ++// 8, 9,10,11,12,13,14, 15, /* 15dB */ ++// 16,17,18,19,20,21,22, 23, /* 23dB */ ++// 24,25,26,27,28,29,30, 31, /* 31dB */ ++// 32,33,34,35,36,37,38, 39, /* 39dB */ ++ 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ ++ 7, 7, 7, 8, 9,10, 11, 11, /* 15dB */ ++ 12,12,13,13,14,14,15, 15, /* 23dB */ ++ 16,16,17,17,17,18,18, 19, /* 31dB */ ++ 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode_Z nominal short */ + {{ ++// 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ ++// 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ ++// 7, 8, 9,10,11,12,13, 14, /* 23dB */ ++// 15,16,17,17,17,18,18, 19, /* 31dB */ ++// 19,19,20,21,22,23,24, 25, /* 39dB */ + 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +- 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ ++ 7, 7, 7, 7, 7, 7, 7, 7, /* 15dB */ + 7, 8, 9,10,11,12,13, 14, /* 23dB */ + 15,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode A short */ + {{ ++// 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ ++// 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ ++// 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ ++// 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++// 11,12,13,14,15,16,17, 18, /* 39dB */ + 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ +- 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ +- 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ +- 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++ 6, 6, 6, 6, 6, 6, 6, 6, /* 15dB */ ++ 6, 6, 6, 6, 6, 7, 7, 7, /* 23dB */ ++ 8, 8, 8, 9, 9, 9,10, 11, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }}, + /* sub-mode Z long */ +@@ -96,172 +130,189 @@ static compandblock _psy_compand_44[6]={ + }}, + /* mode A long */ + {{ ++// 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ ++// 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ ++// 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ ++// 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++// 11,12,13,14,15,16,17, 18, /* 39dB */ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +- 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ +- 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ +- 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++ 7, 7, 7, 6, 6, 6, 6, 6, /* 15dB */ ++ 6, 6, 6, 6, 6, 7, 7, 7, /* 23dB */ ++ 8, 8, 8, 9, 9, 9,10, 11, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }} + }; + + /* tonal masking curve level adjustments *************************/ + +-static vp_adjblock _vp_tonemask_adj_longblock[12]={ +- ++static vp_adjblock _vp_tonemask_adj_longblock[13]={ + /* 63 125 250 500 1 2 4 8 16 */ ++// {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1, 0, 0, 1, 1, 1}}, /* -2(addition) */ ++ {{-16,-16,-16,-15,-15,-15,-14,-14,-13,-13,-12,-12,-11, -5, 0, 0, 5}}, + +- {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */ +- ++// {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1, 0, 0, 0, 0}}, /* -1 */ ++ {{-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-13,-12, -7, -2, -2, 3}}, ++ + /* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ +- {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13, -8, -3, -3, 1}}, /* 0 */ + + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ +- {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10, -4, -4, 0}}, /* 1 */ + + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ +- {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -5, -5, 0}}, /* 2 */ ++ + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ +- {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1, 0}}, /* 3 */ +- +-/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//* 4 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -8, -7, 0}}, /* 3 */ ++ ++/* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 4 */ ++ + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 5 */ ++ + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 6 */ ++ + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 7 */ + + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 8 */ + + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11,-10,-10, 0}}, /* 9 */ + + /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11,-10,-10, 0}}, /* 10 */ + }; +- +-static vp_adjblock _vp_tonemask_adj_otherblock[12]={ ++static vp_adjblock _vp_tonemask_adj_otherblock[13]={ + /* 63 125 250 500 1 2 4 8 16 */ + +- {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */ ++// {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1, 0, 0, 1, 1, 1}}, /* -2(addition) */ ++ {{-16,-16,-16,-15,-15,-15,-14,-14,-13,-13,-12,-12,-11, -5, 0, 0, 5}}, + ++// {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1, 0, 0, 0, 0}}, /* -1 */ ++ {{-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-13,-12, -7, -2, -2, 3}}, ++ + /* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ +- {{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14, -8, -3, -3, 0}}, /* 0 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ +- {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-10, -4, -4, 0}}, /* 1 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ +- {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -6, -5, 0}}, /* 2 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ +- {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0, 0}}, /* 3 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -7, 0}}, /* 3 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 4 */ ++ + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 5 */ ++ + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ +- ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 6 */ ++ + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 7 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11, -9, -9, 0}}, /* 8 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11,-10,-10, 0}}, /* 9 */ + + /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ +- {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ ++ {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-11,-10,-10, 0}}, /* 10 */ + }; + + /* noise bias (transition block) */ +-static noise3 _psy_noisebias_trans[12]={ ++static noise3 _psy_noisebias_trans[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +- /* -1 */ ++ /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-28,-28,-26,-26,-22,-18,-16, -8, -2, 2, 2, 2, 2, 5, 6, 7, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, ++ /* -1 */ ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-10, -4, 0, 0, 0, 0, 2, 3, 4, 14}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +- /* 0 +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ /* 0 */ ++/*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +- {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3, 6}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, +- /* 1 +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 0, 1, 2, 3, 8}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, ++ /* 1 */ ++/*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, +- /* 2 +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, ++ {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, -1, 1, 4}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, ++ /* 2 */ ++/*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, ++ {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, +- /* 3 +- {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, ++ /* 3 */ ++/*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +- /* 4 +- {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, ++ /* 4 */ ++/*{{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +- /* 5 +- {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, ++ /* 5 */ ++/*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, +- /* 6 +- {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, ++ /* 6 */ ++/*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, + {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, +- {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, +- /* 7 +- {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -6, -6, -6, -6, -4, -2, 0}, ++ {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}}, ++ /* 7 */ ++/*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, +- {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, +- /* 8 +- {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14,-12,-10, -8, -8, -8, -6, -4, 0}, ++ {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, ++ /* 8 */ ++/*{{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, + {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, + {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ +- {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, +- {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, +- {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, +- /* 9 +- {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, ++ {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, ++ {-34,-34,-34,-34,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, ++ {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, ++ /* 9 */ ++/*{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +- {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10}, +- {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}}, ++ {-36,-36,-36,-36,-32,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, ++ {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, +@@ -269,65 +320,74 @@ static noise3 _psy_noisebias_trans[12]={ + }; + + /* noise bias (long block) */ +-static noise3 _psy_noisebias_long[12]={ +- /*63 125 250 500 1k 2k 4k 8k 16k*/ ++static noise3 _psy_noisebias_long[13]={ ++ /* 63 125 250 500 1k 2k 4k 8k 16k*/ ++ /* -2(addition mode) */ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 2, 6, 6, 6, 6, 10, 10, 12, 20}, ++ {-20,-20,-20,-20,-20,-18,-12, -6, 0, 2, 2, 2, 2, 5, 6, 7, 15}, ++ {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* -1 */ +- {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, +- {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, ++ {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, ++ {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, ++ {-20,-20,-20,-20,-20,-18,-12, -8, -2, 0, 0, 0, 0, 2, 3, 4, 14}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, +- + /* 0 */ +- /* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +- {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6}, ++/*{{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 1, 2, 3, 7}, + {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 1 */ +- /* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +- {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, ++/*{{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ ++ {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, -1, 1, 4}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, + /* 2 */ +- /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ +- {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, ++/*{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ ++ {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 3 */ +- /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ ++/*{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, + /* 4 */ +- /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ ++/*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, ++ {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, + /* 5 */ +- /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, +- {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ ++/*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, ++ {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, ++ {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}}, + /* 6 */ +- /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, +- {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ ++/*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, ++ {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, ++ {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, +- {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}}, ++ {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 0}, ++ {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}}, + /* 7 */ ++// {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, ++// {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, ++// {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +- {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, ++ {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + /* 8 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, +@@ -344,67 +404,85 @@ static noise3 _psy_noisebias_long[12]={ + }; + + /* noise bias (impulse block) */ +-static noise3 _psy_noisebias_impulse[12]={ ++static noise3 _psy_noisebias_impulse[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +- /* -1 */ ++ /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-28,-28,-26,-26,-22,-18,-16, -8, -2, 2, 2, 2, 3, 6, 7, 8, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, ++ /* -1 */ ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-10, -4, 0, 0, 0, 1, 4, 5, 6, 14}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +- + /* 0 */ +- /* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +- {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, +- {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +- {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6}, ++ {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 0, 1, 2, 3, 7}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 1 */ +- {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, ++/*{{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}},*/ ++ {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -2, -2, -2, -1, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}}, + /* 2 */ ++// {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, -2, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 3 */ ++// {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, -2, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 4 */ ++// {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, -2, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 5 */ +- {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, ++/*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, +- {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, +- /* 6 ++ {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +- {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, +- {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ ++ {-32,-32,-32,-32,-28,-24,-22,-16,-12, -8, -8, -8, -6, -6, -5, -4, -2}, ++ {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, ++ /* 6 */ ++/*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, ++ {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +- {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12}, +- {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-14,-14,-10, -9, -8, -6, -4}, ++ {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}}, + /* 7 */ +- /* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +- {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, +- {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ ++/*{{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, ++ {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +- {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, +- {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10,-10, -8}, ++ {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}}, + /* 8 */ +- /* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, +- {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, +- {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ + {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, +- {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, +- {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, ++ {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, ++ {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, + /* 9 */ +- /* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +- {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, +- {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ ++// {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, ++// {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, ++// {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +- {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26}, ++ {-36,-36,-36,-36,-32,-32,-32,-28,-24,-24,-24,-24,-24,-22,-20,-20,-18}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, +@@ -413,28 +491,36 @@ static noise3 _psy_noisebias_impulse[12] + }; + + /* noise bias (padding block) */ +-static noise3 _psy_noisebias_padding[12]={ ++static noise3 _psy_noisebias_padding[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +- +- /* -1 */ ++ /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, +- {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-28,-28,-26,-26,-22,-18,-16, -8, -2, 2, 2, 2, 3, 6, 7, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +- +- /* 0 */ ++ /* -1 */ ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-10, -4, 0, 0, 0, 1, 4, 5, 6, 14}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, ++ /* 0 */ ++/*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 0, 3, 3, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, + /* 1 */ + {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, + /* 2 */ +- /* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/ ++// {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, ++// {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 0, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, +@@ -453,16 +539,22 @@ static noise3 _psy_noisebias_padding[12] + {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4}, + {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}}, + /* 7 */ +- {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, ++/*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1}, ++ {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}},*/ ++ {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14,-10, -8, -6, -6, -6, -5, -3, 1}, + {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}}, + /* 8 */ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2}, + {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}}, + /* 9 */ ++// {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, ++// {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, ++// {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, +- {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, ++ {-36,-36,-36,-36,-32,-32,-32,-26,-18,-14,-12,-12,-12,-12,-10, -8, -5}, + {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8}, +@@ -478,14 +570,17 @@ static noiseguard _psy_noiseguards_44[4] + {10,10,100}, + }; + +-static int _psy_tone_suppress[12]={ +- -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, +-}; +-static int _psy_tone_0dB[12]={ +- 90,90,95,95,95,95,105,105,105,105,105,105, +-}; +-static int _psy_noise_suppress[12]={ +- -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, ++static int _psy_tone_suppress[13]={ ++/* -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, */ ++ -20,-20,-20,-20,-20,-20,-24,-30,-40,-40,-42,-45,-45, ++}; ++static int _psy_tone_0dB[13]={ ++/* 90,90,95,95,95,95,105,105,105,105,105,105, */ ++ 90,90,90,95,95,95,95,105,105,105,105,105,105, ++}; ++static int _psy_noise_suppress[13]={ ++/* -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, */ ++ -20,-20,-20,-24,-24,-24,-24,-30,-40,-40,-42,-45,-45, + }; + + static vorbis_info_psy _psy_info_template={ +@@ -506,11 +601,13 @@ static vorbis_info_psy _psy_info_templat + + /* ath ****************/ + +-static int _psy_ath_floater[12]={ +- -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, +-}; +-static int _psy_ath_abs[12]={ +- -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, ++static int _psy_ath_floater[13]={ ++/* -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, */ ++ -100,-100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, ++}; ++static int _psy_ath_abs[13]={ ++/* -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, */ ++ -130,-130,-130,-130,-130,-135,-140,-140,-140,-140,-140,-140,-150, + }; + + /* stereo setup. These don't map directly to quality level, there's +@@ -522,14 +619,22 @@ static int _psy_ath_abs[12]={ + /* various stereo possibilities */ + + /* stereo mode by base quality level */ +-static adj_stereo _psy_stereo_modes_44[12]={ +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ +- {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, ++static adj_stereo _psy_stereo_modes_44[13]={ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -2(addition mode) */ ++ {{ 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 5, 4, 3}, ++ { 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 7, 8, 8}, ++ { 10,10.5, 11,11.5, 12,12.5, 13, 99, 99, 99, 99, 99, 99, 99, 99}}, ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ ++/*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, ++ { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 5, 4, 3}, ++ { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +- +-/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ + /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8}, +@@ -538,76 +643,76 @@ static adj_stereo _psy_stereo_modes_44[1 + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +- +- +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ +- {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ ++/*{{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 6, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3}, ++ { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- +- +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ +- /* {{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, +- { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, +- { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, +- { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ ++/*{{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, ++ { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, ++ { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, + { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ + {{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ + {{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0}, + { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ +- /* {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, +- { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +- { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ +- {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ ++/*{{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, ++ { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0}, + { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ +- /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +- { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ ++/*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ +- /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +- { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ ++/*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ +- /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +- { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +- { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ ++/*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ ++ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +@@ -615,14 +720,16 @@ static adj_stereo _psy_stereo_modes_44[1 + }; + + /* tone master attenuation by base quality mode and bitrate tweak */ +-static att3 _psy_tone_masteratt_44[12]={ +- {{ 35, 21, 9}, 0, 0}, /* -1 */ +- {{ 30, 20, 8}, -2, 1.25}, /* 0 */ +- /* {{ 25, 14, 4}, 0, 0}, *//* 1 */ +- {{ 25, 12, 2}, 0, 0}, /* 1 */ +- /* {{ 20, 10, -2}, 0, 0}, *//* 2 */ +- {{ 20, 9, -3}, 0, 0}, /* 2 */ +- {{ 20, 9, -4}, 0, 0}, /* 3 */ ++static att3 _psy_tone_masteratt_44[13]={ ++ {{ 40, 32, 16}, 0, 0}, /* -2 */ ++// {{ 35, 21, 9}, 0, 0}, /* -1 */ ++ {{ 36, 25, 10}, 0, 0}, /* -1 */ ++// {{ 30, 20, 8}, -2, 1.25}, /* 0 */ ++ {{ 32, 20, 8}, 0, 0}, /* 0 */ ++ {{ 25, 14, 4}, 0, 0}, /* 1 */ ++ {{ 20, 10, -2}, 0, 0}, /* 2 */ ++// {{ 20, 9, -4}, 0, 0}, /* 3 */ ++ {{ 20, 10, -3}, 0, 0}, /* 3 */ + {{ 20, 9, -4}, 0, 0}, /* 4 */ + {{ 20, 6, -6}, 0, 0}, /* 5 */ + {{ 20, 3, -10}, 0, 0}, /* 6 */ +@@ -633,34 +740,50 @@ static att3 _psy_tone_masteratt_44[12]={ + }; + + /* lowpass by mode **************/ +-static double _psy_lowpass_44[12]={ ++static double _psy_lowpass_44[13]={ + /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ +- 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. ++// 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. ++ 13.1,14.8,15.1,15.8,16.5,17.2,18.3,20.1,48.,999.,999.,999.,999. + }; + + /* noise normalization **********/ + +-static int _noise_start_short_44[11]={ ++static int _noise_start_short_44[12]={ + /* 16,16,16,16,32,32,9999,9999,9999,9999 */ +- 32,16,16,16,32,9999,9999,9999,9999,9999,9999 ++// 32,16,16,16,32,9999,9999,9999,9999,9999,9999 ++ 32,32,16,16,32,64,9999,9999,9999,9999,9999,9999 + }; +-static int _noise_start_long_44[11]={ ++static int _noise_start_long_44[12]={ + /* 128,128,128,256,512,512,9999,9999,9999,9999 */ +- 256,128,128,256,512,9999,9999,9999,9999,9999,9999 ++// 256,128,128,256,512,9999,9999,9999,9999,9999,9999 ++ 256,256,128,128,256,512,9999,9999,9999,9999,9999,9999 + }; + +-static int _noise_part_short_44[11]={ +- 8,8,8,8,8,8,8,8,8,8,8 ++static int _noise_part_short_44[12]={ ++/* 8,8,8,8,8,8,8,8,8,8,8 */ ++ 8,8,8,8,8,8,8,8,8,8,8,8 + }; +-static int _noise_part_long_44[11]={ +- 32,32,32,32,32,32,32,32,32,32,32 ++static int _noise_part_long_44[12]={ ++/* 32,32,32,32,32,32,32,32,32,32,32 */ ++ 32,32,32,32,32,32,32,32,32,32,32,32 + }; + +-static double _noise_thresh_44[11]={ ++static double _noise_thresh_44[12]={ + /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ +- .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., ++// .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., ++ .16,.19,.19,.2,.35,.8,9999.,9999.,9999.,9999.,9999.,9999., + }; + + static double _noise_thresh_5only[2]={ + .5,.5, + }; ++ ++/* 32kHz only */ ++static int _noise_start_short_32[12]={ ++// 40,40,20,20,40,80,9999,9999,9999,9999,9999,9999 ++ 48,48,24,24,40,80,9999,9999,9999,9999,9999,9999 ++}; ++static int _noise_start_long_32[12]={ ++// 320,320,160,160,320,640,9999,9999,9999,9999,9999,9999 ++ 320,320,160,160,320,640,9999,9999,9999,9999,9999,9999 ++}; +--- lib/modes/setup_8.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_8.h 2007-04-23 17:54:23.000000000 +0200 +@@ -18,32 +18,37 @@ + #include "psych_8.h" + #include "residue_8.h" + +-static int blocksize_8[2]={ +- 512,512 ++static int blocksize_8[3]={ ++ 512,512,512 + }; + +-static int _floor_mapping_8[2]={ +- 6,6, ++static int _floor_mapping_8[3]={ ++ 6,6,6 + }; + +-static double rate_mapping_8[3]={ +- 6000.,9000.,32000., ++static double rate_mapping_8[4]={ ++// 6000.,9000.,32000., ++ 5000.,6000.,9000.,32000., + }; + +-static double rate_mapping_8_uncoupled[3]={ +- 8000.,14000.,42000., ++static double rate_mapping_8_uncoupled[4]={ ++// 8000.,14000.,42000., ++ 8000.,10000.,14000.,42000., + }; + +-static double quality_mapping_8[3]={ +- -.1,.0,1. ++static double quality_mapping_8[4]={ ++ -.2,-.1,.0,1. + }; + +-static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; ++//static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; ++static double _psy_compand_8_mapping[4]={ 0., 1., 2., 2.}; + +-static double _global_mapping_8[3]={ 1., 2., 3. }; ++//static double _global_mapping_8[3]={ 1., 2., 3. }; ++static double _global_mapping_8[4]={ 2., 2., 3., 4. }; + + ve_setup_data_template ve_setup_8_stereo={ +- 2, ++// 2, ++ 3, + rate_mapping_8, + quality_mapping_8, + 2, +@@ -94,7 +99,8 @@ ve_setup_data_template ve_setup_8_stereo + }; + + ve_setup_data_template ve_setup_8_uncoupled={ +- 2, ++// 2, ++ 3, + rate_mapping_8_uncoupled, + quality_mapping_8, + -1, +--- lib/modes/setup_44.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_44.h 2007-04-23 17:54:23.000000000 +0200 +@@ -19,43 +19,47 @@ + #include "modes/residue_44.h" + #include "modes/psych_44.h" + +-static double rate_mapping_44_stereo[12]={ +- 22500.,32000.,40000.,48000.,56000.,64000., ++static double rate_mapping_44_stereo[13]={ ++// 22500.,32000.,40000.,48000.,56000.,64000., ++ 16000.,24000.,32000.,40000.,48000.,56000.,64000., + 80000.,96000.,112000.,128000.,160000.,250001. + }; + +-static double quality_mapping_44[12]={ +- -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 ++static double quality_mapping_44[13]={ ++ -.2,-.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 + }; + +-static int blocksize_short_44[11]={ +- 512,256,256,256,256,256,256,256,256,256,256 ++static int blocksize_short_44[12]={ ++ 512,512,256,256,256,256,256,256,256,256,256,256 + }; +-static int blocksize_long_44[11]={ +- 4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 ++static int blocksize_long_44[12]={ ++ 4096,4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 + }; + +-static double _psy_compand_short_mapping[12]={ +- 0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. ++static double _psy_compand_short_mapping[13]={ ++ 1., 1., 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. + }; +-static double _psy_compand_long_mapping[12]={ +- 3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. ++static double _psy_compand_long_mapping[13]={ ++ 4., 4., 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. + }; + +-static double _global_mapping_44[12]={ ++static double _global_mapping_44[13]={ + /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ +- 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. ++// 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. ++ 0., 1., 2., 2., 2.5, 3., 3., 3.5, 3.7, 4., 4., 5., 5. // low ++// 0., 1., 2., 2., 2.5, 3., 3.2, 4.0, 4.0, 4.0, 4.5, 5., 5. // high + }; + +-static int _floor_short_mapping_44[11]={ +- 1,0,0,2,2,4,5,5,5,5,5 ++static int _floor_short_mapping_44[12]={ ++ 1,1,0,0,2,2,4,5,5,5,5,5 + }; +-static int _floor_long_mapping_44[11]={ +- 8,7,7,7,7,7,7,7,7,7,7 ++static int _floor_long_mapping_44[12]={ ++ 8,8,7,7,7,7,7,7,7,7,7,7 + }; + + ve_setup_data_template ve_setup_44_stereo={ +- 11, ++// 11, ++ 12, + rate_mapping_44_stereo, + quality_mapping_44, + 2, +--- lib/modes/residue_16.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/residue_16.h 2007-04-23 17:54:23.000000000 +0200 +@@ -84,7 +84,8 @@ static vorbis_residue_template _res_16s_ + &_resbook_16s_2,&_resbook_16s_2} + }; + +-static vorbis_mapping_template _mapres_template_16_stereo[3]={ ++static vorbis_mapping_template _mapres_template_16_stereo[4]={ ++ { _map_nominal, _res_16s_0 }, /* -1 */ + { _map_nominal, _res_16s_0 }, /* 0 */ + { _map_nominal, _res_16s_1 }, /* 1 */ + { _map_nominal, _res_16s_2 }, /* 2 */ +@@ -156,7 +157,8 @@ static vorbis_residue_template _res_16u_ + }; + + +-static vorbis_mapping_template _mapres_template_16_uncoupled[3]={ ++static vorbis_mapping_template _mapres_template_16_uncoupled[4]={ ++ { _map_nominal_u, _res_16u_0 }, /* -1 */ + { _map_nominal_u, _res_16u_0 }, /* 0 */ + { _map_nominal_u, _res_16u_1 }, /* 1 */ + { _map_nominal_u, _res_16u_2 }, /* 2 */ +--- lib/modes/residue_8.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/residue_8.h 2007-04-23 17:54:23.000000000 +0200 +@@ -48,7 +48,8 @@ static vorbis_residue_template _res_8s_1 + &_resbook_8s_1,&_resbook_8s_1}, + }; + +-static vorbis_mapping_template _mapres_template_8_stereo[2]={ ++static vorbis_mapping_template _mapres_template_8_stereo[3]={ ++ { _map_nominal, _res_8s_0 }, /* -1 */ + { _map_nominal, _res_8s_0 }, /* 0 */ + { _map_nominal, _res_8s_1 }, /* 1 */ + }; +@@ -91,7 +92,8 @@ static vorbis_residue_template _res_8u_1 + &_resbook_8u_1,&_resbook_8u_1}, + }; + +-static vorbis_mapping_template _mapres_template_8_uncoupled[2]={ ++static vorbis_mapping_template _mapres_template_8_uncoupled[3]={ ++ { _map_nominal_u, _res_8u_0 }, /* -1 */ + { _map_nominal_u, _res_8u_0 }, /* 0 */ + { _map_nominal_u, _res_8u_1 }, /* 1 */ + }; +--- lib/modes/setup_44u.h-dist 2005-11-28 06:43:23.000000000 +0100 ++++ lib/modes/setup_44u.h 2007-04-23 17:54:23.000000000 +0200 +@@ -17,13 +17,15 @@ + + #include "modes/residue_44u.h" + +-static double rate_mapping_44_un[12]={ +- 32000.,48000.,60000.,70000.,80000.,86000., ++static double rate_mapping_44_un[13]={ ++// 32000.,48000.,60000.,70000.,80000.,86000., ++ 28000.,40000.,48000.,60000.,70000.,80000.,86000., + 96000.,110000.,120000.,140000.,160000.,240001. + }; + + ve_setup_data_template ve_setup_44_uncoupled={ +- 11, ++// 11, ++ 12, + rate_mapping_44_un, + quality_mapping_44, + -1, +--- lib/mapping0.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/mapping0.c 2007-04-23 17:54:23.000000000 +0200 +@@ -246,11 +246,14 @@ static int mapping0_forward(vorbis_block + codec_setup_info *ci=vi->codec_setup; + private_state *b=vb->vd->backend_state; + vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; ++ vorbis_info_floor1 *vif=ci->floor_param[vb->W]; + int n=vb->pcmend; + int i,j,k; + + int *nonzero = alloca(sizeof(*nonzero)*vi->channels); + float **gmdct = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct)); ++ float **gmdct_org = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct_org)); ++ float **res_org = _vorbis_block_alloc(vb,vi->channels*sizeof(*res_org)); + int **ilogmaskch= _vorbis_block_alloc(vb,vi->channels*sizeof(*ilogmaskch)); + int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts)); + +@@ -273,6 +276,8 @@ static int mapping0_forward(vorbis_block + float *logfft =pcm; + + gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); ++ gmdct_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct_org)); ++ res_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**res_org)); + + scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original + todB estimation used on IEEE 754 +@@ -311,6 +316,7 @@ static int mapping0_forward(vorbis_block + /* transform the PCM data */ + /* only MDCT right now.... */ + mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]); ++ memcpy(gmdct_org[i], gmdct[i], n/2*sizeof(**gmdct_org)); + + /* FFT yields more accurate tonal estimation (not phase sensitive) */ + drft_forward(&b->fft_look[vb->W],pcm); +@@ -380,6 +386,11 @@ static int mapping0_forward(vorbis_block + + float *logmdct =logfft+n/2; + float *logmask =logfft; ++ ++ float *lastmdct = b->nblock+i*128; ++ float *tempmdct = b->tblock+i*128; ++ ++ float *lowcomp = b->lownoise_compand_level+i; + + vb->mode=modenumber; + +@@ -419,7 +430,15 @@ static int mapping0_forward(vorbis_block + us a tonality estimate (the larger the value in the + 'noise_depth' vector, the more tonal that area is) */ + ++ *lowcomp= ++ lb_loudnoise_fix(psy_look, ++ *lowcomp, ++ logmdct, ++ b->lW_modenumber, ++ blocktype, modenumber); ++ + _vp_noisemask(psy_look, ++ *lowcomp, + logmdct, + noise); /* noise does not have by-frequency offset + bias applied yet */ +@@ -467,7 +486,13 @@ static int mapping0_forward(vorbis_block + 1, + logmask, + mdct, +- logmdct); ++ logmdct, ++ lastmdct, tempmdct, ++ *lowcomp, ++ vif->n, ++ blocktype, modenumber, ++ vb->nW, ++ b->lW_blocktype, b->lW_modenumber, b->lW_no); + + #if 0 + if(vi->channels==2){ +@@ -510,7 +535,13 @@ static int mapping0_forward(vorbis_block + 2, + logmask, + mdct, +- logmdct); ++ logmdct, ++ lastmdct, tempmdct, ++ *lowcomp, ++ vif->n, ++ blocktype, modenumber, ++ vb->nW, ++ b->lW_blocktype, b->lW_modenumber, b->lW_no); + + #if 0 + if(vi->channels==2){ +@@ -533,7 +564,13 @@ static int mapping0_forward(vorbis_block + 0, + logmask, + mdct, +- logmdct); ++ logmdct, ++ lastmdct, tempmdct, ++ *lowcomp, ++ vif->n, ++ blocktype, modenumber, ++ vb->nW, ++ b->lW_blocktype, b->lW_modenumber, b->lW_no); + + #if 0 + if(vi->channels==2) +@@ -600,11 +637,6 @@ static int mapping0_forward(vorbis_block + psy_look, + info, + mag_memo); +- +- hf_reduction(&ci->psy_g_param, +- psy_look, +- info, +- mag_memo); + } + + memset(sortindex,0,sizeof(*sortindex)*vi->channels); +@@ -636,7 +668,9 @@ static int mapping0_forward(vorbis_block + for(i=0;ichannels;i++){ + int submap=info->chmuxlist[i]; + float *mdct =gmdct[i]; ++ float *mdct_org=gmdct_org[i]; + float *res =vb->pcm[i]; ++ float *resorgch=res_org[i]; + int *ilogmask=ilogmaskch[i]= + _vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); + +@@ -659,6 +693,14 @@ static int mapping0_forward(vorbis_block + res, + ci->psy_g_param.sliding_lowpass[vb->W][k]); + ++ /* stereo threshold */ ++ _vp_remove_floor(psy_look, ++ mdct_org, ++ ilogmask, ++ resorgch, ++ ci->psy_g_param.sliding_lowpass[vb->W][k]); ++ ++ + _vp_noise_normalize(psy_look,res,res+n/2,sortindex[i]); + + +@@ -691,7 +733,8 @@ static int mapping0_forward(vorbis_block + mag_sort, + ilogmaskch, + nonzero, +- ci->psy_g_param.sliding_lowpass[vb->W][k]); ++ ci->psy_g_param.sliding_lowpass[vb->W][k], ++ gmdct, res_org); + } + + /* classify and encode by submap */ +@@ -717,6 +760,11 @@ static int mapping0_forward(vorbis_block + couple_bundle,NULL,zerobundle,ch_in_bundle,classifications); + } + ++ /* set last-window type & number */ ++ if((blocktype == b->lW_blocktype) && (modenumber == b->lW_modenumber)) b->lW_no++; ++ else b->lW_no = 1; ++ b->lW_blocktype = blocktype; ++ b->lW_modenumber = modenumber; + /* ok, done encoding. Next protopacket. */ + } + +--- lib/masking.h-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/masking.h 2007-04-23 17:54:23.000000000 +0200 +@@ -23,16 +23,29 @@ + + #define MAX_ATH 88 + static float ATH[]={ +- /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, +- /*31*/ -59, -60, -61, -62, -63, -64, -65, -66, +- /*63*/ -67, -68, -69, -70, -71, -72, -73, -74, +- /*125*/ -75, -76, -77, -78, -80, -81, -82, -83, +- /*250*/ -84, -85, -86, -87, -88, -88, -89, -89, +- /*500*/ -90, -91, -91, -92, -93, -94, -95, -96, +- /*1k*/ -96, -97, -98, -98, -99, -99,-100,-100, +- /*2k*/ -101,-102,-103,-104,-106,-107,-107,-107, +- /*4k*/ -107,-105,-103,-102,-101, -99, -98, -96, +- /*8k*/ -95, -95, -96, -97, -96, -95, -93, -90, ++/* original ATH */ ++ /*15*/ // -51, -52, -53, -54, -55, -56, -57, -58, ++ /*31*/ // -59, -60, -61, -62, -63, -64, -65, -66, ++ /*63*/ // -67, -68, -69, -70, -71, -72, -73, -74, ++ /*125*/ // -75, -76, -77, -78, -80, -81, -82, -83, ++ /*250*/ //-84, -85, -86, -87, -88, -88, -89, -89, ++ /*500*/ //-90, -91, -91, -92, -93, -94, -95, -96, ++ /*1k*/ //-96, -97, -98, -98, -99, -99,-100,-100, ++ /*2k*/ //-101,-102,-103,-104,-106,-107,-107,-107, ++ /*4k*/ //-107,-105,-103,-102,-101, -99, -98, -96, ++ /*8k*/ //-95, -95, -96, -97, -96, -95, -93, -90, ++ /*16k*/ //-80, -70, -50, -40, -30, -30, -30, -30 ++/*Aoyumi's ATH (v6) */ ++ /*15*/ -31, -33, -35, -37, -39, -41, -43, -45, ++ /*31*/ -47, -49, -51, -53, -55, -57, -59, -61, ++ /*63*/ -63, -65, -67, -69, -71, -73, -75, -77, ++ /*125*/ -79, -81, -83, -84, -85, -86, -87, -88, ++ /*250*/ -89, -90, -91, -92, -93, -94, -95, -96, ++ /*500*/ -96, -97, -97, -97, -98, -98, -98, -99, ++ /*1k*/ -98, -97, -97, -98, -99,-100,-101,-101, ++ /*2k*/ -102,-103,-104,-105,-106,-106,-107,-107, ++ /*4k*/ -105,-104,-103,-102,-101, -99, -98, -97, ++ /*8k*/ -96, -95, -95, -96, -97, -97, -93, -89, + /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 + }; + +--- lib/psy.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/psy.c 2007-04-23 17:54:23.000000000 +0200 +@@ -30,8 +30,34 @@ + #include "misc.h" + + #define NEGINF -9999.f +-static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; +-static double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; ++ ++/* ++ rephase = reverse phase limit (postpoint) ++ 0 1 2 3 4 5 6 7 8 */ ++static double stereo_threshholds[]= {0.0, 0.5, 1.0, 1.5, 2.5, 4.5, 8.5,16.5, 9e10}; ++static double stereo_threshholds_rephase[]= {0.0, 0.5, 0.5, 1.0, 1.5, 1.5, 2.5, 2.5, 9e10}; ++ ++static double stereo_threshholds_low[]= {0.0, 0.5, 0.5, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0}; ++static double stereo_threshholds_high[]= {0.0, 0.5, 0.5, 0.5, 1.0, 3.0, 5.5, 8.5, 0.0}; ++ ++ ++static int m3n32[] = {21,13,10,4}; ++static int m3n44[] = {15,9,7,3}; ++static int m3n48[] = {14,8,6,3}; ++ ++static int temp_bfn[128] = { ++ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, ++ 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, ++ 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,11,11,11,11, ++12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15, ++16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19, ++20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23, ++24,24,24,24,25,25,25,24,23,22,21,20,19,18,17,16, ++15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ++}; ++ ++static float nnmid_th=0.2; ++ + + vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; +@@ -284,12 +310,56 @@ void _vp_psy_init(vorbis_look_psy *p,vor + p->n=n; + p->rate=rate; + +- /* AoTuV HF weighting */ +- p->m_val = 1.; +- if(rate < 26000) p->m_val = 0; +- else if(rate < 38000) p->m_val = .94; /* 32kHz */ +- else if(rate > 46000) p->m_val = 1.275; /* 48kHz */ +- ++ /* AoTuV HF weighting etc. */ ++ p->n25p=n/4; ++ p->n33p=n/3; ++ p->n75p=n*3/4; ++ if(rate < 26000){ ++ /* below 26kHz */ ++ p->m_val = 0; ++ for(i=0; i<4; i++) p->m3n[i] = 0; ++ p->tonecomp_endp=0; // dummy ++ p->tonecomp_thres=.25; ++ p->st_freqlimit=n; ++ p->min_nn_lp=0; ++ }else if(rate < 38000){ ++ /* 32kHz */ ++ p->m_val = .93; ++ for(i=0; i<4; i++) p->m3n[i] = m3n32[i]; ++ if(n==128) { p->tonecomp_endp= 124; p->tonecomp_thres=.5; ++ p->st_freqlimit=n; p->min_nn_lp= 0;} ++ else if(n==256) { p->tonecomp_endp= 248; p->tonecomp_thres=.7; ++ p->st_freqlimit=n; p->min_nn_lp= 0;} ++ else if(n==1024){ p->tonecomp_endp= 992; p->tonecomp_thres=.5; ++ p->st_freqlimit=n; p->min_nn_lp= 832;} ++ else if(n==2048){ p->tonecomp_endp=1984; p->tonecomp_thres=.7; ++ p->st_freqlimit=n; p->min_nn_lp=1664;} ++ }else if(rate > 46000){ ++ /* 48kHz */ ++ p->m_val = 1.205; ++ for(i=0; i<4; i++) p->m3n[i] = m3n48[i]; ++ if(n==128) { p->tonecomp_endp= 83; p->tonecomp_thres=.5; ++ p->st_freqlimit= 89; p->min_nn_lp= 0;} ++ else if(n==256) { p->tonecomp_endp= 166; p->tonecomp_thres=.7; ++ p->st_freqlimit= 178; p->min_nn_lp= 0;} ++ else if(n==1024){ p->tonecomp_endp= 664; p->tonecomp_thres=.5; ++ p->st_freqlimit= 712; p->min_nn_lp= 576;} ++ else if(n==2048){ p->tonecomp_endp=1328; p->tonecomp_thres=.7; ++ p->st_freqlimit=1424; p->min_nn_lp=1152;} ++ }else{ ++ /* 44.1kHz */ ++ p->m_val = 1.; ++ for(i=0; i<4; i++) p->m3n[i] = m3n44[i]; ++ if(n==128) { p->tonecomp_endp= 90; p->tonecomp_thres=.5; ++ p->st_freqlimit= 96; p->min_nn_lp= 0;} ++ else if(n==256) { p->tonecomp_endp= 180; p->tonecomp_thres=.7; ++ p->st_freqlimit= 192; p->min_nn_lp= 0;} ++ else if(n==1024){ p->tonecomp_endp= 720; p->tonecomp_thres=.5; ++ p->st_freqlimit= 768; p->min_nn_lp= 608;} ++ else if(n==2048){ p->tonecomp_endp=1440; p->tonecomp_thres=.7; ++ p->st_freqlimit=1536; p->min_nn_lp=1216;} ++ } ++ + /* set up the lookups for a given blocksize and sample rate */ + + for(i=0,j=0;ivi->noisecompand_high[NOISE_COMPAND_LEVELS-1] > 1) && (noise_compand_level > 0)){ ++ int thter = p->n33p; ++ for(;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; ++ if(dB<0)dB=0; ++ logmask[i]= work[i]+p->vi->noisecompand[dB]- ++ ((p->vi->noisecompand[dB]-p->vi->noisecompand_high[dB])*noise_compand_level); ++ } ++ } ++ for(;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; + if(dB<0)dB=0; +@@ -854,18 +937,172 @@ void _vp_offset_and_mix(vorbis_look_psy + int offset_select, + float *logmask, + float *mdct, +- float *logmdct){ +- int i,n=p->n; +- float de, coeffi, cx;/* AoTuV */ ++ float *logmdct, ++ float *lastmdct, float *tempmdct, ++ float low_compand, ++ int end_block, ++ int blocktype, int modenumber, ++ int nW_modenumber, ++ int lW_blocktype, int lW_modenumber, int lW_no){ ++ ++ int i,j,n=p->n; ++ int m2_sw=0, padth; /* aoTuV for M2 */ ++ int it_sw, *m3n, m3_count; /* aoTuV for M3 */ ++ int m4_end, lp_pos, m4_start; /* aoTuV for M4 */ ++ float de, coeffi, cx; /* aoTuV for M1 */ ++ float toneth; /* aoTuV for M2 */ ++ float noise_rate, noise_rate_low, noise_center, rate_mod; /* aoTuV for M3 */ ++ float m4_thres; /* aoTuV for M4 */ + float toneatt=p->vi->tone_masteratt[offset_select]; + + cx = p->m_val; ++ m3n = p->m3n; ++ m4_start=p->vi->normal_start; ++ m4_end = p->tonecomp_endp; ++ m4_thres = p->tonecomp_thres; ++ lp_pos=9999; ++ ++ end_block+=p->vi->normal_partition; ++ if(end_block>n)end_block=n; ++ ++ /* Collapse of low(mid) frequency is prevented. (for 32/44/48kHz q-2) */ ++ if(low_compand<0 || toneatt<25.)low_compand=0; ++ else low_compand*=(toneatt-25.); ++ ++ /** @ M2 PRE **/ ++ if(p->vi->normal_thresh<.48){ ++ if((cx > 0.5) && !modenumber && blocktype && (n==128)){ ++ if(p->vi->normal_thresh>.35) padth = 10+(int)(p->vi->flacint*100); ++ else padth = 10; ++ m2_sw=1; ++ } ++ } ++ ++ /** @ M3 PRE **/ ++ m3_count = 3; ++ if(toneatt < 3) m3_count = 2; // q6~ ++ if((n == 128) && !modenumber && !blocktype){ ++ if(!lW_blocktype && !lW_modenumber){ /* last window "short" - type "impulse" */ ++ if(lW_no < 8){ ++ /* impulse - @impulse case1 */ ++ noise_rate = 0.7-(float)(lW_no-1)/17; ++ noise_center = (float)(lW_no*m3_count); ++ }else{ ++ /* impulse - @impulse case2 */ ++ noise_rate = 0.3; ++ noise_center = 25; ++ if((lW_no*m3_count) < 24) noise_center = lW_no*m3_count; ++ } ++ if(offset_select == 1){ ++ for(i=0; i<128; i++) tempmdct[i] -= 5; ++ } ++ }else{ /* non_impulse - @Short(impulse) case */ ++ noise_rate = 0.7; ++ noise_center = 0; ++ if(offset_select == 1){ ++ for(i=0; i<128; i++) tempmdct[i] = lastmdct[i] - 5; ++ } ++ } ++ noise_rate_low = 0; ++ it_sw = 1; ++ }else{ ++ it_sw = 0; ++ } + ++ /** @ M3&M4 PRE **/ ++ if(cx < 0.5){ ++ it_sw = 0; /* for M3 */ ++ m4_end=end_block; /* for M4 */ ++ }else if(p->vi->normal_thresh>1.){ ++ m4_start = 9999; ++ }else{ ++ if(m4_end>end_block)lp_pos=m4_end; ++ else lp_pos=end_block; ++ } ++ + for(i=0;inoiseoffset[offset_select][i]; ++ float tval= tone[i]+toneatt; ++ if(i<=m4_start)tval-=low_compand; + if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; +- logmask[i]=max(val,tone[i]+toneatt); +- ++ ++ /* AoTuV */ ++ /** @ M2 MAIN ** ++ floor is pulled below suitably. (padding block only) (#2) ++ by Aoyumi @ 2006/06/14 ++ */ ++ if(m2_sw){ ++ // the conspicuous low level pre-echo of the padding block origin is reduced. ++ if((logmdct[i]-lastmdct[i]) > 20){ ++ if(i > m3n[3]) val -= (logmdct[i]-lastmdct[i]-20)/padth; ++ else val -= (logmdct[i]-lastmdct[i]-20)/(padth+padth); ++ } ++ } ++ ++ /* AoTuV */ ++ /** @ M3 MAIN ** ++ Dynamic impulse block noise control. (#4) ++ 48/44.1/32kHz only. ++ by Aoyumi @ 2006/02/02 ++ */ ++ if(it_sw){ ++ for(j=1; j<=temp_bfn[i]; j++){ ++ float tempbuf = logmdct[i]-(75/temp_bfn[i]*j)-5; ++ if( (tempmdct[i+j] < tempbuf) && (tempmdct[i+j] < (logmdct[i+j]-5)) ) ++ tempmdct[i+j] = logmdct[i+j] - 5; ++ } ++ if(val > tval){ ++ if( (val>lastmdct[i]) && (logmdct[i]>(tempmdct[i]+noise_center)) ){ ++ float valmask=0; ++ tempmdct[i] = logmdct[i]; ++ ++ if(logmdct[i]>lastmdct[i]){ ++ rate_mod = noise_rate; ++ }else{ ++ rate_mod = noise_rate_low; ++ } ++ if(i > m3n[1]){ ++ if((val-tval)>30) valmask=((val-tval-30)/10+30)*rate_mod; ++ else valmask=(val-tval)*rate_mod; ++ }else if(i > m3n[2]){ ++ if((val-tval)>20) valmask=((val-tval-20)/10+20)*rate_mod; ++ else valmask=(val-tval)*rate_mod; ++ }else if(i > m3n[3]){ ++ if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.5; ++ else valmask=(val-tval)*rate_mod*0.5; ++ }else{ ++ if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.3; ++ else valmask=(val-tval)*rate_mod*0.3; ++ } ++ if((val-valmask)>lastmdct[i])val-=valmask; ++ else val=lastmdct[i]; ++ } ++ } ++ } ++ ++ /* This affects calculation of a floor curve. */ ++ if(i>=lp_pos)logmdct[i]=-160; ++ ++ /* AoTuV */ ++ /** @ M4 MAIN ** ++ The purpose of this portion is working Noise Normalization more correctly. ++ (There is this in order to prevent extreme boost of floor) ++ m4_start = start point ++ m4_end = end point ++ m4_thres = threshold ++ by Aoyumi @ 2006/03/20 ++ */ ++ //logmask[i]=max(val,tval); ++ if(val>tval){ ++ logmask[i]=val; ++ }else if((i>m4_start) && (i-140)){ ++ if(logmdct[i]>val){ ++ if(logmdct[i] logmdct[i*8+j]){ ++ lastmdct[i] = logmdct[i*8+j]; ++ } ++ } ++ } ++ } ++ }else if(n == 128){ ++ for(i=0; i<128; i++) lastmdct[i] = logmdct[i]; ++ } ++ } + } + + float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){ +@@ -955,7 +1210,7 @@ static void precomputed_couple_point(flo + + int test=(floorA>floorB)-1; + int offset=31-abs(floorA-floorB); +- float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; ++ float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; // floormag = 0.990065 ~ 0.707107 + + floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))]; + +@@ -989,6 +1244,22 @@ static float round_hypot(float a, float + if(-a>b)return -sqrt(a*a+b*b); + return sqrt(b*b+a*a); + } ++/* modified hypot by aoyumi ++ better method should be found. */ ++static float min_indemnity_dipole_hypot(float a, float b){ ++ float thnor=0.92; ++ float threv=0.84; ++ float a2 = a*a; ++ float b2 = b*b; ++ if(a>0.){ ++ if(b>0.)return sqrt(a2+b2*thnor); ++ if(a>-b)return sqrt(a2-b2+b2*threv); ++ return -sqrt(b2-a2+a2*threv); ++ } ++ if(b<0.)return -sqrt(a2+b2*thnor); ++ if(-a>b)return -sqrt(a2-b2+b2*threv); ++ return sqrt(b2-a2+a2*threv); ++} + + /* revert to round hypot for now */ + float **_vp_quantize_couple_memo(vorbis_block *vb, +@@ -1001,16 +1272,27 @@ float **_vp_quantize_couple_memo(vorbis_ + float **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); + int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; + +- for(i=0;icoupling_steps;i++){ +- float *mdctM=mdct[vi->coupling_mag[i]]; +- float *mdctA=mdct[vi->coupling_ang[i]]; +- ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); +- for(j=0;jcoupling_steps;i++){ ++ float *mdctM=mdct[vi->coupling_mag[i]]; ++ float *mdctA=mdct[vi->coupling_ang[i]]; ++ ++ ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); ++ for(j=0;jcoupling_steps;i++){ ++ float *mdctM=mdct[vi->coupling_mag[i]]; ++ float *mdctA=mdct[vi->coupling_ang[i]]; ++ ++ ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); ++ for(j=0;jf2); + } + ++/*** optimization of sort (for 8 or 32 element) ***/ ++#ifdef OPT_SORT ++#define C(o,a,b)\ ++ (fabs(data[o+a])>=fabs(data[o+b])) ++#define O(o,a,b,c,d)\ ++ {n[o]=o+a;n[o+1]=o+b;n[o+2]=o+c;n[o+3]=o+d;} ++#define SORT4(o)\ ++ if(C(o,2,3))if(C(o,0,1))if(C(o,0,2))if(C(o,1,2))O(o,0,1,2,3)\ ++ else if(C(o,1,3))O(o,0,2,1,3)\ ++ else O(o,0,2,3,1)\ ++ else if(C(o,0,3))if(C(o,1,3))O(o,2,0,1,3)\ ++ else O(o,2,0,3,1)\ ++ else O(o,2,3,0,1)\ ++ else if(C(o,1,2))if(C(o,0,2))O(o,1,0,2,3)\ ++ else if(C(o,0,3))O(o,1,2,0,3)\ ++ else O(o,1,2,3,0)\ ++ else if(C(o,1,3))if(C(o,0,3))O(o,2,1,0,3)\ ++ else O(o,2,1,3,0)\ ++ else O(o,2,3,1,0)\ ++ else if(C(o,0,1))if(C(o,0,3))if(C(o,1,3))O(o,0,1,3,2)\ ++ else if(C(o,1,2))O(o,0,3,1,2)\ ++ else O(o,0,3,2,1)\ ++ else if(C(o,0,2))if(C(o,1,2))O(o,3,0,1,2)\ ++ else O(o,3,0,2,1)\ ++ else O(o,3,2,0,1)\ ++ else if(C(o,1,3))if(C(o,0,3))O(o,1,0,3,2)\ ++ else if(C(o,0,2))O(o,1,3,0,2)\ ++ else O(o,1,3,2,0)\ ++ else if(C(o,1,2))if(C(o,0,2))O(o,3,1,0,2)\ ++ else O(o,3,1,2,0)\ ++ else O(o,3,2,1,0) ++ ++static void sortindex_fix8(int *index, ++ float *data, ++ int offset){ ++ int i,j,k,n[8]; ++ index+=offset; ++ data+=offset; ++ SORT4(0) ++ SORT4(4) ++ j=0;k=4; ++ for(i=0;i<8;i++) ++ index[i]=n[(k>=8)||(j<4)&&C(0,n[j],n[k])?j++:k++]+offset; ++} ++ ++static void sortindex_fix32(int *index, ++ float *data, ++ int offset){ ++ int i,j,k,n[32]; ++ for(i=0;i<32;i+=8) ++ sortindex_fix8(index,data,offset+i); ++ index+=offset; ++ for(i=j=0,k=8;i<16;i++) ++ n[i]=index[(k>=16)||(j<8)&&C(0,index[j],index[k])?j++:k++]; ++ for(i=j=16,k=24;i<32;i++) ++ n[i]=index[(k>=32)||(j<24)&&C(0,index[j],index[k])?j++:k++]; ++ for(i=j=0,k=16;i<32;i++) ++ index[i]=n[(k>=32)||(j<16)&&C(0,n[j],n[k])?j++:k++]; ++} ++ ++static void sortindex_shellsort(int *index, ++ float *data, ++ int offset, ++ int count){ ++ int gap,pos,left,right,i,j; ++ index+=offset; ++ for(i=0;i=4)gap/=3; ++ while(gap>0){ ++ for(pos=gap;pos=0;left-=gap){ ++ i=index[left];j=index[left+gap]; ++ if(!C(0,i,j)){ ++ index[left]=j; ++ index[left+gap]=i; ++ }else break; ++ } ++ } ++ gap/=3; ++ } ++} ++ ++static void sortindex(int *index, ++ float *data, ++ int offset, ++ int count){ ++ if(count==8)sortindex_fix8(index,data,offset); ++ else if(count==32)sortindex_fix32(index,data,offset); ++ else sortindex_shellsort(index,data,offset,count); ++} ++ ++#undef C ++#undef O ++#undef SORT4 ++ ++#endif ++/*** OPT_SORT End ***/ ++ ++ + int **_vp_quantize_couple_sort(vorbis_block *vb, + vorbis_look_psy *p, + vorbis_info_mapping0 *vi, + float **mags){ + +- ++#ifdef OPT_SORT ++ if(p->vi->normal_point_p){ ++ int i,j,n=p->n; ++ int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); ++ int partition=p->vi->normal_partition; ++ ++ for(i=0;icoupling_steps;i++){ ++ ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); ++ ++ for(j=0;jvi->normal_point_p){ + int i,j,k,n=p->n; + int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); +@@ -1045,10 +1445,22 @@ int **_vp_quantize_couple_sort(vorbis_bl + return(ret); + } + return(NULL); ++#endif + } + + void _vp_noise_normalize_sort(vorbis_look_psy *p, + float *magnitudes,int *sortedindex){ ++#ifdef OPT_SORT ++ int j,n=p->n; ++ vorbis_info_psy *vi=p->vi; ++ int partition=vi->normal_partition; ++ int start=vi->normal_start; ++ ++ for(j=start;jn)partition=n-j; ++ sortindex(sortedindex-start,magnitudes,j,partition); ++ } ++#else + int i,j,n=p->n; + vorbis_info_psy *vi=p->vi; + int partition=vi->normal_partition; +@@ -1063,11 +1475,12 @@ void _vp_noise_normalize_sort(vorbis_loo + sortedindex[i+j-start]=work[i]-magnitudes; + } + } ++#endif + } + + void _vp_noise_normalize(vorbis_look_psy *p, + float *in,float *out,int *sortedindex){ +- int flag=0,i,j=0,n=p->n; ++ int i,j=0,n=p->n,min_energy; + vorbis_info_psy *vi=p->vi; + int partition=vi->normal_partition; + int start=vi->normal_start; +@@ -1081,27 +1494,64 @@ void _vp_noise_normalize(vorbis_look_psy + for(;j+partition<=n;j+=partition){ + float acc=0.; + int k; ++ int energy_loss=0; ++ int nn_num=0; ++ int freqband_mid=j+16; ++ int freqband_flag=0; + +- for(i=j;innmid_th){ ++ if(in[freqband_mid]*in[freqband_mid]<.25f){ ++ i=0; ++ if(acc>=vi->normal_thresh){ ++ out[freqband_mid]=unitnorm(in[freqband_mid]); ++ acc-=1.; ++ freqband_flag=1; ++ nn_num++; ++ } ++ } ++ }*/ + ++ /* NN main */ + for(i=0;i=.25f){ +- out[k]=rint(in[k]); +- acc-=in[k]*in[k]; +- flag=1; +- }else{ +- if(accnormal_thresh)break; +- out[k]=unitnorm(in[k]); +- acc-=1.; +- } ++ k=sortedindex[i+j-start]; ++ if(in[k]*in[k]>=.25f){ // or rint(in[k])!=0.f ++ out[k]=rint(in[k]); ++ //acc-=in[k]*in[k]; ++ }else{ ++ if(accnormal_thresh)break; ++ if(freqband_flag && freqband_mid==k)continue; ++ out[k]=unitnorm(in[k]); ++ acc-=1.; ++ nn_num++; ++ } + } + ++ /* The minimum energy complement */ ++ /*min_energy=32-energy_loss+nn_num; ++ if(min_energy<2 || (j<=p->min_nn_lp && min_energy==2)){ ++ k=sortedindex[i+j-start]; ++ if(freqband_flag && freqband_mid==k){ ++ i++; ++ k=sortedindex[i+j-start]; ++ } ++ if(!(fabs(in[k])<0.3)){ ++ out[k]=unitnorm(in[k]); ++ i++; ++ } ++ }*/ ++ ++ // The last process + for(;in; + +@@ -1144,39 +1595,196 @@ void _vp_couple(int blobno, + + float *rM=res[vi->coupling_mag[i]]; + float *rA=res[vi->coupling_ang[i]]; ++ float *rMo=res_org[vi->coupling_mag[i]]; ++ float *rAo=res_org[vi->coupling_ang[i]]; + float *qM=rM+n; + float *qA=rA+n; ++ float *mdctM=mdct[vi->coupling_mag[i]]; ++ float *mdctA=mdct[vi->coupling_ang[i]]; + int *floorM=ifloor[vi->coupling_mag[i]]; + int *floorA=ifloor[vi->coupling_ang[i]]; + float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; + float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; ++ float sth_low=stereo_threshholds_low[g->coupling_prepointamp[blobno]]; ++ float sth_high=stereo_threshholds_high[g->coupling_postpointamp[blobno]]; ++ float postpoint_backup; ++ float st_thresh; + int partition=(p->vi->normal_point_p?p->vi->normal_partition:p->n); + int limit=g->coupling_pointlimit[p->vi->blockflag][blobno]; + int pointlimit=limit; +- ++ int freqlimit=p->st_freqlimit; ++ unsigned char Mc_treshp[2048]; ++ unsigned char Ac_treshp[2048]; ++ int lof_st; ++ int hif_st; ++ int hif_stcopy; ++ int old_lof_st=0; ++ int old_hif_st=0; ++ int Afreq_num=0; ++ int Mfreq_num=0; ++ int stcont_start=0; // M6 start point ++ + nonzero[vi->coupling_mag[i]]=1; + nonzero[vi->coupling_ang[i]]=1; +- +- /* The threshold of a stereo is changed with the size of n */ +- if(n > 1000) +- postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; +- +- for(j=0;jn;j+=partition){ ++ ++ postpoint_backup=postpoint; ++ ++ /** @ M6 PRE **/ ++ // lossless only? ++ if(!stereo_threshholds[g->coupling_postpointamp[blobno]])stcont_start=n; ++ else{ ++ // exception handling ++ if((postpoint-sth_high)noiseoffset[1][j]>=-2)break; ++ } ++ // start point correction & threshold setup ++ st_thresh=.1; ++ if(p->m_val<.5){ ++ // low frequency limit ++ if(stcont_startvi->normal_thresh>1.)st_thresh=.5; ++ for(j=0;j<=freqlimit;j++){ // or j=stcont_start){ ++ int m; ++ int lof_num; ++ int hif_num; ++ ++ // (It may be better to calculate this in advance) ++ lof_st=l-(l/2)*.167; ++ hif_st=l+l*.167; ++ ++ hif_stcopy=hif_st; ++ ++ // limit setting ++ if(hif_st>freqlimit)hif_st=freqlimit; ++ ++ if(old_lof_st || old_hif_st){ ++ if(hif_st>l){ ++ // hif_st, lof_st ...absolute value ++ // lof_num, hif_num ...relative value ++ ++ // low freq.(lower) ++ lof_num=lof_st-old_lof_st; ++ if(lof_num==0){ ++ Afreq_num+=Ac_treshp[l-1]; ++ Mfreq_num+=Mc_treshp[l-1]; ++ }else if(lof_num==1){ ++ Afreq_num+=Ac_treshp[l-1]; ++ Mfreq_num+=Mc_treshp[l-1]; ++ Afreq_num-=Ac_treshp[old_lof_st]; ++ Mfreq_num-=Mc_treshp[old_lof_st]; ++ }//else puts("err. low"); ++ ++ // high freq.(higher) ++ hif_num=hif_st-old_hif_st; ++ if(hif_num==0){ ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ }else if(hif_num==1){ ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ Afreq_num+=Ac_treshp[hif_st]; ++ Mfreq_num+=Mc_treshp[hif_st]; ++ }else if(hif_num==2){ ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ Afreq_num+=Ac_treshp[hif_st]; ++ Mfreq_num+=Mc_treshp[hif_st]; ++ Afreq_num+=Ac_treshp[hif_st-1]; ++ Mfreq_num+=Mc_treshp[hif_st-1]; ++ }//else puts("err. high"); ++ } ++ }else{ ++ for(m=lof_st; m<=hif_st; m++){ ++ if(m==l)continue; ++ if(Ac_treshp[m]) Afreq_num++; ++ if(Mc_treshp[m]) Mfreq_num++; ++ } ++ } ++ if(l>=limit){ ++ shigh=sth_high/(hif_stcopy-lof_st); ++ shighA=shigh*Afreq_num; ++ shighM=shigh*Mfreq_num; ++ if((shighA+rAs)>(shighM+rMs))shigh=shighA; ++ else shigh=shighM; ++ }else{ ++ slow=sth_low/(hif_stcopy-lof_st); ++ slowA=slow*Afreq_num; ++ slowM=slow*Mfreq_num; ++ if(p->noiseoffset[1][l]<-1){ ++ slowA*=(p->noiseoffset[1][l]+2); ++ slowM*=(p->noiseoffset[1][l]+2); ++ } ++ } ++ old_lof_st=lof_st; ++ old_hif_st=hif_st; ++ } + ++ if(l>=limit){ ++ postpoint-=shigh; ++ /* The following prevents an extreme reduction of residue. (2ch stereo only) */ ++ if( ((a>0.) && (b<0.)) || ((b>0.) && (a<0.)) ){ ++ hypot_reserve = fabs(fabs(a)-fabs(b)); ++ if(hypot_reserve < 0.001){ // 0~0.000999- ++ dummypoint = stereo_threshholds_rephase[g->coupling_postpointamp[blobno]]; ++ dummypoint = dummypoint+((postpoint-dummypoint)*(hypot_reserve*1000)); ++ if(postpoint > dummypoint) postpoint = dummypoint; ++ } ++ } ++ } ++ + if(l=limit && fabs(rM[l])=limit && rMs=limit)acc+=qM[l]*qM[l]; ++ } + }else{ + couple_lossless(rM[l],rA[l],qM+l,qA+l); + } +@@ -1185,40 +1793,106 @@ void _vp_couple(int blobno, + qA[l]=0.; + } + } +- ++ + if(p->vi->normal_point_p){ ++ int freqband_mid=j+16; ++ int freqband_flag=0; ++ int min_energy; ++ ++ rpacc=acc; ++ /* When the energy loss of a partition is large, NN is performed in the middle of partition. ++ for 48/44.1/32kHz */ ++ if(energy_loss==32 && fabs(qM[freqband_mid])>nnmid_th && acc>=p->vi->normal_thresh ++ && freqband_mid=pointlimit && rint(qM[freqband_mid])==0.f){ ++ if( ((mdctM[freqband_mid]>0.) && (mdctA[freqband_mid]<0.)) || ++ ((mdctA[freqband_mid]>0.) && (mdctM[freqband_mid]<0.)) ){ ++ acc-=1.f; ++ rpacc-=1.32; ++ }else{ ++ acc-=1.f; ++ rpacc-=1.f; ++ } ++ qM[freqband_mid]=unitnorm(qM[freqband_mid]); ++ freqband_flag=1; ++ nn_num++; ++ } ++ /* NN main (point stereo) */ + for(k=0;k=p->vi->normal_thresh;k++){ +- int l=mag_sort[i][j+k]; ++ int l; ++ l=mag_sort[i][j+k]; ++ if(freqband_mid==l && freqband_flag)continue; + if(l=pointlimit && rint(qM[l])==0.f){ ++ if( ((mdctM[l]>0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.)) ){ ++ if(rpaccvi->normal_thresh)continue; ++ acc-=1.f; ++ rpacc-=1.32; ++ }else{ ++ acc-=1.f; ++ rpacc-=1.f; ++ } + qM[l]=unitnorm(qM[l]); +- acc-=1.f; ++ nn_num++; + } +- } ++ } ++ /* The minimum energy complement. ++ for 48/44.1/32kHz */ ++ min_energy=32-energy_loss+nn_num; ++ if(min_energy<2 || (j<=p->min_nn_lp && min_energy==2)){ ++ int l; ++ float ab; ++ for(;k0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.)) ++ && ab<0.11)break; // 0.11 ++ if(rint(qM[l])==0.f && l>=pointlimit){ ++ qM[l]=unitnorm(qM[l]); ++ break; ++ } ++ } ++ } + } + } + } + } + } + +-/* AoTuV */ +-/** @ M2 ** +- The boost problem by the combination of noise normalization and point stereo is eased. +- However, this is a temporary patch. +- by Aoyumi @ 2004/04/18 ++/* aoTuV M5 ++ noise_compand_level of low frequency is determined from the level of high frequency. ++ by Aoyumi @ 2005/09/14 ++ ++ return value ++ [normal compander] 0 <> 1.0 [high compander] ++ -1 @ disable + */ ++float lb_loudnoise_fix(vorbis_look_psy *p, ++ float noise_compand_level, ++ float *logmdct, ++ int lW_modenumber, ++ int blocktype, int modenumber){ + +-void hf_reduction(vorbis_info_psy_global *g, +- vorbis_look_psy *p, +- vorbis_info_mapping0 *vi, +- float **mdct){ +- +- int i,j,n=p->n, de=0.3*p->m_val; +- int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; +- int start=p->vi->normal_start; +- +- for(i=0; icoupling_steps; i++){ +- /* for(j=start; jn, nq1=p->n25p, nq3=p->n75p; ++ double hi_th=0; ++ ++ if(p->m_val < 0.5)return(-1); /* 48/44.1/32kHz only */ ++ if(p->vi->normal_thresh>.45)return(-1); /* under q3 */ ++ ++ /* select trans. block(short>>long case). */ ++ if(!modenumber)return(-1); ++ if(blocktype || lW_modenumber)return(noise_compand_level); ++ ++ /* calculation of a threshold. */ ++ for(i=nq1; i-130)hi_th += logmdct[i]; ++ else hi_th += -130; ++ } ++ hi_th /= n; ++ ++ /* calculation of a high_compand_level */ ++ if(hi_th > -40.) noise_compand_level=-1; ++ else if(hi_th < -50.) noise_compand_level=1.; ++ else noise_compand_level=1.-((hi_th+50)/10); ++ ++ return(noise_compand_level); + } +--- lib/psy.h-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/psy.h 2007-04-23 17:54:23.000000000 +0200 +@@ -15,6 +15,8 @@ + + ********************************************************************/ + ++#define OPT_SORT ++ + #ifndef _V_PSY_H_ + #define _V_PSY_H_ + #include "smallft.h" +@@ -54,6 +56,9 @@ typedef struct vorbis_info_psy{ + int noisewindowfixed; + float noiseoff[P_NOISECURVES][P_BANDS]; + float noisecompand[NOISE_COMPAND_LEVELS]; ++ float noisecompand_high[NOISE_COMPAND_LEVELS]; ++ ++ float flacint; + + float max_curve_dB; + +@@ -110,7 +115,16 @@ typedef struct { + int total_octave_lines; + long rate; /* cache it */ + +- float m_val; /* Masking compensation value */ ++ int m3n[4]; /* number for M3 */ ++ int tonecomp_endp; /* for M4 */ ++ int min_nn_lp; /* for M6 */ ++ float tonecomp_thres; /* for M4 */ ++ float m_val; /* masking compensation value */ ++ ++ int st_freqlimit; /* for M6 */ ++ int n25p; ++ int n33p; ++ int n75p; + + } vorbis_look_psy; + +@@ -129,6 +143,7 @@ extern void _vp_remove_floor(vorbis_look + int sliding_lowpass); + + extern void _vp_noisemask(vorbis_look_psy *p, ++ float noise_compand_level, + float *logmdct, + float *logmask); + +@@ -144,7 +159,13 @@ extern void _vp_offset_and_mix(vorbis_lo + int offset_select, + float *logmask, + float *mdct, +- float *logmdct); ++ float *logmdct, ++ float *lastmdct, float *tempmdct, ++ float low_compand, ++ int end_block, ++ int blocktype, int modenumber, ++ int nW_modenumber, ++ int lW_blocktype, int lW_modenumber, int lW_no); + + extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd); + +@@ -163,7 +184,8 @@ extern void _vp_couple(int blobno, + int **mag_sort, + int **ifloor, + int *nonzero, +- int sliding_lowpass); ++ int sliding_lowpass, ++ float **mdct, float **res_org); + + extern void _vp_noise_normalize(vorbis_look_psy *p, + float *in,float *out,int *sortedindex); +@@ -176,10 +198,11 @@ extern int **_vp_quantize_couple_sort(vo + vorbis_info_mapping0 *vi, + float **mags); + +-extern void hf_reduction(vorbis_info_psy_global *g, +- vorbis_look_psy *p, +- vorbis_info_mapping0 *vi, +- float **mdct); ++extern float lb_loudnoise_fix(vorbis_look_psy *p, ++ float noise_compand_level, ++ float *logmdct, ++ int lW_modenumber, ++ int blocktype, int modenumber); + + + #endif +--- lib/vorbisenc.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/vorbisenc.c 2007-04-23 17:54:23.000000000 +0200 +@@ -370,11 +370,16 @@ static void vorbis_encode_tonemask_setup + + static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block, + compandblock *in, double *x){ +- int i,is=s; +- double ds=s-is; ++ int i,is=s, ishcm, hcm_stop=5; // high compander limit ++ double ds=s-is, dshcm; ++ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; ++ ++ /* the place was borrowed... */ ++ p->flacint=ds; + ++ /* interpolate the compander mapping */ + ds=x[is]*(1.-ds)+x[is+1]*ds; + is=(int)ds; + ds-=is; +@@ -383,9 +388,32 @@ static void vorbis_encode_compand_setup( + ds=1.; + } + ++ /* high compander setup */ ++ ishcm = is; ++ dshcm = ds+.3; ++ if(dshcm > 1.0){ ++ ishcm++; ++ dshcm=dshcm-1; ++ } ++ if(x[hcm_stop] < ((float)ishcm+dshcm)){ ++ ishcm = x[hcm_stop]; ++ dshcm = x[hcm_stop]-ishcm; ++ } ++ if(dshcm==0 && ishcm>0){ // the same ++ ishcm--; ++ dshcm=1.; ++ } ++ + /* interpolate the compander settings */ + for(i=0;inoisecompand[i]=in[is].data[i]*(1.-ds)+in[is+1].data[i]*ds; ++ /* interpolate the high compander settings */ ++ if(s < (float)hcm_stop){ ++ for(i=0;inoisecompand_high[i]=in[ishcm].data[i]*(1.-dshcm)+in[ishcm+1].data[i]*dshcm; ++ }else{ // disable high compander ++ for(i=0;inoisecompand_high[i]=0; ++ } + return; + } + +--- lib/codec_internal.h-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/codec_internal.h 2007-04-23 17:54:23.000000000 +0200 +@@ -82,6 +82,15 @@ typedef struct private_state { + bitrate_manager_state bms; + + ogg_int64_t sample_count; ++ ++ /* encode only ++ added by aoyumi */ ++ float *lownoise_compand_level; ++ float *nblock; /* lW logmdct buffer */ ++ float *tblock; /* temporal masking buffer (impulse block) */ ++ int lW_blocktype; /* last window block type */ ++ int lW_modenumber; /* last window mode number (0=short, 1=long) */ ++ int lW_no; /* the number of continuous window blocks (last window) */ + } private_state; + + /* codec_setup_info contains all the setup information specific to the +--- lib/info.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/info.c 2007-04-23 17:54:23.000000000 +0200 +@@ -416,7 +416,7 @@ static int _vorbis_pack_info(oggpack_buf + } + + static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ +- char temp[]="Xiph.Org libVorbis I 20050304"; ++ char temp[]="AO; aoTuV b5 [20061024] (based on Xiph.Org's libVorbis)"; + int bytes = strlen(temp); + + /* preamble */ +--- aoTuV_technical.txt-dist 2007-04-23 17:54:23.000000000 +0200 ++++ aoTuV_technical.txt 2007-04-23 17:54:23.000000000 +0200 +@@ -0,0 +1,144 @@ ++aoTuV beta5 technical information ++ ++ ++The differences from the aoTuV beta 4.51... ++ ++ 1. In order to work noise normalization correctly, the value of tone ++ masking is compressed under certain conditions. A floor curve approaches ++ the original audio spectrum line as a result. [New M4] ++ ++ 2. In order to cut down the bitrate, a part of M2 code of beta4 was ++ deleted. ++ ++@3. The ATH curve was changed slightly. ++ ++ 4. Pre-echo decreased slightly. This is based on change of M3 code. ++ ++ 5. In order to decrease artifact by collapse of audio energy, noise ++ normalization processing of point stereo was extended. [32/44.1/48kHz only] ++ ++ 6. The threshold of channel coupling (lossless <=> point) is changed dynamically. This is a method based on a certain idea. [M6] ++ ++...and I tune up many parameters. ++ ++ ++2006/10/24 ++Aoyumi ++ ++---------------------------------------------------------------------------- ++ ++aoTuV beta4.51 technical information ++ ++ ++The differences from the aoTuV beta 4.5... ++ ++ 1. The changed part of "scale.h" of Xiph.Org SVN was reflected in aoTuV. ++ This will solve the problem of the compile by gcc4. ++ ++ 2. A part of portion added by beta4.5 had caused memory access violation. ++ Depending on environment, a problem arises in qualiy-1/-2. This problem was ++ corrected. ++ ++ ++2005/11/17 ++Aoyumi ++ ++---------------------------------------------------------------------------- ++ ++aoTuV beta4.5 technical information ++ ++ ++The differences from the aoTuV beta 4... ++ ++ 1. M4 code of beta3 was deleted. M5 is added as what is replaced with it. ++ The advantage of this method is that the result stabilized more is obtained. ++ Instead, the change width of the bit rate becomes large rather than before. ++ [32/44.1/48kHz only] ++ ++ 2. New M4 was added. There is this for the same purpose as M1. However, ++ it is tuned up only in the low bit rate region according to work and ++ individual parameters. [32/44.1/48kHz only] ++ ++ 3. M2 code was extended. This decreases a specific noise problem. ++ [32/44.1/48kHz only] ++ ++...and I mainly tune up tone/noise masking and noise normalization parameters. ++ ++The above change is applied below quality3. ++ ++ ++2005/11/05 ++Aoyumi ++ ++---------------------------------------------------------------------------- ++ ++aoTuV beta4 technical information ++ ++ ++The differences from the aoTuV beta 3... ++ ++ 1. Adoption of new hypot (point stereo). This works in general better than ++ dipole/round hypot. And when residue is likely to decrease greatly at the ++ time of a reverse phase, added code is made to increase the ratio of lossless. ++ ++ 2. Change of ATH curve. This is not a big change. ++ ++ 3. Residue used for threshold calculation of channel coupling is changed. ++ This one seems to be good selection. ++ ++ 4. HF reduction code of beta3 was deleted. Now, this is not required. ++ ++ 5. The energy deficit of M4 code of beta3 -- correction of a bug Now. ++ ++ 6. The code for pulling downward floor of the frequency range which can ++ be easy to be heard was added (New M2). This works by the low bit rate and ++ has a comparatively good trade-off. ++ ++ 7. Change of threshold calculation of noise normalization. Moreover, it ++ takes phase information into consideration. ++ ++ ++...and I mainly tune up tone/noise masking and noise compander parameters. ++ ++ ++2005/06/18 ++Aoyumi ++ ++---------------------------------------------------------------------------- ++ ++aoTuV beta3 technical information ++ ++ ++The differences from the aoTuV beta 2 and Vorbis 1.1... ++ ++ 1. Dynamic impulse block noise control(q0-10). [32/44.1/48kHz only] ++ Conspicuous pre-echo is reduced. ++ ++ 2. New ATH curve. ++ ++ 3. In order to cancel that a small sound becomes unstable, the noise level ++ of low frequency is lowered under specific conditions. (Only below q3) ++ There is a greatest effect on a piano etc. [32/44.1/48kHz only] ++ ++ 4. The rate of lossless stereo is increased in specific conditions. This ++ improves many of conspicuous problems which a point stereo causes. (e.g ++ drumus's hiss/voice, guitar and brass's distortion) [32/44.1/48kHz only] ++ ++ 5. The action of the noise normalization of point stereo is corrected. It ++ was set to one of the causes of distortion in a long tone (e.g ++ strings/oboe/high tone voice). ++ ++ 6. The HF reduction code was not working normally. This is corrected and ++ it retuned up according to the present condition. [32/44.1/48kHz only] ++ ++ 7. The q-2 mode was added in all sampling frequencies. And nominal bitrate ++ of q-1 are changed into a more nearly average value. Although nominal ++ bitrate is more large at a low sampling frequency, average bitrate hardly ++ differs from the former version. ++ ++ ++...and I mainly tune up tone/noise masking parameters. ++ ++ ++2004/11/21 ++Aoyumi +--- aoTuV_README-1st.txt-dist 2007-04-23 17:54:23.000000000 +0200 ++++ aoTuV_README-1st.txt 2007-04-23 17:54:23.000000000 +0200 +@@ -0,0 +1,21 @@ ++aoTuV Beta 5 ++ ++"aoTuV" tunes up Xiph.Org's libvorbis uniquely. ++A license is taken as "BSD-style license" as well as original libvorbis. ++ ++ ++# NOTICE # ++ ++ Manuke's patch is used for improvement in the speed of sort processing. ++ When "#define OPT_SORT" of "lib/psy.h" is deleted, the conventional ++ processing method is used. ++ Thanks! Manuke. ++ ++ ++aoTuV based on ++ ++Copyright (c) 2002-2005 Xiph.Org Foundation ++Copyright (c) 2003-2006 Aoyumi ++ ++ ++AUTHOR : aoyumi +--- COPYING-dist 2005-11-28 06:43:25.000000000 +0100 ++++ COPYING 2007-04-23 17:54:23.000000000 +0200 +@@ -1,4 +1,5 @@ +-Copyright (c) 2002-2004 Xiph.org Foundation ++aoTuV - Copyright (c) 2003-2006 Aoyumi ++libvorbis - Copyright (c) 2002-2005 Xiph.org Foundation + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions diff --git a/libvorbis-1.1.2-warning-fixes.diff b/libvorbis-1.1.2-warning-fixes.diff index 7533024..ffbee63 100644 --- a/libvorbis-1.1.2-warning-fixes.diff +++ b/libvorbis-1.1.2-warning-fixes.diff @@ -1,6 +1,6 @@ ---- lib/mapping0.c-dist 2005-12-02 15:53:22.000000000 +0100 -+++ lib/mapping0.c 2005-12-02 15:53:30.000000000 +0100 -@@ -586,8 +586,8 @@ static int mapping0_forward(vorbis_block +--- lib/mapping0.c-dist 2007-04-23 18:01:34.000000000 +0200 ++++ lib/mapping0.c 2007-04-23 18:01:44.000000000 +0200 +@@ -623,8 +623,8 @@ static int mapping0_forward(vorbis_block float **couple_bundle=alloca(sizeof(*couple_bundle)*vi->channels); int *zerobundle=alloca(sizeof(*zerobundle)*vi->channels); int **sortindex=alloca(sizeof(*sortindex)*vi->channels); @@ -11,7 +11,7 @@ if(info->coupling_steps){ mag_memo=_vp_quantize_couple_memo(vb, -@@ -735,7 +735,7 @@ static int mapping0_inverse(vorbis_block +@@ -783,7 +783,7 @@ static int mapping0_inverse(vorbis_block codec_setup_info *ci=vi->codec_setup; private_state *b=vd->backend_state; vorbis_info_mapping0 *info=(vorbis_info_mapping0 *)l; @@ -20,8 +20,8 @@ int i,j; long n=vb->pcmend=ci->blocksizes[vb->W]; ---- lib/scales.h-dist 2005-12-02 15:53:22.000000000 +0100 -+++ lib/scales.h 2005-12-02 16:00:31.000000000 +0100 +--- lib/scales.h-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/scales.h 2007-04-23 18:01:44.000000000 +0200 @@ -25,7 +25,7 @@ #define VORBIS_IEEE_FLOAT32 1 #ifdef VORBIS_IEEE_FLOAT32 @@ -49,9 +49,9 @@ if(x<0)return(-1.f); return(1.f); } ---- lib/psy.c-dist 2005-12-02 15:53:22.000000000 +0100 -+++ lib/psy.c 2005-12-02 15:53:30.000000000 +0100 -@@ -553,7 +553,7 @@ static void bark_noise_hybridmp(int n,co +--- lib/psy.c-dist 2007-04-23 18:01:34.000000000 +0200 ++++ lib/psy.c 2007-04-23 18:01:44.000000000 +0200 +@@ -623,7 +623,7 @@ static void bark_noise_hybridmp(int n,co int i; int lo, hi; @@ -60,17 +60,8 @@ float w, x, y; tN = tX = tXX = tY = tXY = 0.f; -@@ -1214,7 +1214,7 @@ void hf_reduction(vorbis_info_psy_global - - int i,j,n=p->n, de=0.3*p->m_val; - int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; -- int start=p->vi->normal_start; -+ /*int start=p->vi->normal_start;*/ - - for(i=0; icoupling_steps; i++){ - /* for(j=start; jinfo; @@ -89,8 +80,8 @@ /* move all this setup out later */ int samples_per_partition=info->grouping; ---- lib/vorbisfile.c-dist 2005-12-02 15:53:22.000000000 +0100 -+++ lib/vorbisfile.c 2005-12-02 15:53:30.000000000 +0100 +--- lib/vorbisfile.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/vorbisfile.c 2007-04-23 18:01:44.000000000 +0200 @@ -987,7 +987,7 @@ int ov_raw_seek(OggVorbis_File *vf,ogg_i int lastblock=0; int accblock=0; @@ -100,8 +91,8 @@ ogg_stream_init(&work_os,vf->current_serialno); /* get the memory ready */ ogg_stream_reset(&work_os); /* eliminate the spurious OV_HOLE ---- lib/floor1.c-dist 2005-12-02 15:53:22.000000000 +0100 -+++ lib/floor1.c 2005-12-02 15:53:30.000000000 +0100 +--- lib/floor1.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ lib/floor1.c 2007-04-23 18:01:44.000000000 +0200 @@ -413,7 +413,7 @@ static int accumulate_fit(const float *f int x0, int x1,lsfit_acc *a, int n,vorbis_info_floor1 *info){ @@ -129,8 +120,8 @@ long posts=look->posts; codec_setup_info *ci=vb->vd->vi->codec_setup; int out[VIF_POSIT+2]; ---- examples/seeking_example.c-dist 2005-12-02 15:53:22.000000000 +0100 -+++ examples/seeking_example.c 2005-12-02 15:53:30.000000000 +0100 +--- examples/seeking_example.c-dist 2005-11-28 06:43:25.000000000 +0100 ++++ examples/seeking_example.c 2007-04-23 18:01:44.000000000 +0200 @@ -130,7 +130,7 @@ int main(){ for(i=0;i<1000;i++){ diff --git a/libvorbis.changes b/libvorbis.changes index d654f74..3ee7884 100644 --- a/libvorbis.changes +++ b/libvorbis.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Apr 23 18:06:06 CEST 2007 - tiwai@suse.de + +- use aoTuV beta5 patch: + * The action of noise normalization has been improved. + * The threshold of a stereo mode change was calculated + dynamically. + * Noise control of an impulse block was changed (quality 0-10 + / 32-48kHz). And pre-echo decreased slightly. + * Tuning of each part was redone according to above-mentioned + changed part and additional part. + ------------------------------------------------------------------- Mon Apr 16 15:07:19 CEST 2007 - tiwai@suse.de diff --git a/libvorbis.spec b/libvorbis.spec index 748ab4a..d1901e8 100644 --- a/libvorbis.spec +++ b/libvorbis.spec @@ -14,14 +14,14 @@ Name: libvorbis BuildRequires: libogg-devel pkgconfig Summary: The Vorbis General Audio Compression Codec Version: 1.1.2 -Release: 43 +Release: 45 Group: System/Libraries License: BSD License and BSD-like URL: http://www.vorbis.com/ Source: %{name}-%{version}.tar.bz2 Patch1: libvorbis-lib64.dif Patch2: libvorbis-m4.dif -# Patch5: libvorbis-%{version}-aotuv-b4.diff +Patch5: libvorbis-%{version}-aotuv-b5.diff Patch6: libvorbis-%{version}-warning-fixes.diff Patch7: libvorbis-cflags.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -58,7 +58,7 @@ Authors: %prep %setup %patch2 -# %patch5 -p1 +%patch5 %patch6 %patch7 if [ "%_lib" == "lib64" ]; then @@ -77,6 +77,7 @@ make %install make DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir}/%{name}-devel install cp COPYING AUTHORS README $RPM_BUILD_ROOT%{_docdir}/%{name}-devel +cp *.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-devel # remove unneeded files rm -f $RPM_BUILD_ROOT%{_libdir}/*.la @@ -102,6 +103,15 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %changelog +* Mon Apr 23 2007 - tiwai@suse.de +- use aoTuV beta5 patch: + * The action of noise normalization has been improved. + * The threshold of a stereo mode change was calculated + dynamically. + * Noise control of an impulse block was changed (quality 0-10 + / 32-48kHz). And pre-echo decreased slightly. + * Tuning of each part was redone according to above-mentioned + changed part and additional part. * Mon Apr 16 2007 - tiwai@suse.de - follow library packaging policy * move docs to devel package