From 930e302da0ac58855df54707d9784c29cf974c54 Mon Sep 17 00:00:00 2001 From: Monty Date: Sat, 29 Jun 2002 11:18:31 +0000 Subject: [PATCH] Commit experimental 48 kbps stere 44kHz mode. svn path=/trunk/vorbis/; revision=3443 --- lib/modes/psych_44.h | 46 +++++++++++++++++++++++++++++++- lib/modes/setup_44.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 2 deletions(-) diff --git a/lib/modes/psych_44.h b/lib/modes/psych_44.h index 9435c17..c9cb1ea 100644 --- a/lib/modes/psych_44.h +++ b/lib/modes/psych_44.h @@ -11,7 +11,7 @@ ******************************************************************** function: key psychoacoustic settings for 44.1/48kHz - last mod: $Id: psych_44.h,v 1.17 2002/06/29 09:45:28 xiphmont Exp $ + last mod: $Id: psych_44.h,v 1.18 2002/06/29 11:18:31 xiphmont Exp $ ********************************************************************/ @@ -136,6 +136,18 @@ static vp_adjblock _vp_tonemask_adj_otherblock[11]={ {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */ }; +static noise3 _psy_noisebias_trans_low[2]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + /* 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,-10, -4, -2, 0, 0, 0, 2, 4, 10}, + {-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, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, +}; + static noise3 _psy_noisebias_trans[11]={ /* 63 125 250 500 1k 2k 4k 8k 16k*/ /* 0 */ @@ -184,6 +196,18 @@ static noise3 _psy_noisebias_trans[11]={ {-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}}, }; +static noise3 _psy_noisebias_long_low[2]={ + /*63 125 250 500 1k 2k 4k 8k 16k*/ + /* 0 */ + {{{-10,-10,-10,-10,-10,-10, -8, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, 0, 0, 0, 0, 2, 4, 10}, + {-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, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -2, 0, 0, 0, 0, 2, 4, 10}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, +}; + static noise3 _psy_noisebias_long[11]={ /*63 125 250 500 1k 2k 4k 8k 16k*/ /* 0 */ @@ -379,6 +403,19 @@ static int _psy_ath_abs[11]={ /* various stereo possibilities */ /* stereo mode by base quality level */ +static adj_stereo _psy_stereo_modes_44_low[2]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ + {{ 5, 5, 5, 5, 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}, + { 10, 12, 14, 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 1 */ + {{ 5, 5, 5, 5, 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}, + { 10, 12, 14, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +}; + static adj_stereo _psy_stereo_modes_44[11]={ /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ {{ 5, 5, 5, 5, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, @@ -439,6 +476,10 @@ static adj_stereo _psy_stereo_modes_44[11]={ /* tone master attenuation by base quality mode and bitrate tweak */ +static att3 _psy_tone_masteratt_44_low[2]={ + {{ 45, 20, 8}, -6, 1.25}, /* 0 */ + {{ 45, 20, 8}, -6, 1.25}, /* 0 */ +}; static att3 _psy_tone_masteratt_44[11]={ {{ 45, 20, 8}, -6, 1.25}, /* 0 */ {{ 40, 14, 4}, -4, 1.25}, /* 1 */ @@ -454,6 +495,9 @@ static att3 _psy_tone_masteratt_44[11]={ }; /* lowpass by mode **************/ +static double _psy_lowpass_44_low[2]={ + 15.1,15.1, +}; static double _psy_lowpass_44[11]={ 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. }; diff --git a/lib/modes/setup_44.h b/lib/modes/setup_44.h index d36cb6e..1179197 100644 --- a/lib/modes/setup_44.h +++ b/lib/modes/setup_44.h @@ -11,7 +11,7 @@ ******************************************************************** function: toplevel settings for 44.1/48kHz - last mod: $Id: setup_44.h,v 1.3 2002/06/29 09:45:29 xiphmont Exp $ + last mod: $Id: setup_44.h,v 1.4 2002/06/29 11:18:31 xiphmont Exp $ ********************************************************************/ @@ -19,13 +19,28 @@ #include "modes/residue_44.h" #include "modes/psych_44.h" +static double rate_mapping_44_stereo_low[2]={ + 22500.,32000. +}; + static double rate_mapping_44_stereo[11]={ 32000.,40000.,48000.,56000.,64000., 80000.,96000.,112000.,128000.,160000.,250001. }; +static double quality_mapping_44_stereo_low[2]={ + -.1,.0, +}; static double quality_mapping_44_stereo[11]={ .0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 }; + +static int blocksize_short_44_low[1]={ + 512 +}; +static int blocksize_long_44_low[1]={ + 4096 +}; + static int blocksize_short_44[10]={ 256,256,256,256,256,256,256,256,256,256 }; @@ -41,12 +56,18 @@ static double _psy_compand_long_mapping[11]={ static double _global_mapping_44[11]={ 0., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. }; +static int _floor_short_mapping_44_low[2]={ + 1,1, +}; static int _floor_short_mapping_44[11]={ 0,0,2,2,4,5,5,5,5,5,5 }; static int _floor_long_mapping_44[11]={ 7,7,7,7,7,7,7,7,7,7,7 }; +static int _floor_long_mapping_44_low[11]={ + 8,8 +}; ve_setup_data_template ve_setup_44_stereo={ 10, @@ -99,3 +120,54 @@ ve_setup_data_template ve_setup_44_stereo={ _mapres_template_44_stereo }; +ve_setup_data_template ve_setup_44_stereo_low={ + 1, + rate_mapping_44_stereo_low, + quality_mapping_44_stereo_low, + 2, + 40000, + 50000, + + blocksize_short_44_low, + blocksize_long_44_low, + + _psy_tone_masteratt_44_low, + _psy_tone_0dB, + _psy_tone_suppress, + + _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + + _psy_noiseguards_44, + _psy_noisebias_trans_low, + _psy_noisebias_trans_low, + _psy_noisebias_trans_low, + _psy_noisebias_long_low, + _psy_noise_suppress, + + _psy_compand_44, + _psy_compand_short_mapping, + _psy_compand_long_mapping, + + {_noise_start_short_44,_noise_start_long_44}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + + _psy_ath_floater, + _psy_ath_abs, + + _psy_lowpass_44_low, + + _psy_global_44, + _global_mapping_44, + _psy_stereo_modes_44_low, + + _floor_44_books, + _floor_44, + _floor_short_mapping_44_low, + _floor_long_mapping_44_low, + + _mapres_template_44_stereo +}; + -- 2.7.4