Ticket #3266: aoTuV-beta3.patch
File aoTuV-beta3.patch, 90.2 KB (added by namely_void@…, 19 years ago) |
---|
-
aoTuV_README.txt
diff -Nru ../libvorbis-1.1.0-orig/aoTuV_README.txt ./aoTuV_README.txt
old new 1 aoTuV beta3 release note 2 3 "aoTuV" tunes up Xiph.Org's libvorbis uniquely. 4 A license is taken as "BSD-style license" as well as original libvorbis. 5 6 7 # NOTICE # 8 9 A part of Nominal bitrate has changed. 10 11 Manuke's patch is used for improvement in the speed of sort processing. 12 When "#define OPT_SORT" of "lib/psy.h" is deleted, the conventional 13 processing method is used. 14 15 16 17 Thanks! Manuke. 18 19 20 aoTuV based on <Xiph.Org libvorbis> 21 22 Copyright (c) 2002,2003,2004 Xiph.Org Foundation 23 Copyright (c) 2003,2004 Aoyumi 24 25 26 AUTHOR : aoyumi <aoyumi@inter7.jp> 27 No newline at end of file -
aoTuV_technical.txt
diff -Nru ../libvorbis-1.1.0-orig/aoTuV_technical.txt ./aoTuV_technical.txt
old new 1 aoTuV beta3 technical information 2 3 The differences from the aoTuV beta 2 and Vorbis 1.1... 4 5 6 7 1. Dynamic impulse block noise control(q0-10). [32/44.1/48kHz only] 8 Conspicuous pre-echo is reduced. 9 10 2. New ATH curve. 11 12 3. In order to cancel that a small sound becomes unstable, the noise level 13 of low frequency is lowered under specific conditions. (Only below q3) 14 There is a greatest effect on a piano etc. [32/44.1/48kHz only] 15 16 4. The rate of lossless stereo is increased in specific conditions. This 17 improves many of conspicuous problems which a point stereo causes. (e.g 18 drumus's hiss/voice, guitar and brass's distortion) [32/44.1/48kHz only] 19 20 5. The action of the noise normalization of point stereo is corrected. It 21 was set to one of the causes of distortion in a long tone (e.g 22 strings/oboe/high tone voice). 23 24 6. The HF reduction code was not working normally. This is corrected and 25 it retuned up according to the present condition. [32/44.1/48kHz only] 26 27 7. The q-2 mode was added in all sampling frequencies. And nominal bitrate 28 of q-1 are changed into a more nearly average value. Although nominal 29 bitrate is more large at a low sampling frequency, average bitrate hardly 30 differs from the former version. 31 32 33 ...and I mainly tune up tone/noise masking parameters. 34 35 36 37 2004/11/21 38 Aoyumi 39 No newline at end of file -
lib/block.c
diff -Nru ../libvorbis-1.1.0-orig/lib/block.c ./lib/block.c
old new 287 287 b=v->backend_state; 288 288 b->psy_g_look=_vp_global_look(vi); 289 289 290 /* added by aoyumi */ 291 b->nblock = _ogg_calloc((128*vi->channels), sizeof(*b->nblock)); 292 b->tblock = _ogg_calloc((128*vi->channels), sizeof(*b->tblock)); 293 290 294 /* Initialize the envelope state storage */ 291 295 b->ve=_ogg_calloc(1,sizeof(*b->ve)); 292 296 _ve_envelope_init(b->ve,vi); … … 344 348 345 349 drft_clear(&b->fft_look[0]); 346 350 drft_clear(&b->fft_look[1]); 351 352 /* added by aoyumi */ 353 if(b->nblock) _ogg_free(b->nblock); 354 if(b->tblock) _ogg_free(b->tblock); 347 355 348 356 } 349 357 -
lib/codec_internal.h
diff -Nru ../libvorbis-1.1.0-orig/lib/codec_internal.h ./lib/codec_internal.h
old new 82 82 bitrate_manager_state bms; 83 83 84 84 ogg_int64_t sample_count; 85 86 /* encode only 87 added by aoyumi */ 88 float *nblock; /* lW logmdct buffer */ 89 float *tblock; /* temporal masking buffer (impulse block) */ 90 int lW_blocktype; /* last window block type */ 91 int lW_modenumber; /* last window mode number (0=short, 1=long) */ 92 int lW_no; /* the number of continuous window blocks (last window) */ 85 93 } private_state; 86 94 87 95 /* codec_setup_info contains all the setup information specific to the -
lib/info.c
diff -Nru ../libvorbis-1.1.0-orig/lib/info.c ./lib/info.c
old new 416 416 } 417 417 418 418 static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ 419 char temp[]=" Xiph.Org libVorbis I 20040629";419 char temp[]="AO; aoTuV b3 [20041120] (based on Xiph.Org's libVorbis)"; 420 420 int bytes = strlen(temp); 421 421 422 422 /* preamble */ -
lib/mapping0.c
diff -Nru ../libvorbis-1.1.0-orig/lib/mapping0.c ./lib/mapping0.c
old new 380 380 381 381 float *logmdct =logfft+n/2; 382 382 float *logmask =logfft; 383 384 float *lastmdct = b->nblock+i*128; 385 float *tempmdct = b->tblock+i*128; 383 386 384 387 vb->mode=modenumber; 385 388 … … 467 470 1, 468 471 logmask, 469 472 mdct, 470 logmdct); 473 logmdct, 474 lastmdct, tempmdct, 475 blocktype, modenumber, 476 vb->nW, 477 b->lW_blocktype, b->lW_modenumber, b->lW_no); 471 478 472 479 #if 0 473 480 if(vi->channels==2){ … … 510 517 2, 511 518 logmask, 512 519 mdct, 513 logmdct); 520 logmdct, 521 lastmdct, tempmdct, 522 blocktype, modenumber, 523 vb->nW, 524 b->lW_blocktype, b->lW_modenumber, b->lW_no); 514 525 515 526 #if 0 516 527 if(vi->channels==2){ … … 533 544 0, 534 545 logmask, 535 546 mdct, 536 logmdct); 547 logmdct, 548 lastmdct, tempmdct, 549 blocktype, modenumber, 550 vb->nW, 551 b->lW_blocktype, b->lW_modenumber, b->lW_no); 537 552 538 553 #if 0 539 554 if(vi->channels==2) … … 691 706 mag_sort, 692 707 ilogmaskch, 693 708 nonzero, 694 ci->psy_g_param.sliding_lowpass[vb->W][k]); 709 ci->psy_g_param.sliding_lowpass[vb->W][k], 710 blocktype, modenumber, 711 b->lW_blocktype, b->lW_modenumber); 695 712 } 696 713 697 714 /* classify and encode by submap */ … … 717 734 couple_bundle,NULL,zerobundle,ch_in_bundle,classifications); 718 735 } 719 736 737 /* set last-window type & number */ 738 if((blocktype == b->lW_blocktype) && (modenumber == b->lW_modenumber)) b->lW_no++; 739 else b->lW_no = 1; 740 b->lW_blocktype = blocktype; 741 b->lW_modenumber = modenumber; 720 742 /* ok, done encoding. Next protopacket. */ 721 743 } 722 744 -
lib/masking.h
diff -Nru ../libvorbis-1.1.0-orig/lib/masking.h ./lib/masking.h
old new 23 23 24 24 #define MAX_ATH 88 25 25 static float ATH[]={ 26 /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, 26 /* original ATH */ 27 /*15*/ //-51, -52, -53, -54, -55, -56, -57, -58, 28 /*31*/ //-59, -60, -61, -62, -63, -64, -65, -66, 29 /*63*/ //-67, -68, -69, -70, -71, -72, -73, -74, 30 /*125*/ //-75, -76, -77, -78, -80, -81, -82, -83, 31 /*250*/ //-84, -85, -86, -87, -88, -88, -89, -89, 32 /*500*/ //-90, -91, -91, -92, -93, -94, -95, -96, 33 /*1k*/ //-96, -97, -98, -98, -99, -99,-100,-100, 34 /*2k*/ //-101,-102,-103,-104,-106,-107,-107,-107, 35 /*4k*/ //-107,-105,-103,-102,-101, -99, -98, -96, 36 /*8k*/ //-95, -95, -96, -97, -96, -95, -93, -90, 37 /*16k*/ //-80, -70, -50, -40, -30, -30, -30, -30 38 /* Aoyumi's ATH (fixed) */ 39 /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, 27 40 /*31*/ -59, -60, -61, -62, -63, -64, -65, -66, 28 /*63*/ -67, -68, -69, -70, -71, -7 2, -73, -74,29 /*125*/ -7 5, -76, -77, -78, -80, -81, -82, -83,30 /*250*/ -8 4, -85, -86, -87, -88, -88, -89, -89,31 /*500*/ -9 0, -91, -91, -92, -93, -94, -95, -96,32 /*1k*/ -9 6, -97, -98, -98, -99, -99,-100,-100,33 /*2k*/ -101,-102,-103,-104,-106,-107,-107,-10 7,34 /*4k*/ -10 7,-105,-103,-102,-101, -99, -98, -96,35 /*8k*/ -9 5, -95, -96, -97, -96, -95, -93, -90,41 /*63*/ -67, -68, -69, -70, -71, -73, -74, -75, 42 /*125*/ -77, -79, -81, -82, -83, -84, -85, -86, 43 /*250*/ -87, -88, -89, -90, -91, -91, -92, -92, 44 /*500*/ -93, -94, -95, -95, -96, -96, -96, -97, 45 /*1k*/ -97, -96, -96, -96, -97, -98, -99,-100, 46 /*2k*/ -101,-102,-103,-104,-106,-107,-107,-106, 47 /*4k*/ -104,-102,-101,-100,-100, -99, -98, -97, 48 /*8k*/ -96, -95, -96, -97, -96, -95, -93, -89, 36 49 /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 37 50 }; 38 51 -
lib/modes/psych_11.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/psych_11.h ./lib/modes/psych_11.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 static double _psy_lowpass_11[ 3]={4.5,5.5,30.,};18 static double _psy_lowpass_11[4]={4,4.5,5.5,30.,}; 19 19 20 static att3 _psy_tone_masteratt_11[3]={ 21 {{ 30, 25, 12}, 0, 0}, /* 0 */ 22 {{ 30, 25, 12}, 0, 0}, /* 0 */ 23 {{ 20, 0, -14}, 0, 0}, /* 0 */ 20 static att3 _psy_tone_masteratt_11[4]={ 21 {{ 30, 25, 12}, 0, 0}, /* -2 */ 22 {{ 30, 25, 12}, 0, 0}, /* -1 */ 23 {{ 30, 25, 12}, 0, 0}, /* 0 */ 24 {{ 20, 0, -14}, 0, 0}, /* 10 */ 24 25 }; 25 26 26 static vp_adjblock _vp_tonemask_adj_11[ 3]={27 static vp_adjblock _vp_tonemask_adj_11[4]={ 27 28 /* adjust for mode zero */ 28 29 /* 63 125 250 500 1 2 4 8 16 */ 29 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */ 30 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */ 31 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */ 30 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* -2 */ 31 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* -1 */ 32 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 0 */ 33 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 10 */ 32 34 }; 33 35 34 36 35 static noise3 _psy_noisebias_11[ 3]={37 static noise3 _psy_noisebias_11[4]={ 36 38 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 37 39 {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, 40 {-12,-12,-12,-12,-10,-10, -5, 0, 2, 4, 4, 5, 5, 10, 99, 99, 99}, 41 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, 42 43 {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, 38 44 {-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99}, 39 45 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, 40 46 … … 47 53 {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, 48 54 }; 49 55 50 static double _noise_thresh_11[ 3]={.3,.5,.5 };56 static double _noise_thresh_11[4]={ .3,.3,.5,.5 }; 51 57 -
lib/modes/psych_16.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/psych_16.h ./lib/modes/psych_16.h
old new 16 16 ********************************************************************/ 17 17 18 18 /* stereo mode by base quality level */ 19 static adj_stereo _psy_stereo_modes_16[ 4]={19 static adj_stereo _psy_stereo_modes_16[5]={ 20 20 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ 21 21 {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 22 22 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, … … 24 24 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 25 25 {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 26 26 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, 27 { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, 28 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 29 {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 30 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, 27 31 { 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4}, 28 32 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 29 33 {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, … … 36 40 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 37 41 }; 38 42 39 static double _psy_lowpass_16[ 4]={6.5,8,30.,99.};43 static double _psy_lowpass_16[5]={6.,6.5,8,30.,99.}; 40 44 41 static att3 _psy_tone_masteratt_16[4]={ 42 {{ 30, 25, 12}, 0, 0}, /* 0 */ 43 {{ 25, 22, 12}, 0, 0}, /* 0 */ 44 {{ 20, 12, 0}, 0, 0}, /* 0 */ 45 {{ 15, 0, -14}, 0, 0}, /* 0 */ 45 static att3 _psy_tone_masteratt_16[5]={ 46 {{ 30, 25, 12}, 0, 0}, /* -2 */ 47 {{ 30, 25, 12}, 0, 0}, /* -1 */ 48 {{ 25, 22, 12}, 0, 0}, /* 0.5 */ 49 {{ 20, 12, 0}, 0, 0}, /* 5 */ 50 {{ 15, 0, -14}, 0, 0}, /* 10 */ 46 51 }; 47 52 48 static vp_adjblock _vp_tonemask_adj_16[ 4]={53 static vp_adjblock _vp_tonemask_adj_16[5]={ 49 54 /* adjust for mode zero */ 50 55 /* 63 125 250 500 1 2 4 8 16 */ 51 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */ 52 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */ 53 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ 54 {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ 56 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* -2 */ 57 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* -1 */ 58 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0.5 */ 59 {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 5 */ 60 {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */ 55 61 }; 56 62 57 63 58 static noise3 _psy_noisebias_16_short[ 4]={64 static noise3 _psy_noisebias_16_short[5]={ 59 65 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 60 66 {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, 67 {-12,-12,-12,-12,-12, -7, -4, -2, 3, 3, 4, 5, 5, 6, 8, 8, 15}, 68 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 69 70 {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, 61 71 {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, 62 72 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 63 73 … … 74 84 {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, 75 85 }; 76 86 77 static noise3 _psy_noisebias_16_impulse[ 4]={87 static noise3 _psy_noisebias_16_impulse[5]={ 78 88 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 79 89 {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, 90 {-12,-12,-12,-12,-12, -7, -4, -2, 3, 3, 4, 5, 5, 6, 8, 8, 15}, 91 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 92 93 {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, 80 94 {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, 81 95 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 82 96 … … 93 107 {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, 94 108 }; 95 109 96 static noise3 _psy_noisebias_16[ 4]={110 static noise3 _psy_noisebias_16[5]={ 97 111 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 98 112 {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, 113 {-10,-10,-10,-10,-10, -5, -2, -2, 3, 3, 3, 4, 5, 6, 8, 8, 15}, 114 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 115 116 {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, 99 117 {-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15}, 100 118 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, 101 119 … … 112 130 {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, 113 131 }; 114 132 115 static double _noise_thresh_16[ 4]={.3,.5,.5,.5 };133 static double _noise_thresh_16[5]={ .3,.3,.5,.5,.5 }; 116 134 117 static int _noise_start_16[ 3]={256,256,9999 };118 static int _noise_part_16[ 4]={8,8,8,8 };135 static int _noise_start_16[4]={ 256,256,256,9999 }; 136 static int _noise_part_16[5]={ 8,8,8,8,8 }; 119 137 120 static int _psy_ath_floater_16[ 4]={121 -100,-100,-100,-10 5,138 static int _psy_ath_floater_16[5]={ 139 -100,-100,-100,-100,-105, 122 140 }; 123 141 124 static int _psy_ath_abs_16[ 4]={125 -130,-130,-130,-1 40,142 static int _psy_ath_abs_16[5]={ 143 -130,-130,-130,-130,-140, 126 144 }; 127 145 128 146 -
lib/modes/psych_44.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/psych_44.h ./lib/modes/psych_44.h
old new 18 18 19 19 /* preecho trigger settings *****************************************/ 20 20 21 static vorbis_info_psy_global _psy_global_44[5]={ 22 21 static vorbis_info_psy_global _psy_global_44[6]={ 22 /* 23 { lines per eighth octave, 24 { pre-echo thresh.}, 25 { post-echo thresh.}, stretch penalty, pre-echo minimum energy, 26 ampmax att 1/sec, 27 {coupling point(kHz)},{{coupling point limit0},{coupling point limit1}}, 28 {coupling pre-point amp},{coupling post-point amp},{{sliding lowpass0},{sliding lowpass1}} 29 }, 30 */ 31 /* q-2 */ 32 {8, /* lines per eighth octave */ 33 {24.f,14.f,14.f,14.f,14.f,14.f,14.f}, 34 {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, 35 -6.f, 36 {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} 37 }, 23 38 {8, /* lines per eighth octave */ 24 39 {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, 25 40 {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, … … 39 54 {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} 40 55 }, 41 56 {8, /* lines per eighth octave */ 42 {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, 57 // {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, 58 {10.f,8.f,8.f,6.f,6.f,6.f,7.f}, 43 59 {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, 44 60 -6.f, 45 61 {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} 46 62 }, 47 63 {8, /* lines per eighth octave */ 48 64 {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, 49 {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, 65 // {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, 66 {-15.f,-14.f,-10.f,-10.f,-10.f,-11.f,-12.f}, 0,-85.f, 50 67 -6.f, 51 68 {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} 52 69 }, … … 56 73 static compandblock _psy_compand_44[6]={ 57 74 /* sub-mode Z short */ 58 75 {{ 59 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 60 8, 9,10,11,12,13,14, 15, /* 15dB */ 61 16,17,18,19,20,21,22, 23, /* 23dB */ 62 24,25,26,27,28,29,30, 31, /* 31dB */ 76 // 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 77 // 8, 9,10,11,12,13,14, 15, /* 15dB */ 78 // 16,17,18,19,20,21,22, 23, /* 23dB */ 79 // 24,25,26,27,28,29,30, 31, /* 31dB */ 80 // 32,33,34,35,36,37,38, 39, /* 39dB */ 81 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ 82 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ 83 7, 8, 9,10,11,13,15, 17, /* 23dB */ 84 20,23,26,27,28,29,30, 31, /* 31dB */ 63 85 32,33,34,35,36,37,38, 39, /* 39dB */ 64 86 }}, 65 87 /* mode_Z nominal short */ … … 80 102 }}, 81 103 /* sub-mode Z long */ 82 104 {{ 105 // 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 106 // 8, 9,10,11,12,13,14, 15, /* 15dB */ 107 // 16,17,18,19,20,21,22, 23, /* 23dB */ 108 // 24,25,26,27,28,29,30, 31, /* 31dB */ 109 // 32,33,34,35,36,37,38, 39, /* 39dB */ 83 110 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 84 8, 9,10,11,12,1 3,14, 15, /* 15dB */85 1 6,17,18,19,20,21,22, 23, /* 23dB */86 2 4,25,26,27,28,29,30, 31, /* 31dB */111 8, 9,10,11,12,12,13, 13, /* 15dB */ 112 13,14,14,14,15,15,15, 17, /* 23dB */ 113 20,23,26,27,28,29,30, 31, /* 31dB */ 87 114 32,33,34,35,36,37,38, 39, /* 39dB */ 88 115 }}, 89 116 /* mode_Z nominal long */ … … 106 133 107 134 /* tonal masking curve level adjustments *************************/ 108 135 109 static vp_adjblock _vp_tonemask_adj_longblock[12]={ 110 136 static vp_adjblock _vp_tonemask_adj_longblock[13]={ 111 137 /* 63 125 250 500 1 2 4 8 16 */ 112 138 113 {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */ 139 {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1, 0, 0, 1, 1, 1}}, /* -2(addition) */ 140 141 {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1, 0, 0, 0, 0}}, /* -1 */ 114 142 115 143 /* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ 116 {{ - 4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */144 {{ -5,-11,-14,-15,-15,-14,-14,-14,-13,-12,-10, -2, -2, -1, -1, 0, 0}}, /* 0 */ 117 145 118 146 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ 119 {{ -6,-12,-1 4,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */147 {{ -6,-12,-15,-16,-16,-15,-14,-14,-13,-12,-10, -2, -2, -1, -1, 0, 0}}, /* 1 */ 120 148 121 149 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ 122 {{-12,-13,-1 4,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */123 150 {{-12,-13,-15,-16,-16,-15,-15,-14,-14,-12,-12, -5, -4, -2, -1, 0, 0}}, /* 2 */ 151 124 152 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ 125 {{-15,-15,-1 5,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1,0}}, /* 3 */153 {{-15,-15,-16,-16,-16,-15,-15,-14,-14,-13,-13,-12, -7 -2, -1, -1 , 0}}, /* 3 */ 126 154 127 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//*4 */128 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */155 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ 156 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -1, -1 , 0}}, /* 4 */ 129 157 130 158 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ 131 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */159 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -1 , 0}}, /* 5 */ 132 160 133 161 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ 134 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -8, -4, -2, -2,0}}, /* 6 */135 162 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 6 */ 163 136 164 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ 137 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 7 */165 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 7 */ 138 166 139 167 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ 140 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 8 */168 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 8 */ 141 169 142 170 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ 143 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 9 */171 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 9 */ 144 172 145 173 /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ 146 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 10 */174 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 10 */ 147 175 }; 148 176 149 static vp_adjblock _vp_tonemask_adj_otherblock[1 2]={177 static vp_adjblock _vp_tonemask_adj_otherblock[13]={ 150 178 /* 63 125 250 500 1 2 4 8 16 */ 151 179 152 {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */ 180 {{ -3, -9,-12,-12,-10,-10,-10,-10,-10,-10,-10, -1, 0, 0, 1, 1, 1}}, /* -2(addition) */ 181 182 {{ -3, -9,-12,-12,-11,-11,-11,-11,-11,-11,-10, -1, -1, 0, 0, 0, 0}}, /* -1 */ 153 183 154 184 /* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ 155 {{ - 4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */185 {{ -5,-11,-14,-15,-15,-15,-14,-14,-13,-12,-10, -2, -2, -1, -1, 0, 0}}, /* 0 */ 156 186 157 187 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ 158 {{ -6,-12,-1 4,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */188 {{ -6,-12,-15,-16,-16,-15,-14,-14,-13,-12,-10, -2, -2, -1, -1, 0, 0}}, /* 1 */ 159 189 160 190 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ 161 {{-12,-13,-1 4,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */191 {{-12,-13,-15,-16,-16,-15,-15,-14,-14,-12,-12, -5, -4, -2, -1, 0, 0}}, /* 2 */ 162 192 163 193 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ 164 {{-15,-15,-1 5,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0,0}}, /* 3 */194 {{-15,-15,-16,-16,-16,-15,-15,-14,-14,-13,-13,-12, -7 -2, -1, -1 , 0}}, /* 3 */ 165 195 166 196 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ 167 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-13,-11, -7-3, -1, -1 , 0}}, /* 4 */168 197 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13, -9 -3, -1, -1 , 0}}, /* 4 */ 198 169 199 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ 170 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */171 200 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -1, -1 , 0}}, /* 5 */ 201 172 202 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ 173 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -8, -4, -2, -2,0}}, /* 6 */174 203 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 6 */ 204 175 205 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ 176 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 7 */206 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 7 */ 177 207 178 208 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ 179 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 8 */209 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 8 */ 180 210 181 211 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ 182 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 9 */212 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 9 */ 183 213 184 214 /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ 185 {{-16,-16,-16,-16,-16,-16,-16,-15,-1 4,-14,-14,-12, -9, -4, -2, -2,0}}, /* 10 */215 {{-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-13,-10 -4, -2, -2 , 0}}, /* 10 */ 186 216 }; 187 217 188 218 /* noise bias (transition block) */ 189 static noise3 _psy_noisebias_trans[1 2]={219 static noise3 _psy_noisebias_trans[13]={ 190 220 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 191 /* -1 */ 221 /* -2(addition mode) */ 222 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 223 {-26,-26,-26,-26,-22,-16,-12, -4, -2, 0, 1, 1, 5, 6, 7, 8, 15}, 224 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 225 /* -1 192 226 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 193 227 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, 228 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ 229 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 230 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -4, -2, 0, 2, 3, 6, 6, 14}, 194 231 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 195 232 /* 0 196 233 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 197 234 {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, 198 235 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ 199 {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 200 {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3,6},201 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, 236 {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 237 {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 6}, 238 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, 202 239 /* 1 203 240 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 204 241 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, 205 242 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ 206 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 207 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 208 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, 243 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 244 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, 245 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, 209 246 /* 2 210 247 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, 211 248 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, 212 249 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ 213 250 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, 214 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, - 3, -2, -1, 0, 3},251 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, 215 252 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, 216 253 /* 3 217 254 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, 218 255 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, 219 256 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ 220 257 {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, 221 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2},258 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, 222 259 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, 223 260 /* 4 224 261 {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, 225 262 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, 226 263 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ 227 264 {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, 228 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1},265 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, 229 266 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, 230 267 /* 5 231 268 {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, … … 245 282 {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, 246 283 {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, 247 284 {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ 285 // {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, 286 // {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, 287 // {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, 248 288 {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, 249 {-32,-32,-32,-32,-28,-24,-24,- 24,-18,-14,-12,-10,-10,-10, -8, -6, -2},250 {-34,-34,-34,-34,-30,-26,-26,-2 6,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},289 {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -7, -4, -1}, 290 {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, 251 291 /* 8 252 292 {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, 253 293 {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, 254 294 {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ 255 {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, 256 {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, 257 {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, 295 // {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, 296 // {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, 297 // {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, 298 {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, 299 {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -9, -6, -3}, 300 {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, 258 301 /* 9 259 302 {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 260 303 {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, 261 304 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ 305 // {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 306 // {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10}, 307 // {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}}, 262 308 {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 263 {-3 8,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10},264 {-40,-40,-40,-40,-40,-40,-40,-3 8,-35,-35,-35,-35,-35,-35,-35,-35,-30}}},309 {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-13,-10, -7}, 310 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, 265 311 /* 10 */ 266 312 {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, 267 313 {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, … … 269 315 }; 270 316 271 317 /* noise bias (long block) */ 272 static noise3 _psy_noisebias_long[12]={ 273 /*63 125 250 500 1k 2k 4k 8k 16k*/ 274 /* -1 */ 318 static noise3 _psy_noisebias_long[13]={ 319 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 320 /* -2(addition mode) */ 321 {{{-10,-10,-10,-10,-10, -4, 0, 0, 2, 6, 6, 6, 6, 10, 10, 12, 20}, 322 {-20,-20,-20,-20,-20,-20,-10, -2, 2, 2, 2, 1, 5, 6, 7, 8, 15}, 323 {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, 324 /* -1 275 325 {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, 276 326 {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, 327 {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ 328 {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, 329 {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 1, 3, 5, 13}, 277 330 {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, 278 279 331 /* 0 */ 280 332 /* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, 281 333 {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, 282 334 {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ 283 {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 284 {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6},335 {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, 336 {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 6}, 285 337 {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, 286 338 /* 1 */ 287 339 /* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 288 340 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, 289 341 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ 290 {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 342 {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, 291 343 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, 292 344 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, 293 345 /* 2 */ … … 295 347 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, 296 348 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ 297 349 {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, 298 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, - 3, -2, -1, 0, 3},350 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, 299 351 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, 300 352 /* 3 */ 301 353 /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, 302 354 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, 303 355 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ 304 356 {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, 305 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2},357 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, 306 358 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, 307 359 /* 4 */ 308 360 /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, 309 361 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, 310 362 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ 311 363 {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, 312 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1},364 {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, 313 365 {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, 314 366 /* 5 */ 315 367 /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, … … 326 378 {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, 327 379 {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}}, 328 380 /* 7 */ 381 // {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, 382 // {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, 383 // {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, 329 384 {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, 330 {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, - 6, -4, 0},385 {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -7, -4, -1}, 331 386 {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, 332 387 /* 8 */ 388 // {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, 389 // {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -8, -6, -2}, 390 // {-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, 333 391 {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, 334 {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, - 8, -6, -2},392 {-26,-26,-26,-26,-26,-26,-26,-20,-16,-12,-10,-10,-10,-10, -9, -6, -3}, 335 393 {-28,-28,-28,-28,-28,-28,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, 336 394 /* 9 */ 395 // {{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 396 // {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-12,-10, -7}, 397 // {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, 337 398 {{{-22,-22,-22,-22,-22,-22,-22,-18,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 338 {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-1 2,-10, -7},399 {-26,-26,-26,-26,-26,-26,-26,-22,-18,-16,-16,-16,-16,-14,-13,-10, -7}, 339 400 {-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, 340 401 /* 10 */ 341 402 {{{-24,-24,-24,-24,-24,-24,-24,-24,-24,-18,-14,-14,-14,-14,-14,-12,-10}, … … 344 405 }; 345 406 346 407 /* noise bias (impulse block) */ 347 static noise3 _psy_noisebias_impulse[1 2]={408 static noise3 _psy_noisebias_impulse[13]={ 348 409 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 349 /* -1 */ 410 /* -2(addition mode) */ 411 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 412 {-26,-26,-26,-26,-22,-16,-12, -4, -2, 0, 0, 1, 6, 7, 8, 8, 15}, 413 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 414 /* -1 350 415 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 351 416 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, 417 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ 418 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 419 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -4, -2, 0, 2, 3, 6, 6, 14}, 352 420 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 353 354 /* 0 */ 355 /* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, 356 {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, 357 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ 421 /* 0 422 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, 423 {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, 424 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ 358 425 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, 359 {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6},426 {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 6}, 360 427 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 361 428 /* 1 */ 362 429 {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, … … 375 442 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, 376 443 {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, 377 444 /* 5 */ 445 // {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, 446 // {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, 447 // {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, 378 448 {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, 379 {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, - 6, -4, -2},449 {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -5, -5, -2}, 380 450 {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, 381 451 /* 6 382 452 {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, 383 {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, 384 {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ 453 {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, 454 {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ 455 // {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, 456 // {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12}, 457 // {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}}, 385 458 {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, 386 {-34,-34,-34,-34,-30,-30,- 30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12},387 {-3 6,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}},459 {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -8, -4}, 460 {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}}, 388 461 /* 7 */ 389 /* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11},390 {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10},391 {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/392 462 {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, 393 {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, 394 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, 463 {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, 464 {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}}, 465 // {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, 466 // {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, 467 // {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, 395 468 /* 8 */ 396 /* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10},397 {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14},398 {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/399 469 {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, 400 {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, 401 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, 470 {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, 471 {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, 472 // {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, 473 // {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, 474 // {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, 402 475 /* 9 */ 403 /* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2},404 {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18},405 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/406 476 {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 407 {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-2 6,-26,-26,-26},477 {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, 408 478 {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, 479 // {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, 480 // {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26}, 481 // {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, 409 482 /* 10 */ 410 483 {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, 411 484 {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-26}, … … 413 486 }; 414 487 415 488 /* noise bias (padding block) */ 416 static noise3 _psy_noisebias_padding[1 2]={489 static noise3 _psy_noisebias_padding[13]={ 417 490 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 418 419 /* -1 */ 491 /* -2(addition mode) */ 420 492 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 421 {- 30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15},493 {-26,-26,-26,-26,-22,-16,-12, -4, -2, -1, 0, 2, 7, 8, 8, 8, 15}, 422 494 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, 423 495 /* -1 496 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 497 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, 498 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ 499 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 500 {-30,-30,-30,-30,-26,-20,-16, -8, -6, -4, -2, 2, 4, 6, 8, 8, 15}, 501 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, 424 502 /* 0 */ 425 503 {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, 426 504 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, … … 430 508 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, 431 509 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, 432 510 /* 2 */ 433 /* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16},434 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8},435 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/436 511 {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, 437 {-30,-30,-30,-30,-26,-22,-20,-14,-10, - 6, -1, -1, -1, 0, 0, 2, 6},512 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, 438 513 {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, 439 514 /* 3 */ 440 515 {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, … … 478 553 {10,10,100}, 479 554 }; 480 555 481 static int _psy_tone_suppress[12]={ 482 -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, 483 }; 484 static int _psy_tone_0dB[12]={ 485 90,90,95,95,95,95,105,105,105,105,105,105, 486 }; 487 static int _psy_noise_suppress[12]={ 488 -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, 556 static int _psy_tone_suppress[13]={ 557 // -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, 558 -20,-20,-20,-20,-20,-20,-24,-30,-40,-40,-42,-45,-45, 559 }; 560 static int _psy_tone_0dB[13]={ 561 // 90,90,95,95,95,95,105,105,105,105,105,105, 562 90,90,90,95,95,95,95,105,105,105,105,105,105, 563 }; 564 static int _psy_noise_suppress[13]={ 565 // -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, 566 -20,-20,-20,-24,-24,-24,-24,-30,-40,-40,-42,-45,-45, 489 567 }; 490 568 491 569 static vorbis_info_psy _psy_info_template={ … … 506 584 507 585 /* ath ****************/ 508 586 509 static int _psy_ath_floater[12]={ 510 -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, 511 }; 512 static int _psy_ath_abs[12]={ 513 -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, 587 static int _psy_ath_floater[13]={ 588 // -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, 589 -100,-100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, 590 }; 591 static int _psy_ath_abs[13]={ 592 // -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, 593 -130,-130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, 514 594 }; 515 595 516 596 /* stereo setup. These don't map directly to quality level, there's … … 522 602 /* various stereo possibilities */ 523 603 524 604 /* stereo mode by base quality level */ 525 static adj_stereo _psy_stereo_modes_44[12]={ 605 static adj_stereo _psy_stereo_modes_44[13]={ 606 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -2(addition mode) */ 607 {{ 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0}, 608 { 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 5, 4, 3}, 609 { 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 7, 8, 8}, 610 { 10,10.5, 11,11.5, 12,12.5, 13, 99, 99, 99, 99, 99, 99, 99, 99}}, 526 611 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ 527 612 /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, 528 613 { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, 529 614 { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, 615 { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},*/ 616 {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, 617 { 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 5, 4, 3}, 618 { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, 530 619 { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, 531 532 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ 620 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ 533 621 /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, 534 622 { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, 535 623 { 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8}, … … 538 626 { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, 539 627 { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, 540 628 { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, 541 542 543 629 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ 544 630 /*{{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, 545 631 { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, 546 632 { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, 633 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ 634 {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, 635 { 8, 8, 8, 8, 6, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3}, 636 { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, 547 637 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 548 549 550 638 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ 551 /*{{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0},552 553 554 639 /*{{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, 640 { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, 641 { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, 642 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ 555 643 {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, 556 644 { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, 557 645 { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, … … 567 655 { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, 568 656 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 569 657 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ 570 /*{{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},571 572 573 658 /*{{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 659 { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, 660 { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 661 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ 574 662 {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 575 663 { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, 576 664 { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, 577 665 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 578 579 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},580 581 582 666 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ 667 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 668 { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 669 { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 670 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ 583 671 {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 584 672 { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 585 673 { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, 586 674 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 587 675 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ 588 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},589 590 591 676 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 677 { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 678 { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 679 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ 592 680 {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 593 681 { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 594 682 { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, 595 683 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 596 684 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ 597 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},598 599 600 685 /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 686 { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 687 { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, 688 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ 601 689 {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 602 690 { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 603 691 { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, … … 615 703 }; 616 704 617 705 /* tone master attenuation by base quality mode and bitrate tweak */ 618 static att3 _psy_tone_masteratt_44[12]={ 706 static att3 _psy_tone_masteratt_44[13]={ 707 {{ 36, 22, 10}, 0, 0}, /* -2 */ 619 708 {{ 35, 21, 9}, 0, 0}, /* -1 */ 620 {{ 30, 20, 8}, -2, 1.25}, /* 0 */ 709 // {{ 30, 20, 8}, -2, 1.25}, /* 0 */ 710 {{ 30, 20, 8}, -1, 0}, /* 0 */ 621 711 /* {{ 25, 14, 4}, 0, 0}, *//* 1 */ 622 712 {{ 25, 12, 2}, 0, 0}, /* 1 */ 623 /* {{ 20, 10, -2}, 0, 0}, *//* 2 */ 624 {{ 20, 9, -3}, 0, 0}, /* 2 */ 625 {{ 20, 9, -4}, 0, 0}, /* 3 */ 713 // {{ 20, 10, -2}, 0, 0}, /* 2 */ 714 {{ 22, 11, 0}, 0, 0}, /* 2 */ 715 // {{ 20, 9, -4}, 0, 0}, /* 3 */ 716 {{ 21, 11, -2}, 0, 0}, /* 3 */ 626 717 {{ 20, 9, -4}, 0, 0}, /* 4 */ 627 718 {{ 20, 6, -6}, 0, 0}, /* 5 */ 628 719 {{ 20, 3, -10}, 0, 0}, /* 6 */ … … 633 724 }; 634 725 635 726 /* lowpass by mode **************/ 636 static double _psy_lowpass_44[1 2]={727 static double _psy_lowpass_44[13]={ 637 728 /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ 638 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. 729 // 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. 730 13.1,14.8,15.1,15.8,16.5,17.2,18.6,20.1,48.,999.,999.,999.,999. 639 731 }; 640 732 641 733 /* noise normalization **********/ 642 734 643 static int _noise_start_short_44[1 1]={735 static int _noise_start_short_44[12]={ 644 736 /* 16,16,16,16,32,32,9999,9999,9999,9999 */ 645 32,16,16,16,32,9999,9999,9999,9999,9999,9999 737 // 32,16,16,16,32,9999,9999,9999,9999,9999,9999 738 32,32,16,16,32,64,9999,9999,9999,9999,9999,9999 646 739 }; 647 static int _noise_start_long_44[1 1]={740 static int _noise_start_long_44[12]={ 648 741 /* 128,128,128,256,512,512,9999,9999,9999,9999 */ 649 256,128,128,256,512,9999,9999,9999,9999,9999,9999 742 // 256,128,128,256,512,9999,9999,9999,9999,9999,9999 743 256,256,128,128,256,512,9999,9999,9999,9999,9999,9999 650 744 }; 651 745 652 static int _noise_part_short_44[11]={ 653 8,8,8,8,8,8,8,8,8,8,8 746 static int _noise_part_short_44[12]={ 747 // 8,8,8,8,8,8,8,8,8,8,8 748 8,8,8,8,8,8,8,8,8,8,8,8 654 749 }; 655 static int _noise_part_long_44[11]={ 656 32,32,32,32,32,32,32,32,32,32,32 750 static int _noise_part_long_44[12]={ 751 // 32,32,32,32,32,32,32,32,32,32,32 752 32,32,32,32,32,32,32,32,32,32,32,32 657 753 }; 658 754 659 static double _noise_thresh_44[1 1]={755 static double _noise_thresh_44[12]={ 660 756 /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ 661 .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., 757 // .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., 758 .2,.2,.2,.2,.4,.8,9999.,9999.,9999.,9999.,9999.,9999., 662 759 }; 663 760 664 761 static double _noise_thresh_5only[2]={ 665 762 .5,.5, 666 763 }; 764 765 /* 32kHz only */ 766 static int _noise_start_short_32[12]={ 767 40,40,16,16,40,80,9999,9999,9999,9999,9999,9999 768 }; 769 static int _noise_start_long_32[12]={ 770 320,320,128,128,320,640,9999,9999,9999,9999,9999,9999 771 }; -
lib/modes/psych_8.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/psych_8.h ./lib/modes/psych_8.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 static att3 _psy_tone_masteratt_8[3]={ 19 {{ 32, 25, 12}, 0, 0}, /* 0 */ 20 {{ 30, 25, 12}, 0, 0}, /* 0 */ 21 {{ 20, 0, -14}, 0, 0}, /* 0 */ 18 static att3 _psy_tone_masteratt_8[4]={ 19 {{ 32, 25, 12}, 0, 0}, /* -2 */ 20 {{ 32, 25, 12}, 0, 0}, /* -1 */ 21 {{ 30, 25, 12}, 0, 0}, /* 0 */ 22 {{ 20, 0, -14}, 0, 0}, /* 10 */ 22 23 }; 23 24 24 static vp_adjblock _vp_tonemask_adj_8[ 3]={25 static vp_adjblock _vp_tonemask_adj_8[4]={ 25 26 /* adjust for mode zero */ 26 27 /* 63 125 250 500 1 2 4 8 16 */ 27 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ 28 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ 29 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */ 28 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 5, 5,99,99,99}}, /* -2 */ 29 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* -1 */ 30 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 0 */ 31 {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 10 */ 30 32 }; 31 33 32 34 33 static noise3 _psy_noisebias_8[ 3]={35 static noise3 _psy_noisebias_8[4]={ 34 36 /* 63 125 250 500 1k 2k 4k 8k 16k*/ 37 {{{-10,-10,-10,-10, -5, -5, -5, 2, 4, 8, 8, 8, 10, 10, 99, 99, 99}, 38 {-10,-10,-10,-10, -5, -4, -4, 2, 3, 4, 4, 4, 7, 8, 99, 99, 99}, 39 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, 40 35 41 {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, 36 42 {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99}, 37 43 {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, … … 46 52 }; 47 53 48 54 /* stereo mode by base quality level */ 49 static adj_stereo _psy_stereo_modes_8[ 3]={55 static adj_stereo _psy_stereo_modes_8[4]={ 50 56 /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ 51 57 {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 52 58 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, … … 56 62 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, 57 63 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 58 64 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 65 {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 66 { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, 67 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 68 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 59 69 {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, 60 70 { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, 61 71 { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, 62 72 { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, 63 73 }; 64 74 65 static noiseguard _psy_noiseguards_8[2]={ 75 static noiseguard _psy_noiseguards_8[3]={ 76 {10,10,-1}, 66 77 {10,10,-1}, 67 78 {10,10,-1}, 68 79 }; 69 80 70 static compandblock _psy_compand_8[2]={ 81 static compandblock _psy_compand_8[3]={ 82 {{ 83 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 84 8, 8, 9, 9,10,10,11, 11, /* 15dB */ 85 12,12,13,13,14,14,15, 16, /* 23dB */ 86 17,18,19,20,21,22,23, 24, /* 31dB */ 87 25,26,27,28,29,30,31, 32, /* 39dB */ 88 }}, 71 89 {{ 72 90 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ 73 91 8, 8, 9, 9,10,10,11, 11, /* 15dB */ … … 84 102 }}, 85 103 }; 86 104 87 static double _psy_lowpass_8[ 3]={3.,4.,4.};88 static int _noise_start_8[ 2]={89 64,64, 105 static double _psy_lowpass_8[4]={2.6,3.,4.,4.}; 106 static int _noise_start_8[3]={ 107 64,64,64, 90 108 }; 91 static int _noise_part_8[ 2]={92 8,8, 109 static int _noise_part_8[3]={ 110 8,8,8, 93 111 }; 94 112 95 static int _psy_ath_floater_8[ 3]={96 -100,-100,-10 5,113 static int _psy_ath_floater_8[4]={ 114 -100,-100,-100,-105, 97 115 }; 98 116 99 static int _psy_ath_abs_8[ 3]={100 -130,-130,-1 40,117 static int _psy_ath_abs_8[4]={ 118 -130,-130,-130,-140, 101 119 }; 102 120 -
lib/modes/residue_16.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/residue_16.h ./lib/modes/residue_16.h
old new 84 84 &_resbook_16s_2,&_resbook_16s_2} 85 85 }; 86 86 87 static vorbis_mapping_template _mapres_template_16_stereo[3]={ 87 static vorbis_mapping_template _mapres_template_16_stereo[4]={ 88 { _map_nominal, _res_16s_0 }, /* -1 */ 88 89 { _map_nominal, _res_16s_0 }, /* 0 */ 89 90 { _map_nominal, _res_16s_1 }, /* 1 */ 90 91 { _map_nominal, _res_16s_2 }, /* 2 */ … … 156 157 }; 157 158 158 159 159 static vorbis_mapping_template _mapres_template_16_uncoupled[3]={ 160 static vorbis_mapping_template _mapres_template_16_uncoupled[4]={ 161 { _map_nominal_u, _res_16u_0 }, /* -1 */ 160 162 { _map_nominal_u, _res_16u_0 }, /* 0 */ 161 163 { _map_nominal_u, _res_16u_1 }, /* 1 */ 162 164 { _map_nominal_u, _res_16u_2 }, /* 2 */ -
lib/modes/residue_44.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/residue_44.h ./lib/modes/residue_44.h
old new 278 278 }; 279 279 280 280 static vorbis_mapping_template _mapres_template_44_stereo[]={ 281 { _map_nominal, _res_44s_n1 }, /* -2 */ 281 282 { _map_nominal, _res_44s_n1 }, /* -1 */ 282 283 { _map_nominal, _res_44s_0 }, /* 0 */ 283 284 { _map_nominal, _res_44s_1 }, /* 1 */ -
lib/modes/residue_44u.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/residue_44u.h ./lib/modes/residue_44u.h
old new 304 304 }; 305 305 306 306 static vorbis_mapping_template _mapres_template_44_uncoupled[]={ 307 { _map_nominal_u, _res_44u_n1 }, /* -2 */ 307 308 { _map_nominal_u, _res_44u_n1 }, /* -1 */ 308 309 { _map_nominal_u, _res_44u_0 }, /* 0 */ 309 310 { _map_nominal_u, _res_44u_1 }, /* 1 */ -
lib/modes/residue_8.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/residue_8.h ./lib/modes/residue_8.h
old new 48 48 &_resbook_8s_1,&_resbook_8s_1}, 49 49 }; 50 50 51 static vorbis_mapping_template _mapres_template_8_stereo[2]={ 51 static vorbis_mapping_template _mapres_template_8_stereo[3]={ 52 { _map_nominal, _res_8s_0 }, /* -1 */ 52 53 { _map_nominal, _res_8s_0 }, /* 0 */ 53 54 { _map_nominal, _res_8s_1 }, /* 1 */ 54 55 }; … … 91 92 &_resbook_8u_1,&_resbook_8u_1}, 92 93 }; 93 94 94 static vorbis_mapping_template _mapres_template_8_uncoupled[2]={ 95 static vorbis_mapping_template _mapres_template_8_uncoupled[3]={ 96 { _map_nominal_u, _res_8u_0 }, /* -1 */ 95 97 { _map_nominal_u, _res_8u_0 }, /* 0 */ 96 98 { _map_nominal_u, _res_8u_1 }, /* 1 */ 97 99 }; -
lib/modes/setup_11.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_11.h ./lib/modes/setup_11.h
old new 17 17 18 18 #include "psych_11.h" 19 19 20 static int blocksize_11[ 2]={21 512,512 20 static int blocksize_11[3]={ 21 512,512,512 22 22 }; 23 23 24 static int _floor_mapping_11[ 2]={25 6,6, 24 static int _floor_mapping_11[3]={ 25 6,6,6 26 26 }; 27 27 28 static double rate_mapping_11[3]={ 29 8000.,13000.,44000., 28 static double rate_mapping_11[4]={ 29 // 8000.,13000.,44000., 30 8000.,10000.,13000.,44000., 30 31 }; 31 32 32 static double rate_mapping_11_uncoupled[3]={ 33 12000.,20000.,50000., 33 static double rate_mapping_11_uncoupled[4]={ 34 // 12000.,20000.,50000., 35 14000.,16000.,20000.,50000., 34 36 }; 35 37 36 static double quality_mapping_11[ 3]={37 -. 1,.0,1.38 static double quality_mapping_11[4]={ 39 -.2,-.1,.0,1. 38 40 }; 39 41 40 42 ve_setup_data_template ve_setup_11_stereo={ 41 2, 43 // 2, 44 3, 42 45 rate_mapping_11, 43 46 quality_mapping_11, 44 47 2, … … 89 92 }; 90 93 91 94 ve_setup_data_template ve_setup_11_uncoupled={ 92 2, 95 // 2, 96 3, 93 97 rate_mapping_11_uncoupled, 94 98 quality_mapping_11, 95 99 -1, -
lib/modes/setup_16.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_16.h ./lib/modes/setup_16.h
old new 18 18 #include "psych_16.h" 19 19 #include "residue_16.h" 20 20 21 static int blocksize_16_short[ 3]={22 1024, 512,51221 static int blocksize_16_short[4]={ 22 1024,1024,512,512 23 23 }; 24 static int blocksize_16_long[ 3]={25 1024,1024,1024 24 static int blocksize_16_long[4]={ 25 1024,1024,1024,1024 26 26 }; 27 27 28 static int _floor_mapping_16_short[ 3]={29 9, 3,328 static int _floor_mapping_16_short[4]={ 29 9,9,3,3 30 30 }; 31 static int _floor_mapping_16[ 3]={32 9,9,9 31 static int _floor_mapping_16[4]={ 32 9,9,9,9 33 33 }; 34 34 35 static double rate_mapping_16[4]={ 36 12000.,20000.,44000.,86000. 35 static double rate_mapping_16[5]={ 36 // 12000.,20000.,44000.,86000. 37 10000.,12000.,20000.,44000.,86000. 37 38 }; 38 39 39 static double rate_mapping_16_uncoupled[4]={ 40 16000.,28000.,64000.,100000. 40 static double rate_mapping_16_uncoupled[5]={ 41 // 16000.,28000.,64000.,100000. 42 16000.,18000.,28000.,64000.,100000. 41 43 }; 42 44 43 static double _global_mapping_16[ 4]={ 1., 2., 3., 4. };45 static double _global_mapping_16[5]={ 2., 2., 3., 4., 5. }; 44 46 45 static double quality_mapping_16[ 4]={-.1,.05,.5,1. };47 static double quality_mapping_16[5]={ -.2,-.1,.05,.5,1. }; 46 48 47 static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.}; 49 //static double _psy_compand_16_mapping[5]={ 0., 0., .8, 1., 1.}; 50 static double _psy_compand_16_mapping[5]={ 0., 1., 1.8, 2., 2.}; 48 51 49 52 ve_setup_data_template ve_setup_16_stereo={ 50 3, 53 // 3, 54 4, 51 55 rate_mapping_16, 52 56 quality_mapping_16, 53 57 2, … … 98 102 }; 99 103 100 104 ve_setup_data_template ve_setup_16_uncoupled={ 101 3, 105 // 3, 106 4, 102 107 rate_mapping_16_uncoupled, 103 108 quality_mapping_16, 104 109 -1, -
lib/modes/setup_22.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_22.h ./lib/modes/setup_22.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 static double rate_mapping_22[4]={ 19 15000.,20000.,44000.,86000. 18 static double rate_mapping_22[5]={ 19 // 15000.,20000.,44000.,86000. 20 14000.,16000.,20000.,44000.,86000. 20 21 }; 21 22 22 static double rate_mapping_22_uncoupled[4]={ 23 16000.,28000.,50000.,90000. 23 static double rate_mapping_22_uncoupled[5]={ 24 // 16000.,28000.,50000.,90000. 25 22000.,24000.,28000.,50000.,90000. 24 26 }; 25 27 26 static double _psy_lowpass_22[ 4]={9.5,11.,30.,99.};28 static double _psy_lowpass_22[5]={8.5,9.5,11.,30.,99.}; 27 29 28 30 ve_setup_data_template ve_setup_22_stereo={ 29 3, 31 // 3, 32 4, 30 33 rate_mapping_22, 31 34 quality_mapping_16, 32 35 2, … … 77 80 }; 78 81 79 82 ve_setup_data_template ve_setup_22_uncoupled={ 80 3, 83 // 3, 84 4, 81 85 rate_mapping_22_uncoupled, 82 86 quality_mapping_16, 83 87 -1, -
lib/modes/setup_32.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_32.h ./lib/modes/setup_32.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 static double rate_mapping_32[12]={ 19 18000.,28000.,35000.,45000.,56000.,60000., 18 static double rate_mapping_32[13]={ 19 // 18000.,28000.,35000.,45000.,56000.,60000., 20 14000.,20000.,28000.,35000.,45000.,56000.,60000., 20 21 75000.,90000.,100000.,115000.,150000.,190000., 21 22 }; 22 23 23 static double rate_mapping_32_un[12]={ 24 30000.,42000.,52000.,64000.,72000.,78000., 24 static double rate_mapping_32_un[13]={ 25 // 30000.,42000.,52000.,64000.,72000.,78000., 26 24000.,32000.,42000.,52000.,64000.,72000.,78000., 25 27 86000.,92000.,110000.,120000.,140000.,190000., 26 28 }; 27 29 28 static double _psy_lowpass_32[12]={ 29 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. 30 static double _psy_lowpass_32[13]={ 31 // 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. 32 11.9,12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. 30 33 }; 31 34 32 35 ve_setup_data_template ve_setup_32_stereo={ 33 11, 36 // 11, 37 12, 34 38 rate_mapping_32, 35 39 quality_mapping_44, 36 40 2, … … 59 63 _psy_compand_short_mapping, 60 64 _psy_compand_long_mapping, 61 65 62 {_noise_start_short_ 44,_noise_start_long_44},66 {_noise_start_short_32,_noise_start_long_32}, 63 67 {_noise_part_short_44,_noise_part_long_44}, 64 68 _noise_thresh_44, 65 69 … … 81 85 }; 82 86 83 87 ve_setup_data_template ve_setup_32_uncoupled={ 84 11, 88 // 11, 89 12, 85 90 rate_mapping_32_un, 86 91 quality_mapping_44, 87 92 -1, … … 110 115 _psy_compand_short_mapping, 111 116 _psy_compand_long_mapping, 112 117 113 {_noise_start_short_ 44,_noise_start_long_44},118 {_noise_start_short_32,_noise_start_long_32}, 114 119 {_noise_part_short_44,_noise_part_long_44}, 115 120 _noise_thresh_44, 116 121 -
lib/modes/setup_44.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_44.h ./lib/modes/setup_44.h
old new 19 19 #include "modes/residue_44.h" 20 20 #include "modes/psych_44.h" 21 21 22 static double rate_mapping_44_stereo[12]={ 23 22500.,32000.,40000.,48000.,56000.,64000., 22 static double rate_mapping_44_stereo[13]={ 23 // 22500.,32000.,40000.,48000.,56000.,64000., 24 16000.,24000.,32000.,40000.,48000.,56000.,64000., 24 25 80000.,96000.,112000.,128000.,160000.,250001. 25 26 }; 26 27 27 static double quality_mapping_44[1 2]={28 -. 1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.028 static double quality_mapping_44[13]={ 29 -.2,-.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 29 30 }; 30 31 31 static int blocksize_short_44[1 1]={32 512, 256,256,256,256,256,256,256,256,256,25632 static int blocksize_short_44[12]={ 33 512,512,256,256,256,256,256,256,256,256,256,256 33 34 }; 34 static int blocksize_long_44[1 1]={35 4096, 2048,2048,2048,2048,2048,2048,2048,2048,2048,204835 static int blocksize_long_44[12]={ 36 4096,4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 36 37 }; 37 38 38 static double _psy_compand_short_mapping[1 2]={39 0. 5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.39 static double _psy_compand_short_mapping[13]={ 40 0., 1., 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. 40 41 }; 41 static double _psy_compand_long_mapping[1 2]={42 3. 5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.42 static double _psy_compand_long_mapping[13]={ 43 3., 4., 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. 43 44 }; 44 45 45 static double _global_mapping_44[1 2]={46 static double _global_mapping_44[13]={ 46 47 /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ 47 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. 48 // 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. 49 0., 1., 2., 2., 2.5, 3., 3., 3.7, 3.9, 4.0, 4.0, 5., 5. // low 50 // 0., 1., 2., 2., 2.5, 3., 3.2, 4.0, 4.0, 4.0, 4.5, 5., 5. // high 48 51 }; 49 52 50 static int _floor_short_mapping_44[1 1]={51 1, 0,0,2,2,4,5,5,5,5,553 static int _floor_short_mapping_44[12]={ 54 1,1,0,0,2,2,4,5,5,5,5,5 52 55 }; 53 static int _floor_long_mapping_44[1 1]={54 8, 7,7,7,7,7,7,7,7,7,756 static int _floor_long_mapping_44[12]={ 57 8,8,7,7,7,7,7,7,7,7,7,7 55 58 }; 56 59 57 60 ve_setup_data_template ve_setup_44_stereo={ 58 11, 61 // 11, 62 12, 59 63 rate_mapping_44_stereo, 60 64 quality_mapping_44, 61 65 2, -
lib/modes/setup_44u.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_44u.h ./lib/modes/setup_44u.h
old new 17 17 18 18 #include "modes/residue_44u.h" 19 19 20 static double rate_mapping_44_un[12]={ 21 32000.,48000.,60000.,70000.,80000.,86000., 20 static double rate_mapping_44_un[13]={ 21 // 32000.,48000.,60000.,70000.,80000.,86000., 22 26000.,32000.,48000.,60000.,70000.,80000.,86000., 22 23 96000.,110000.,120000.,140000.,160000.,240001. 23 24 }; 24 25 25 26 ve_setup_data_template ve_setup_44_uncoupled={ 26 11, 27 // 11, 28 12, 27 29 rate_mapping_44_un, 28 30 quality_mapping_44, 29 31 -1, -
lib/modes/setup_8.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_8.h ./lib/modes/setup_8.h
old new 18 18 #include "psych_8.h" 19 19 #include "residue_8.h" 20 20 21 static int blocksize_8[ 2]={22 512,512 21 static int blocksize_8[3]={ 22 512,512,512 23 23 }; 24 24 25 static int _floor_mapping_8[ 2]={26 6,6, 25 static int _floor_mapping_8[3]={ 26 6,6,6 27 27 }; 28 28 29 static double rate_mapping_8[3]={ 30 6000.,9000.,32000., 29 static double rate_mapping_8[4]={ 30 // 6000.,9000.,32000., 31 5000.,6000.,9000.,32000., 31 32 }; 32 33 33 static double rate_mapping_8_uncoupled[3]={ 34 8000.,14000.,42000., 34 static double rate_mapping_8_uncoupled[4]={ 35 // 8000.,14000.,42000., 36 8000.,10000.,14000.,42000., 35 37 }; 36 38 37 static double quality_mapping_8[ 3]={38 -. 1,.0,1.39 static double quality_mapping_8[4]={ 40 -.2,-.1,.0,1. 39 41 }; 40 42 41 static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; 43 //static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; 44 static double _psy_compand_8_mapping[4]={ 0., 1., 2., 2.}; 42 45 43 static double _global_mapping_8[3]={ 1., 2., 3. }; 46 //static double _global_mapping_8[3]={ 1., 2., 3. }; 47 static double _global_mapping_8[4]={ 2., 2., 3., 4. }; 44 48 45 49 ve_setup_data_template ve_setup_8_stereo={ 46 2, 50 // 2, 51 3, 47 52 rate_mapping_8, 48 53 quality_mapping_8, 49 54 2, … … 94 99 }; 95 100 96 101 ve_setup_data_template ve_setup_8_uncoupled={ 97 2, 102 // 2, 103 3, 98 104 rate_mapping_8_uncoupled, 99 105 quality_mapping_8, 100 106 -1, -
lib/modes/setup_X.h
diff -Nru ../libvorbis-1.1.0-orig/lib/modes/setup_X.h ./lib/modes/setup_X.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 static double rate_mapping_X[1 2]={19 -1.,-1.,-1.,-1.,-1.,-1., 18 static double rate_mapping_X[13]={ 19 -1.,-1.,-1.,-1.,-1.,-1.,-1. 20 20 -1.,-1.,-1.,-1.,-1.,-1. 21 21 }; 22 22 23 23 ve_setup_data_template ve_setup_X_stereo={ 24 11, 24 // 11, 25 12, 25 26 rate_mapping_X, 26 27 quality_mapping_44, 27 28 2, … … 72 73 }; 73 74 74 75 ve_setup_data_template ve_setup_X_uncoupled={ 75 11, 76 // 11, 77 12, 76 78 rate_mapping_X, 77 79 quality_mapping_44, 78 80 -1, … … 123 125 }; 124 126 125 127 ve_setup_data_template ve_setup_XX_stereo={ 126 2, 128 // 2, 129 3, 127 130 rate_mapping_X, 128 131 quality_mapping_8, 129 132 2, … … 174 177 }; 175 178 176 179 ve_setup_data_template ve_setup_XX_uncoupled={ 177 2, 180 // 2, 181 3, 178 182 rate_mapping_X, 179 183 quality_mapping_8, 180 184 -1, -
lib/psy.c
diff -Nru ../libvorbis-1.1.0-orig/lib/psy.c ./lib/psy.c
old new 31 31 32 32 #define NEGINF -9999.f 33 33 static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; 34 static double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; 34 static double stereo_threshholds_long[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; 35 static double stereo_threshholds_trans_post[]={0.0, 0.0, 0.1, 0.1, 0.2, 0.2, 0.3, 0.5, 9e10}; 36 static double stereo_threshholds_trans_pre[]={0.0, .5, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 9e10}; 37 static int m3n32[] = {21,13,10,4}; 38 static int m3n44[] = {15,9,7,3}; 39 static int m3n48[] = {14,8,6,3}; 40 static int temp_bfn[128] = { 41 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 42 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 43 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,11,11,11,11, 44 12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15, 45 16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19, 46 20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23, 47 24,24,24,24,25,25,25,24,23,22,21,20,19,18,17,16, 48 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 49 }; 35 50 36 51 vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ 37 52 codec_setup_info *ci=vi->codec_setup; … … 284 299 p->n=n; 285 300 p->rate=rate; 286 301 287 /* AoTuV HF weighting */ 288 p->m_val = 1.; 302 /* AoTuV HF weighting etc. */ 289 303 if(rate < 26000) p->m_val = 0; 290 else if(rate < 38000) p->m_val = .94; /* 32kHz */ 291 else if(rate > 46000) p->m_val = 1.275; /* 48kHz */ 292 304 else if(rate < 38000){ /* 32kHz */ 305 p->m_val = .94; 306 for(i=0; i<4; i++) p->m3n[i] = m3n32[i]; 307 }else if(rate > 46000){ /* 48kHz */ 308 p->m_val = 1.275; 309 for(i=0; i<4; i++) p->m3n[i] = m3n48[i]; 310 }else{ /* 44.1kHz */ 311 p->m_val = 1.; 312 for(i=0; i<4; i++) p->m3n[i] = m3n44[i]; 313 } 314 293 315 /* set up the lookups for a given blocksize and sample rate */ 294 316 295 317 for(i=0,j=0;i<MAX_ATH-1;i++){ … … 854 876 int offset_select, 855 877 float *logmask, 856 878 float *mdct, 857 float *logmdct){ 858 int i,n=p->n; 859 float de, coeffi, cx;/* AoTuV */ 879 float *logmdct, 880 float *lastmdct, float *tempmdct, 881 int blocktype, int modenumber, 882 int nW_modenumber, 883 int lW_blocktype, int lW_modenumber, int lW_no){ 884 885 int i,j,n=p->n; 886 int it_sw, *m3n, nquarter=n/4; /* aoTuV for M3&M4 */ 887 double ace=0; /* aoTuV for M4 */ 888 float de, coeffi, cx; /* aoTuV for M1 */ 889 float noise_rate, noise_rate_low, noise_center, rate_mod; /* aoTuV for M3 */ 860 890 float toneatt=p->vi->tone_masteratt[offset_select]; 861 891 862 892 cx = p->m_val; 893 m3n = p->m3n; 894 895 /** @ M3 PRE **/ 896 if((n == 128) && !modenumber && !blocktype){ 897 if(!lW_blocktype && !lW_modenumber){ /* last window "short" - type "impulse" */ 898 if(lW_no < 8){ 899 /* impulse - @impulse case1 */ 900 noise_rate = 0.8-(float)(lW_no-1)/17; 901 noise_center = (float)(lW_no*3); 902 }else{ 903 /* impulse - @impulse case2 */ 904 noise_rate = 0.4; 905 noise_center = 25; 906 } 907 if(offset_select == 1){ 908 for(i=0; i<128; i++) tempmdct[i] -= 5; 909 } 910 }else{ /* non_impulse - @Short(impulse) case */ 911 noise_rate = 0.95; 912 noise_center = 0; 913 if(offset_select == 1){ 914 for(i=0; i<128; i++) tempmdct[i] = lastmdct[i] - 5; 915 } 916 } 917 noise_rate_low = noise_rate*0.6; 918 it_sw = 1; 919 }else{ 920 it_sw = 0; 921 } 922 923 /** @ M3&M4 PRE **/ 924 if(cx < 0.5){ 925 it_sw = 0; /* for M3 */ 926 nquarter = 0; /* for M4 */ 927 }else{ 928 /* calculation of the correction value of noise masking (longblock). 929 the magic number should change with psych_44.h's "_psy_compand_44" values 930 and setup_44.h's "_psy_compand_long_mapping" value. for M4 */ 931 if(modenumber && blocktype && (p->vi->noisecompand[12] > 7.8)){ 932 for(i=nquarter; i<n; i++) ace += logmdct[i]; 933 ace = (float)(n/ace*1000+13); 934 if(ace < 0) ace = 0; 935 else ace *= ace*((p->vi->noisecompand[12]-7.8)/4.2); /* range of q-1~q2.99... */ 936 }else nquarter = 0; 937 } 863 938 864 939 for(i=0;i<n;i++){ 865 940 float val= noise[i]+p->noiseoffset[offset_select][i]; 941 float tval= tone[i]+toneatt; 866 942 if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; 867 logmask[i]=max(val,tone[i]+toneatt); 868 943 944 /* AoTuV */ 945 /** @ M4 MAIN ** 946 When the energy of a high frequency is small, the noise level of a low frequency is lowered. 947 This is the measure against complaints of a solo musical instrument. 948 by Aoyumi @ 2004/09/18 949 */ 950 if(i < nquarter){ 951 if(logmdct[i] > -120) val -= (float)ace; 952 } 953 954 /* AoTuV */ 955 /** @ M3 MAIN ** 956 Dynamic impulse block noise control. (#3) 957 48/44.1/32kHz only. 958 by Aoyumi @ 2004/08/30 959 */ 960 if(it_sw){ 961 for(j=1; j<=temp_bfn[i]; j++){ 962 float tempbuf = logmdct[i]-(75/temp_bfn[i]*j)-5; 963 if( (tempmdct[i+j] < tempbuf) && (tempmdct[i+j] < (logmdct[i+j]-5)) ) 964 tempmdct[i+j] = logmdct[i+j] - 5; 965 } 966 967 if(val > tval){ 968 if( logmdct[i] > (tempmdct[i]+noise_center) ){ 969 tempmdct[i] = logmdct[i]; 970 if(logmdct[i] < lastmdct[i]) rate_mod = noise_rate; 971 else rate_mod = noise_rate_low; 972 973 if(i > m3n[1]){ 974 if((val-tval) > 30) val = val - ((val-tval-30)/10+30)*rate_mod; 975 else val = val - (val-tval)*rate_mod; 976 }else if(i > m3n[2]){ 977 if((val-tval) > 20) val = val - ((val-tval-20)/10+20)*rate_mod; 978 else val = val - (val-tval)*rate_mod; 979 }else if(i > m3n[3]){ 980 if((val-tval) > 10) val = val - ((val-tval-10)/10+10)*rate_mod*0.5; 981 else val = val - (val-tval)*rate_mod*0.5; 982 }else{ 983 if((val-tval) > 10) val = val - ((val-tval-10)/10+10)*rate_mod*0.3; 984 else val = val - (val-tval)*rate_mod*0.3; 985 } 986 } 987 } 988 } 989 990 logmask[i]=max(val,tval); 869 991 870 992 /* AoTuV */ 871 993 /** @ M1 ** … … 904 1026 905 1027 } 906 1028 } 1029 1030 /** @ M3 SET lastmdct **/ 1031 if(offset_select == 1){ 1032 if(n == 1024){ 1033 if(!nW_modenumber){ 1034 for(i=0; i<128; i++){ 1035 lastmdct[i] = logmdct[i*8]; 1036 for(j=1; j<8; j++){ 1037 if(lastmdct[i] > logmdct[i*8+j]){ 1038 lastmdct[i] = logmdct[i*8+j]; 1039 } 1040 } 1041 } 1042 } 1043 }else if(n == 128){ 1044 for(i=0; i<128; i++) lastmdct[i] = logmdct[i]; 1045 } 1046 } 907 1047 } 908 1048 909 1049 float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){ … … 1021 1161 return (f1<f2)-(f1>f2); 1022 1162 } 1023 1163 1164 /*** optimization of sort (for 8 or 32 element) ***/ 1165 #ifdef OPT_SORT 1166 #define C(o,a,b)\ 1167 (fabs(data[o+a])>=fabs(data[o+b])) 1168 #define O(o,a,b,c,d)\ 1169 {n[o]=o+a;n[o+1]=o+b;n[o+2]=o+c;n[o+3]=o+d;} 1170 #define SORT4(o)\ 1171 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)\ 1172 else if(C(o,1,3))O(o,0,2,1,3)\ 1173 else O(o,0,2,3,1)\ 1174 else if(C(o,0,3))if(C(o,1,3))O(o,2,0,1,3)\ 1175 else O(o,2,0,3,1)\ 1176 else O(o,2,3,0,1)\ 1177 else if(C(o,1,2))if(C(o,0,2))O(o,1,0,2,3)\ 1178 else if(C(o,0,3))O(o,1,2,0,3)\ 1179 else O(o,1,2,3,0)\ 1180 else if(C(o,1,3))if(C(o,0,3))O(o,2,1,0,3)\ 1181 else O(o,2,1,3,0)\ 1182 else O(o,2,3,1,0)\ 1183 else if(C(o,0,1))if(C(o,0,3))if(C(o,1,3))O(o,0,1,3,2)\ 1184 else if(C(o,1,2))O(o,0,3,1,2)\ 1185 else O(o,0,3,2,1)\ 1186 else if(C(o,0,2))if(C(o,1,2))O(o,3,0,1,2)\ 1187 else O(o,3,0,2,1)\ 1188 else O(o,3,2,0,1)\ 1189 else if(C(o,1,3))if(C(o,0,3))O(o,1,0,3,2)\ 1190 else if(C(o,0,2))O(o,1,3,0,2)\ 1191 else O(o,1,3,2,0)\ 1192 else if(C(o,1,2))if(C(o,0,2))O(o,3,1,0,2)\ 1193 else O(o,3,1,2,0)\ 1194 else O(o,3,2,1,0) 1195 1196 static void sortindex_fix8(int *index, 1197 float *data, 1198 int offset){ 1199 int i,j,k,n[8]; 1200 index+=offset; 1201 data+=offset; 1202 SORT4(0) 1203 SORT4(4) 1204 j=0;k=4; 1205 for(i=0;i<8;i++) 1206 index[i]=n[(k>=8)||(j<4)&&C(0,n[j],n[k])?j++:k++]+offset; 1207 } 1208 1209 static void sortindex_fix32(int *index, 1210 float *data, 1211 int offset){ 1212 int i,j,k,n[32]; 1213 for(i=0;i<32;i+=8) 1214 sortindex_fix8(index,data,offset+i); 1215 index+=offset; 1216 for(i=j=0,k=8;i<16;i++) 1217 n[i]=index[(k>=16)||(j<8)&&C(0,index[j],index[k])?j++:k++]; 1218 for(i=j=16,k=24;i<32;i++) 1219 n[i]=index[(k>=32)||(j<24)&&C(0,index[j],index[k])?j++:k++]; 1220 for(i=j=0,k=16;i<32;i++) 1221 index[i]=n[(k>=32)||(j<16)&&C(0,n[j],n[k])?j++:k++]; 1222 } 1223 1224 static void sortindex_shellsort(int *index, 1225 float *data, 1226 int offset, 1227 int count){ 1228 int gap,pos,left,right,i,j; 1229 index+=offset; 1230 for(i=0;i<count;i++)index[i]=i+offset; 1231 gap=1; 1232 while (gap<=count)gap=gap*3+1; 1233 gap/=3; 1234 if(gap>=4)gap/=3; 1235 while(gap>0){ 1236 for(pos=gap;pos<count;pos++){ 1237 for(left=pos-gap;left>=0;left-=gap){ 1238 i=index[left];j=index[left+gap]; 1239 if(!C(0,i,j)){ 1240 index[left]=j; 1241 index[left+gap]=i; 1242 }else break; 1243 } 1244 } 1245 gap/=3; 1246 } 1247 } 1248 1249 static void sortindex(int *index, 1250 float *data, 1251 int offset, 1252 int count){ 1253 if(count==8)sortindex_fix8(index,data,offset); 1254 else if(count==32)sortindex_fix32(index,data,offset); 1255 else sortindex_shellsort(index,data,offset,count); 1256 } 1257 1258 #undef C 1259 #undef O 1260 #undef SORT4 1261 1262 #endif 1263 /*** OPT_SORT End ***/ 1264 1265 1024 1266 int **_vp_quantize_couple_sort(vorbis_block *vb, 1025 1267 vorbis_look_psy *p, 1026 1268 vorbis_info_mapping0 *vi, 1027 1269 float **mags){ 1028 1270 1029 1271 #ifdef OPT_SORT 1272 if(p->vi->normal_point_p){ 1273 int i,j,n=p->n; 1274 int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); 1275 int partition=p->vi->normal_partition; 1276 1277 for(i=0;i<vi->coupling_steps;i++){ 1278 ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); 1279 1280 for(j=0;j<n;j+=partition){ 1281 sortindex(ret[i],mags[i],j,partition); 1282 } 1283 } 1284 return(ret); 1285 } 1286 return(NULL); 1287 #else 1030 1288 if(p->vi->normal_point_p){ 1031 1289 int i,j,k,n=p->n; 1032 1290 int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); … … 1045 1303 return(ret); 1046 1304 } 1047 1305 return(NULL); 1306 #endif 1048 1307 } 1049 1308 1050 1309 void _vp_noise_normalize_sort(vorbis_look_psy *p, 1051 1310 float *magnitudes,int *sortedindex){ 1311 #ifdef OPT_SORT 1312 int j,n=p->n; 1313 vorbis_info_psy *vi=p->vi; 1314 int partition=vi->normal_partition; 1315 int start=vi->normal_start; 1316 1317 for(j=start;j<n;j+=partition){ 1318 if(j+partition>n)partition=n-j; 1319 sortindex(sortedindex-start,magnitudes,j,partition); 1320 } 1321 #else 1052 1322 int i,j,n=p->n; 1053 1323 vorbis_info_psy *vi=p->vi; 1054 1324 int partition=vi->normal_partition; … … 1063 1333 sortedindex[i+j-start]=work[i]-magnitudes; 1064 1334 } 1065 1335 } 1336 #endif 1066 1337 } 1067 1338 1068 1339 void _vp_noise_normalize(vorbis_look_psy *p, … … 1120 1391 int **mag_sort, 1121 1392 int **ifloor, 1122 1393 int *nonzero, 1123 int sliding_lowpass){ 1394 int sliding_lowpass, 1395 int blocktype, int modenumber, 1396 int lW_blocktype, int lW_modenumber){ 1124 1397 1125 1398 int i,j,k,n=p->n; 1126 1399 … … 1157 1430 nonzero[vi->coupling_mag[i]]=1; 1158 1431 nonzero[vi->coupling_ang[i]]=1; 1159 1432 1160 /* The threshold of a stereo is changed with the size of n */ 1161 if(n > 1000) 1162 postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; 1163 1433 if(p->m_val > 0.5){ 1434 /* The threshold of a stereo is changed in specific conditions. */ 1435 if(modenumber){ 1436 postpoint=stereo_threshholds_long[g->coupling_postpointamp[blobno]]; 1437 /* impuse/transition - [transition] 1438 this is needed in order to solve the problem on which some are conspicuous. */ 1439 if(!blocktype && modenumber){ 1440 if((!lW_blocktype && !lW_modenumber) || (!lW_blocktype && lW_modenumber)){ 1441 postpoint=stereo_threshholds_trans_post[g->coupling_postpointamp[blobno]]; 1442 prepoint=stereo_threshholds_trans_pre[g->coupling_prepointamp[blobno]]; 1443 } 1444 } 1445 } 1446 } 1447 1164 1448 for(j=0;j<p->n;j+=partition){ 1165 1449 float acc=0.f; 1166 1450 … … 1176 1460 floorM[l],floorA[l], 1177 1461 qM+l,qA+l); 1178 1462 1179 if(rint(qM[l])==0.f)acc+=qM[l]*qM[l]; 1463 //if(rint(qM[l])==0.f)acc+=qM[l]*qM[l]; /* ? */ 1464 if( (rint(qM[l])==0.f) && (l>=limit) )acc+=qM[l]*qM[l]; 1180 1465 }else{ 1181 1466 couple_lossless(rM[l],rA[l],qM+l,qA+l); 1182 1467 } … … 1203 1488 /* AoTuV */ 1204 1489 /** @ M2 ** 1205 1490 The boost problem by the combination of noise normalization and point stereo is eased. 1206 However, this is a temporary patch. 1207 by Aoyumi @ 2004/ 04/181491 However, this is a temporary patch. (#2 fixed) 1492 by Aoyumi @ 2004/10/24 1208 1493 */ 1209 1494 1210 1495 void hf_reduction(vorbis_info_psy_global *g, 1211 1496 vorbis_look_psy *p, 1212 1497 vorbis_info_mapping0 *vi, 1213 1498 float **mdct){ 1214 1215 int i,j,n=p->n, de=0.3*p->m_val; 1216 int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; 1217 int start=p->vi->normal_start; 1499 int i,j,n=p->n,start; 1500 int p_limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; 1501 int n_start=p->vi->normal_start; 1502 float de=0.1; 1503 1504 if(p->m_val < 0.5) return; 1505 if(p->m_val < 0.999) de *= p->m_val; /* 32kHz */ 1506 1507 if(p_limit > n_start) start = p_limit; 1508 else start = n_start; 1218 1509 1219 1510 for(i=0; i<vi->coupling_steps; i++){ 1220 /* for(j=start; j<limit; j++){} // ???*/ 1221 for(j=limit; j<n; j++) 1222 mdct[i][j] *= (1.0 - de*((float)(j-limit) / (float)(n-limit))); 1511 for(j=start; j<n; j++) 1512 mdct[i][j] *= (1.0 - de*((float)(j-start) / (float)(n-start))); 1223 1513 } 1224 1514 } -
lib/psy.h
diff -Nru ../libvorbis-1.1.0-orig/lib/psy.h ./lib/psy.h
old new 15 15 16 16 ********************************************************************/ 17 17 18 #define OPT_SORT 19 18 20 #ifndef _V_PSY_H_ 19 21 #define _V_PSY_H_ 20 22 #include "smallft.h" … … 110 112 int total_octave_lines; 111 113 long rate; /* cache it */ 112 114 115 int m3n[4]; /* number for M3 */ 113 116 float m_val; /* Masking compensation value */ 114 117 115 118 } vorbis_look_psy; … … 144 147 int offset_select, 145 148 float *logmask, 146 149 float *mdct, 147 float *logmdct); 150 float *logmdct, 151 float *lastmdct, float *tempmdct, 152 int blocktype, int modenumber, 153 int nW_modenumber, 154 int lW_blocktype, int lW_modenumber, int lW_no); 148 155 149 156 extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd); 150 157 … … 163 170 int **mag_sort, 164 171 int **ifloor, 165 172 int *nonzero, 166 int sliding_lowpass); 173 int sliding_lowpass, 174 int blocktype, int modenumber, 175 int lW_blocktype, int lW_modenumber); 167 176 168 177 extern void _vp_noise_normalize(vorbis_look_psy *p, 169 178 float *in,float *out,int *sortedindex);