diff -Nru libvorbis-1.2.0.dfsg/debian/changelog libvorbis-1.2.0.dfsg/debian/changelog --- libvorbis-1.2.0.dfsg/debian/changelog 2008-05-02 10:48:39.000000000 +0700 +++ libvorbis-1.2.0.dfsg/debian/changelog 2008-05-02 10:48:40.000000000 +0700 @@ -1,3 +1,14 @@ +libvorbis (1.2.0.dfsg-2ubuntu1~ppa1) hardy; urgency=low + + * debian/patches/aotuvb5.5-libvorbis1.2.0.diff + - Imported aoTuV beta5.5 patch. (LP: #57797) + * debian/copyright + - Added copyright notice for aoTuV modifications. + * debian/rules + - dh_installdocs -A for aoTuV_README-1st.txt and aoTuV_technical.txt + + -- Артём Попов Thu, 01 May 2008 22:46:59 +0700 + libvorbis (1.2.0.dfsg-2) unstable; urgency=high * Bump shlibs for libvorbis0a due to new vorbis_synthesis_idheader header. diff -Nru /tmp/X5pbunHnbI/libvorbis-1.2.0.dfsg/debian/copyright /tmp/d5SPXkh9Av/libvorbis-1.2.0.dfsg/debian/copyright --- libvorbis-1.2.0.dfsg/debian/copyright 2008-05-02 10:48:39.000000000 +0700 +++ libvorbis-1.2.0.dfsg/debian/copyright 2008-05-02 10:48:40.000000000 +0700 @@ -6,10 +6,12 @@ URL: Upstream Author: Monty +aoTuV modifications: Aoyumi Copyright: - -Copyright (c) 2002, Xiph.org Foundation + +libvorbis - Copyright (c) 2002-2007 Xiph.org Foundation +aoTuV modifications - Copyright (c) 2003-2008 Aoyumi Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff -Nru /tmp/X5pbunHnbI/libvorbis-1.2.0.dfsg/debian/patches/aotuvb5.5-libvorbis1.2.0.diff /tmp/d5SPXkh9Av/libvorbis-1.2.0.dfsg/debian/patches/aotuvb5.5-libvorbis1.2.0.diff --- libvorbis-1.2.0.dfsg/debian/patches/aotuvb5.5-libvorbis1.2.0.diff 1970-01-01 06:00:00.000000000 +0600 +++ libvorbis-1.2.0.dfsg/debian/patches/aotuvb5.5-libvorbis1.2.0.diff 2008-05-02 10:48:40.000000000 +0700 @@ -0,0 +1,5838 @@ +diff -crN libvorbis-1.2.0/COPYING aotuv-b5.5_20080330/COPYING +*** libvorbis-1.2.0/COPYING Tue Sep 21 06:09:22 2004 +--- aotuv-b5.5_20080330/COPYING Sun Mar 30 14:35:42 2008 +*************** +*** 1,4 **** +! Copyright (c) 2002-2004 Xiph.org Foundation + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions +--- 1,5 ---- +! aoTuV - Copyright (c) 2003-2008 Aoyumi +! libvorbis - Copyright (c) 2002-2007 Xiph.org Foundation + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions +diff -crN libvorbis-1.2.0/aoTuV_README-1st.txt aotuv-b5.5_20080330/aoTuV_README-1st.txt +*** libvorbis-1.2.0/aoTuV_README-1st.txt Thu Jan 01 09:00:00 1970 +--- aotuv-b5.5_20080330/aoTuV_README-1st.txt Sun Mar 30 14:35:42 2008 +*************** +*** 0 **** +--- 1,21 ---- ++ aoTuV Beta 5.5 ++ ++ "aoTuV" tunes up Xiph.Org's libvorbis uniquely. ++ A license is taken as "BSD-style license" as well as original libvorbis. ++ ++ ++ # NOTICE # ++ ++ Manuke's patch is used for improvement in the speed of sort processing. ++ When "#define OPT_SORT" of "lib/psy.h" is deleted, the conventional ++ processing method is used. ++ Thanks! Manuke. ++ ++ ++ aoTuV based on ++ ++ Copyright (c) 2002-2007 Xiph.Org Foundation ++ Copyright (c) 2003-2008 Aoyumi ++ ++ ++ AUTHOR : aoyumi +diff -crN libvorbis-1.2.0/aoTuV_technical.txt aotuv-b5.5_20080330/aoTuV_technical.txt +*** libvorbis-1.2.0/aoTuV_technical.txt Thu Jan 01 09:00:00 1970 +--- aotuv-b5.5_20080330/aoTuV_technical.txt Sun Mar 30 14:35:42 2008 +*************** +*** 0 **** +--- 1,172 ---- ++ aoTuV beta5.5 technical information ++ ++ ++ The differences from the aoTuV beta 5... ++ ++ 1. The frequency domain width of M6 was revised. ++ ++ 2. For q-1/-2, a pre-echo reduction code was applied (M3). In addition, ++ the M3 code was improved. ++ ++ 3. The floor setup parameters in the low bit-rate were changed. ++ ++ 4. The part including bug of noise normalization was rewritten. ++ ++ 5. "libvorbis 1.2.0" was merged. Furthermore, the revisions of Bug #300 and ++ #1229 were applied. ++ ++ 6. The ATH curve of the high frequency area (more than 32kHz) was revised. ++ ++ ...and I tune up many parameters. ++ ++ ++ 2008/03/30 ++ Aoyumi ++ ++ ---------------------------------------------------------------------------- ++ ++ aoTuV beta5 technical information ++ ++ ++ The differences from the aoTuV beta 4.51... ++ ++ 1. In order to work noise normalization correctly, the value of tone ++ masking is compressed under certain conditions. A floor curve approaches ++ the original audio spectrum line as a result. [New M4] ++ ++ 2. In order to cut down the bitrate, a part of M2 code of beta4 was ++ deleted. ++ ++ @3. The ATH curve was changed slightly. ++ ++ 4. Pre-echo decreased slightly. This is based on change of M3 code. ++ ++ 5. In order to decrease artifact by collapse of audio energy, noise ++ normalization processing of point stereo was extended. [32/44.1/48kHz only] ++ ++ 6. The threshold of channel coupling (lossless <=> point) is changed ++ dynamically. This is a method based on a certain idea. [M6] ++ ++ ...and I tune up many parameters. ++ ++ ++ 2006/10/24 ++ Aoyumi ++ ++ ---------------------------------------------------------------------------- ++ ++ aoTuV beta4.51 technical information ++ ++ ++ The differences from the aoTuV beta 4.5... ++ ++ 1. The changed part of "scale.h" of Xiph.Org SVN was reflected in aoTuV. ++ This will solve the problem of the compile by gcc4. ++ ++ 2. A part of portion added by beta4.5 had caused memory access violation. ++ Depending on environment, a problem arises in qualiy-1/-2. This problem was ++ corrected. ++ ++ ++ 2005/11/17 ++ Aoyumi ++ ++ ---------------------------------------------------------------------------- ++ ++ aoTuV beta4.5 technical information ++ ++ ++ The differences from the aoTuV beta 4... ++ ++ 1. M4 code of beta3 was deleted. M5 is added as what is replaced with it. ++ The advantage of this method is that the result stabilized more is obtained. ++ Instead, the change width of the bit rate becomes large rather than before. ++ [32/44.1/48kHz only] ++ ++ 2. New M4 was added. There is this for the same purpose as M1. However, ++ it is tuned up only in the low bit rate region according to work and ++ individual parameters. [32/44.1/48kHz only] ++ ++ 3. M2 code was extended. This decreases a specific noise problem. ++ [32/44.1/48kHz only] ++ ++ ...and I mainly tune up tone/noise masking and noise normalization parameters. ++ ++ The above change is applied below quality3. ++ ++ ++ 2005/11/05 ++ Aoyumi ++ ++ ---------------------------------------------------------------------------- ++ ++ aoTuV beta4 technical information ++ ++ ++ The differences from the aoTuV beta 3... ++ ++ 1. Adoption of new hypot (point stereo). This works in general better than ++ dipole/round hypot. And when residue is likely to decrease greatly at the ++ time of a reverse phase, added code is made to increase the ratio of lossless. ++ ++ 2. Change of ATH curve. This is not a big change. ++ ++ 3. Residue used for threshold calculation of channel coupling is changed. ++ This one seems to be good selection. ++ ++ 4. HF reduction code of beta3 was deleted. Now, this is not required. ++ ++ 5. The energy deficit of M4 code of beta3 -- correction of a bug Now. ++ ++ 6. The code for pulling downward floor of the frequency range which can ++ be easy to be heard was added (New M2). This works by the low bit rate and ++ has a comparatively good trade-off. ++ ++ 7. Change of threshold calculation of noise normalization. Moreover, it ++ takes phase information into consideration. ++ ++ ++ ...and I mainly tune up tone/noise masking and noise compander parameters. ++ ++ ++ 2005/06/18 ++ Aoyumi ++ ++ ---------------------------------------------------------------------------- ++ ++ aoTuV beta3 technical information ++ ++ ++ The differences from the aoTuV beta 2 and Vorbis 1.1... ++ ++ 1. Dynamic impulse block noise control(q0-10). [32/44.1/48kHz only] ++ Conspicuous pre-echo is reduced. ++ ++ 2. New ATH curve. ++ ++ 3. In order to cancel that a small sound becomes unstable, the noise level ++ of low frequency is lowered under specific conditions. (Only below q3) ++ There is a greatest effect on a piano etc. [32/44.1/48kHz only] ++ ++ 4. The rate of lossless stereo is increased in specific conditions. This ++ improves many of conspicuous problems which a point stereo causes. (e.g ++ drumus's hiss/voice, guitar and brass's distortion) [32/44.1/48kHz only] ++ ++ 5. The action of the noise normalization of point stereo is corrected. It ++ was set to one of the causes of distortion in a long tone (e.g ++ strings/oboe/high tone voice). ++ ++ 6. The HF reduction code was not working normally. This is corrected and ++ it retuned up according to the present condition. [32/44.1/48kHz only] ++ ++ 7. The q-2 mode was added in all sampling frequencies. And nominal bitrate ++ of q-1 are changed into a more nearly average value. Although nominal ++ bitrate is more large at a low sampling frequency, average bitrate hardly ++ differs from the former version. ++ ++ ++ ...and I mainly tune up tone/noise masking parameters. ++ ++ ++ 2004/11/21 ++ Aoyumi +diff -crN libvorbis-1.2.0/lib/Makefile.am aotuv-b5.5_20080330/lib/Makefile.am +*** libvorbis-1.2.0/lib/Makefile.am Mon Jul 26 22:31:38 2004 +--- aotuv-b5.5_20080330/lib/Makefile.am Sun Mar 30 14:35:40 2008 +*************** +*** 14,20 **** + envelope.h lpc.h lsp.h codebook.h misc.h psy.h\ + masking.h os.h mdct.h smallft.h highlevel.h\ + registry.h scales.h window.h lookup.h lookup_data.h\ +! codec_internal.h backends.h bitrate.h + libvorbis_la_LDFLAGS = -no-undefined -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ + libvorbis_la_LIBADD = @OGG_LIBS@ @VORBIS_LIBS@ + +--- 14,21 ---- + envelope.h lpc.h lsp.h codebook.h misc.h psy.h\ + masking.h os.h mdct.h smallft.h highlevel.h\ + registry.h scales.h window.h lookup.h lookup_data.h\ +! codec_internal.h backends.h bitrate.h\ +! psy_table.h + libvorbis_la_LDFLAGS = -no-undefined -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ + libvorbis_la_LIBADD = @OGG_LIBS@ @VORBIS_LIBS@ + +diff -crN libvorbis-1.2.0/lib/Makefile.in aotuv-b5.5_20080330/lib/Makefile.in +*** libvorbis-1.2.0/lib/Makefile.in Thu Jul 26 01:46:36 2007 +--- aotuv-b5.5_20080330/lib/Makefile.in Sun Mar 30 14:35:40 2008 +*************** +*** 258,264 **** + envelope.h lpc.h lsp.h codebook.h misc.h psy.h\ + masking.h os.h mdct.h smallft.h highlevel.h\ + registry.h scales.h window.h lookup.h lookup_data.h\ +! codec_internal.h backends.h bitrate.h + + libvorbis_la_LDFLAGS = -no-undefined -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ + libvorbis_la_LIBADD = @OGG_LIBS@ @VORBIS_LIBS@ +--- 258,265 ---- + envelope.h lpc.h lsp.h codebook.h misc.h psy.h\ + masking.h os.h mdct.h smallft.h highlevel.h\ + registry.h scales.h window.h lookup.h lookup_data.h\ +! codec_internal.h backends.h bitrate.h\ +! psy_table.h + + libvorbis_la_LDFLAGS = -no-undefined -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@ + libvorbis_la_LIBADD = @OGG_LIBS@ @VORBIS_LIBS@ +diff -crN libvorbis-1.2.0/lib/block.c aotuv-b5.5_20080330/lib/block.c +*** libvorbis-1.2.0/lib/block.c Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/block.c Sun Mar 30 14:43:38 2008 +*************** +*** 106,112 **** + oggpack_writeinit(vbi->packetblob[i]); + } + } +! + return(0); + } + +--- 106,112 ---- + oggpack_writeinit(vbi->packetblob[i]); + } + } +! + return(0); + } + +*************** +*** 287,292 **** +--- 287,298 ---- + b=v->backend_state; + b->psy_g_look=_vp_global_look(vi); + ++ /* Init (added by aoyumi) */ ++ b->nblock = _ogg_calloc((256*vi->channels), sizeof(*b->nblock)); ++ b->tblock = _ogg_calloc((256*vi->channels), sizeof(*b->tblock)); ++ b->lownoise_compand_level = _ogg_calloc(vi->channels, sizeof(*b->lownoise_compand_level)); ++ b->padnum = 0; ++ + /* Initialize the envelope state storage */ + b->ve=_ogg_calloc(1,sizeof(*b->ve)); + _ve_envelope_init(b->ve,vi); +*************** +*** 351,356 **** +--- 357,367 ---- + + drft_clear(&b->fft_look[0]); + drft_clear(&b->fft_look[1]); ++ ++ /* added by aoyumi */ ++ if(b->nblock) _ogg_free(b->nblock); ++ if(b->tblock) _ogg_free(b->tblock); ++ if(b->lownoise_compand_level) _ogg_free(b->lownoise_compand_level); + + } + +*************** +*** 403,409 **** + + static void _preextrapolate_helper(vorbis_dsp_state *v){ + int i; +! int order=32; + float *lpc=alloca(order*sizeof(*lpc)); + float *work=alloca(v->pcm_current*sizeof(*work)); + long j; +--- 414,420 ---- + + static void _preextrapolate_helper(vorbis_dsp_state *v){ + int i; +! int order=16; + float *lpc=alloca(order*sizeof(*lpc)); + float *work=alloca(v->pcm_current*sizeof(*work)); + long j; +*************** +*** 418,423 **** +--- 429,445 ---- + /* prime as above */ + vorbis_lpc_from_data(work,lpc,v->pcm_current-v->centerW,order); + ++ #if 0 ++ if(v->vi->channels==2){ ++ if(i==0) ++ _analysis_output("predataL",0,work,v->pcm_current-v->centerW,0,0,0); ++ else ++ _analysis_output("predataR",0,work,v->pcm_current-v->centerW,0,0,0); ++ }else{ ++ _analysis_output("predata",0,work,v->pcm_current-v->centerW,0,0,0); ++ } ++ #endif ++ + /* run the predictor filter */ + vorbis_lpc_predict(lpc,work+v->pcm_current-v->centerW-order, + order, +diff -crN libvorbis-1.2.0/lib/codec_internal.h aotuv-b5.5_20080330/lib/codec_internal.h +*** libvorbis-1.2.0/lib/codec_internal.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/codec_internal.h Sun Mar 30 14:43:38 2008 +*************** +*** 82,87 **** +--- 82,97 ---- + bitrate_manager_state bms; + + ogg_int64_t sample_count; ++ ++ /* encode only ++ added by aoyumi */ ++ float *lownoise_compand_level; ++ float *nblock; /* lW logmdct buffer */ ++ float *tblock; /* temporal masking buffer (impulse block) */ ++ int lW_blocktype; /* last window block type */ ++ int lW_modenumber; /* last window mode number (0=short, 1=long) */ ++ int lW_no; /* the number of continuous window blocks (last window) */ ++ int padnum; /* padding block number (impulse-padding-impulse case) for M3 */ + } private_state; + + /* codec_setup_info contains all the setup information specific to the +diff -crN libvorbis-1.2.0/lib/info.c aotuv-b5.5_20080330/lib/info.c +*** libvorbis-1.2.0/lib/info.c Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/info.c Sun Mar 30 14:43:38 2008 +*************** +*** 451,457 **** + } + + static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ +! char temp[]="Xiph.Org libVorbis I 20070622"; + int bytes = strlen(temp); + + /* preamble */ +--- 451,457 ---- + } + + static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){ +! char temp[]="AO; aoTuV b5a [20080330] (based on Xiph.Org's libVorbis)"; + int bytes = strlen(temp); + + /* preamble */ +diff -crN libvorbis-1.2.0/lib/lpc.c aotuv-b5.5_20080330/lib/lpc.c +*** libvorbis-1.2.0/lib/lpc.c Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/lpc.c Sun Mar 30 14:43:38 2008 +*************** +*** 11,17 **** + ******************************************************************** + + function: LPC low level routines +! last mod: $Id: lpc.c 13293 2007-07-24 00:09:47Z xiphmont $ + + ********************************************************************/ + +--- 11,17 ---- + ******************************************************************** + + function: LPC low level routines +! last mod: $Id: lpc.c 13657 2007-08-30 02:40:29Z xiphmont $ + + ********************************************************************/ + +*************** +*** 62,67 **** +--- 62,68 ---- + double *aut=alloca(sizeof(*aut)*(m+1)); + double *lpc=alloca(sizeof(*lpc)*(m)); + double error; ++ double epsilon; + int i,j; + + /* autocorrelation, p+1 lag coefficients */ +*************** +*** 74,87 **** + + /* Generate lpc coefficients from autocorr values */ + +! error=aut[0]; +! + for(i=0;icodec_setup; + private_state *b=vb->vd->backend_state; + vorbis_block_internal *vbi=(vorbis_block_internal *)vb->internal; ++ vorbis_info_floor1 *vif=ci->floor_param[vb->W]; + int n=vb->pcmend; + int i,j,k; + + int *nonzero = alloca(sizeof(*nonzero)*vi->channels); + float **gmdct = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct)); ++ float **gmdct_org = _vorbis_block_alloc(vb,vi->channels*sizeof(*gmdct_org)); ++ float **res_org = _vorbis_block_alloc(vb,vi->channels*sizeof(*res_org)); + int **ilogmaskch= _vorbis_block_alloc(vb,vi->channels*sizeof(*ilogmaskch)); + int ***floor_posts = _vorbis_block_alloc(vb,vi->channels*sizeof(*floor_posts)); + +*************** +*** 273,278 **** +--- 276,283 ---- + float *logfft =pcm; + + gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); ++ gmdct_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct_org)); ++ res_org[i]=_vorbis_block_alloc(vb,n/2*sizeof(**res_org)); + + scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original + todB estimation used on IEEE 754 +*************** +*** 290,316 **** + next major model upgrade. */ + + #if 0 +! if(vi->channels==2) + if(i==0) + _analysis_output("pcmL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("pcmR",seq,pcm,n,0,0,total-n/2); + #endif + + /* window the PCM data */ + _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW); + + #if 0 +! if(vi->channels==2) + if(i==0) + _analysis_output("windowedL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("windowedR",seq,pcm,n,0,0,total-n/2); + #endif + + /* transform the PCM data */ + /* only MDCT right now.... */ + mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]); + + /* FFT yields more accurate tonal estimation (not phase sensitive) */ + drft_forward(&b->fft_look[vb->W],pcm); +--- 295,328 ---- + next major model upgrade. */ + + #if 0 +! if(vi->channels==2){ + if(i==0) + _analysis_output("pcmL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("pcmR",seq,pcm,n,0,0,total-n/2); ++ }else{ ++ _analysis_output("pcm",seq,pcm,n,0,0,total-n/2); ++ } + #endif + + /* window the PCM data */ + _vorbis_apply_window(pcm,b->window,ci->blocksizes,vb->lW,vb->W,vb->nW); + + #if 0 +! if(vi->channels==2){ + if(i==0) + _analysis_output("windowedL",seq,pcm,n,0,0,total-n/2); + else + _analysis_output("windowedR",seq,pcm,n,0,0,total-n/2); ++ }else{ ++ _analysis_output("windowed",seq,pcm,n,0,0,total-n/2); ++ } + #endif + + /* transform the PCM data */ + /* only MDCT right now.... */ + mdct_forward(b->transform[vb->W][0],pcm,gmdct[i]); ++ memcpy(gmdct_org[i], gmdct[i], n/2*sizeof(**gmdct_org)); + + /* FFT yields more accurate tonal estimation (not phase sensitive) */ + drft_forward(&b->fft_look[vb->W],pcm); +*************** +*** 359,364 **** +--- 371,378 ---- + }else{ + _analysis_output("fftR",seq,logfft,n/2,1,0,0); + } ++ }else{ ++ _analysis_output("fft",seq,logfft,n/2,1,0,0); + } + #endif + +*************** +*** 380,385 **** +--- 394,404 ---- + + float *logmdct =logfft+n/2; + float *logmask =logfft; ++ ++ float *lastmdct = b->nblock+i*256; ++ float *tempmdct = b->tblock+i*256; ++ ++ float *lowcomp = b->lownoise_compand_level+i; + + vb->mode=modenumber; + +*************** +*** 419,425 **** +--- 438,452 ---- + us a tonality estimate (the larger the value in the + 'noise_depth' vector, the more tonal that area is) */ + ++ *lowcomp= ++ lb_loudnoise_fix(psy_look, ++ *lowcomp, ++ logmdct, ++ b->lW_modenumber, ++ blocktype, modenumber); ++ + _vp_noisemask(psy_look, ++ *lowcomp, + logmdct, + noise); /* noise does not have by-frequency offset + bias applied yet */ +*************** +*** 429,434 **** +--- 456,463 ---- + _analysis_output("noiseL",seq,noise,n/2,1,0,0); + else + _analysis_output("noiseR",seq,noise,n/2,1,0,0); ++ }else{ ++ _analysis_output("noise",seq,noise,n/2,1,0,0); + } + #endif + +*************** +*** 448,453 **** +--- 477,484 ---- + _analysis_output("toneL",seq,tone,n/2,1,0,0); + else + _analysis_output("toneR",seq,tone,n/2,1,0,0); ++ }else{ ++ _analysis_output("tone",seq,tone,n/2,1,0,0); + } + #endif + +*************** +*** 465,473 **** + noise, + tone, + 1, + logmask, + mdct, +! logmdct); + + #if 0 + if(vi->channels==2){ +--- 496,511 ---- + noise, + tone, + 1, ++ vorbis_bitrate_managed(vb), + logmask, + mdct, +! logmdct, +! lastmdct, tempmdct, +! *lowcomp, +! vif->n, +! blocktype, modenumber, +! vb->nW, +! b->lW_blocktype, b->lW_modenumber, b->lW_no, b->padnum); + + #if 0 + if(vi->channels==2){ +*************** +*** 475,480 **** +--- 513,520 ---- + _analysis_output("aotuvM1_L",seq,aotuv,psy_look->n,1,1,0); + else + _analysis_output("aotuvM1_R",seq,aotuv,psy_look->n,1,1,0); ++ }else{ ++ _analysis_output("aotuvM1",seq,aotuv,psy_look->n,1,1,0); + } + } + #endif +*************** +*** 486,491 **** +--- 526,533 ---- + _analysis_output("mask1L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask1R",seq,logmask,n/2,1,0,0); ++ }else{ ++ _analysis_output("mask1",seq,logmask,n/2,1,0,0); + } + #endif + +*************** +*** 499,504 **** +--- 541,547 ---- + logmdct, + logmask); + ++ + /* are we managing bitrate? If so, perform two more fits for + later rate tweaking (fits represent hi/lo) */ + if(vorbis_bitrate_managed(vb) && floor_posts[i][PACKETBLOBS/2]){ +*************** +*** 508,516 **** + noise, + tone, + 2, + logmask, + mdct, +! logmdct); + + #if 0 + if(vi->channels==2){ +--- 551,566 ---- + noise, + tone, + 2, ++ vorbis_bitrate_managed(vb), + logmask, + mdct, +! logmdct, +! lastmdct, tempmdct, +! *lowcomp, +! vif->n, +! blocktype, modenumber, +! vb->nW, +! b->lW_blocktype, b->lW_modenumber, b->lW_no, b->padnum); + + #if 0 + if(vi->channels==2){ +*************** +*** 518,523 **** +--- 568,575 ---- + _analysis_output("mask2L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask2R",seq,logmask,n/2,1,0,0); ++ }else{ ++ _analysis_output("mask2",seq,logmask,n/2,1,0,0); + } + #endif + +*************** +*** 531,546 **** + noise, + tone, + 0, + logmask, + mdct, +! logmdct); + + #if 0 +! if(vi->channels==2) + if(i==0) + _analysis_output("mask0L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask0R",seq,logmask,n/2,1,0,0); + #endif + + floor_posts[i][0]= +--- 583,608 ---- + noise, + tone, + 0, ++ vorbis_bitrate_managed(vb), + logmask, + mdct, +! logmdct, +! lastmdct, tempmdct, +! *lowcomp, +! vif->n, +! blocktype, modenumber, +! vb->nW, +! b->lW_blocktype, b->lW_modenumber, b->lW_no, b->padnum); + + #if 0 +! if(vi->channels==2){ + if(i==0) + _analysis_output("mask0L",seq,logmask,n/2,1,0,0); + else + _analysis_output("mask0R",seq,logmask,n/2,1,0,0); ++ }else{ ++ _analysis_output("mask0",seq,logmask,n/2,1,0,0); ++ } + #endif + + floor_posts[i][0]= +*************** +*** 600,610 **** + psy_look, + info, + mag_memo); +- +- hf_reduction(&ci->psy_g_param, +- psy_look, +- info, +- mag_memo); + } + + memset(sortindex,0,sizeof(*sortindex)*vi->channels); +--- 662,667 ---- +*************** +*** 636,642 **** +--- 693,701 ---- + for(i=0;ichannels;i++){ + int submap=info->chmuxlist[i]; + float *mdct =gmdct[i]; ++ float *mdct_org=gmdct_org[i]; + float *res =vb->pcm[i]; ++ float *resorgch=res_org[i]; + int *ilogmask=ilogmaskch[i]= + _vorbis_block_alloc(vb,n/2*sizeof(**gmdct)); + +*************** +*** 659,666 **** + res, + ci->psy_g_param.sliding_lowpass[vb->W][k]); + +! _vp_noise_normalize(psy_look,res,res+n/2,sortindex[i]); + + + #if 0 + { +--- 718,734 ---- + res, + ci->psy_g_param.sliding_lowpass[vb->W][k]); + +! /* stereo threshold */ +! _vp_remove_floor(psy_look, +! mdct_org, +! ilogmask, +! resorgch, +! ci->psy_g_param.sliding_lowpass[vb->W][k]); +! + ++ _vp_noise_normalize(psy_look,res,res+n/2,sortindex[i], ++ blocktype, modenumber); ++ + + #if 0 + { +*************** +*** 691,697 **** + mag_sort, + ilogmaskch, + nonzero, +! ci->psy_g_param.sliding_lowpass[vb->W][k]); + } + + /* classify and encode by submap */ +--- 759,767 ---- + mag_sort, + ilogmaskch, + nonzero, +! ci->psy_g_param.sliding_lowpass[vb->W][k], +! blocktype, modenumber, +! gmdct, res_org); + } + + /* classify and encode by submap */ +*************** +*** 717,723 **** +--- 787,809 ---- + couple_bundle,NULL,zerobundle,ch_in_bundle,classifications); + } + ++ /* set last-window type & number */ ++ // if (last window == impulse) && (present window == padding) padnum=1 ++ if(!b->lW_modenumber && !b->lW_blocktype && !modenumber && blocktype) b->padnum=1; ++ else if(b->padnum) b->padnum++; ++ if(modenumber) b->padnum=0; // if (present window == (long or trans.) ) padnum=0 [reset] ++ // if (current block type == last block type) lW_no++ ++ if((blocktype == b->lW_blocktype) && (modenumber == b->lW_modenumber)) b->lW_no++; ++ else b->lW_no = 1; ++ b->lW_blocktype = blocktype; ++ b->lW_modenumber = modenumber; + /* ok, done encoding. Next protopacket. */ ++ ++ // block type ++ /*if(modenumber && blocktype)printf("[L]\n"); ++ else if(modenumber && !blocktype)printf("[T]\n"); ++ else if(!modenumber && blocktype)printf("[P]\n"); ++ else if(!modenumber && !blocktype)printf("[I]\n");*/ + } + + } +diff -crN libvorbis-1.2.0/lib/masking.h aotuv-b5.5_20080330/lib/masking.h +*** libvorbis-1.2.0/lib/masking.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/masking.h Sun Mar 30 14:43:38 2008 +*************** +*** 23,38 **** + + #define MAX_ATH 88 + static float ATH[]={ +! /*15*/ -51, -52, -53, -54, -55, -56, -57, -58, +! /*31*/ -59, -60, -61, -62, -63, -64, -65, -66, +! /*63*/ -67, -68, -69, -70, -71, -72, -73, -74, +! /*125*/ -75, -76, -77, -78, -80, -81, -82, -83, +! /*250*/ -84, -85, -86, -87, -88, -88, -89, -89, +! /*500*/ -90, -91, -91, -92, -93, -94, -95, -96, +! /*1k*/ -96, -97, -98, -98, -99, -99,-100,-100, +! /*2k*/ -101,-102,-103,-104,-106,-107,-107,-107, +! /*4k*/ -107,-105,-103,-102,-101, -99, -98, -96, +! /*8k*/ -95, -95, -96, -97, -96, -95, -93, -90, + /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 + }; + +--- 23,51 ---- + + #define MAX_ATH 88 + static float ATH[]={ +! /* original ATH */ +! /*15*/ // -51, -52, -53, -54, -55, -56, -57, -58, +! /*31*/ // -59, -60, -61, -62, -63, -64, -65, -66, +! /*63*/ // -67, -68, -69, -70, -71, -72, -73, -74, +! /*125*/ // -75, -76, -77, -78, -80, -81, -82, -83, +! /*250*/ //-84, -85, -86, -87, -88, -88, -89, -89, +! /*500*/ //-90, -91, -91, -92, -93, -94, -95, -96, +! /*1k*/ //-96, -97, -98, -98, -99, -99,-100,-100, +! /*2k*/ //-101,-102,-103,-104,-106,-107,-107,-107, +! /*4k*/ //-107,-105,-103,-102,-101, -99, -98, -96, +! /*8k*/ //-95, -95, -96, -97, -96, -95, -93, -90, +! /*16k*/ //-80, -70, -50, -40, -30, -30, -30, -30 +! /*Aoyumi's ATH (v6) */ +! /*15*/ -31, -33, -35, -37, -39, -41, -43, -45, +! /*31*/ -47, -49, -51, -53, -55, -57, -59, -61, +! /*63*/ -63, -65, -67, -69, -71, -73, -75, -77, +! /*125*/ -79, -81, -83, -84, -85, -86, -87, -88, +! /*250*/ -89, -90, -91, -92, -93, -94, -95, -96, +! /*500*/ -96, -97, -97, -97, -98, -98, -98, -99, +! /*1k*/ -98, -97, -97, -98, -99,-100,-101,-101, +! /*2k*/ -102,-103,-104,-105,-106,-106,-107,-107, +! /*4k*/ -105,-104,-103,-102,-101, -99, -98, -97, +! /*8k*/ -96, -95, -95, -96, -97, -97, -93, -89, + /*16k*/ -80, -70, -50, -40, -30, -30, -30, -30 + }; + +diff -crN libvorbis-1.2.0/lib/modes/floor_all.h aotuv-b5.5_20080330/lib/modes/floor_all.h +*** libvorbis-1.2.0/lib/modes/floor_all.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/floor_all.h Sun Mar 30 14:43:38 2008 +*************** +*** 145,151 **** + &_huff_book_line_512x17_3sub3, + }; + +! static static_codebook **_floor_books[10]={ + _floor_128x4_books, + _floor_256x4_books, + _floor_128x7_books, +--- 145,151 ---- + &_huff_book_line_512x17_3sub3, + }; + +! static static_codebook **_floor_books[13]={ + _floor_128x4_books, + _floor_256x4_books, + _floor_128x7_books, +*************** +*** 156,164 **** + _floor_1024x27_books, + _floor_2048x27_books, + _floor_512x17_books, + }; + +! static vorbis_info_floor1 _floor[10]={ + /* 128 x 4 */ + { + 1,{0},{4},{2},{0}, +--- 156,167 ---- + _floor_1024x27_books, + _floor_2048x27_books, + _floor_512x17_books, ++ _floor_1024x27_books, ++ _floor_2048x27_books, ++ _floor_256x4low_books, + }; + +! static vorbis_info_floor1 _floor[13]={ + /* 128 x 4 */ + { + 1,{0},{4},{2},{0}, +*************** +*** 243,248 **** +--- 246,276 ---- + + 60,30,500, 1,18., -1 /* lowpass! */ + }, ++ /* 1024 x 27 (44.1/48kHz low bitrate) */ ++ { ++ 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, ++ {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, ++ 2,{0,1024, 93,23,358, 6,46,186,750, 14,33,65, 130,260,485, ++ 3,10,18,28, 39,55,79,111, 158,220,306, 418,650,560}, ++ ++ 60,30,500, 3,18., -1 /* lowpass */ ++ }, ++ /* 2048 x 27 (44.1/48kHz) */ ++ { ++ 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3}, ++ {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}}, ++ 2,{0,2048, 186,46,716, 12,92,372,1500, 28,66,130, 260,520,970, ++ 6,20,36,56, 78,110,158,222, 316,440,612, 836,1300,1120}, ++ ++ 60,30,500, 3,18., -1 /* lowpass */ ++ }, ++ /* 512 x 4 (256 x 4) */ ++ { ++ 1,{0},{4},{2},{0}, ++ {{1,2,3,4}}, ++ 4,{0,512, 132,32,64,280}, + ++ 60,30,500, 1.,18., -1 ++ }, + }; + +diff -crN libvorbis-1.2.0/lib/modes/psych_11.h aotuv-b5.5_20080330/lib/modes/psych_11.h +*** libvorbis-1.2.0/lib/modes/psych_11.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/psych_11.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,39 **** + + ********************************************************************/ + +! static double _psy_lowpass_11[3]={4.5,5.5,30.,}; +! +! static att3 _psy_tone_masteratt_11[3]={ +! {{ 30, 25, 12}, 0, 0}, /* 0 */ +! {{ 30, 25, 12}, 0, 0}, /* 0 */ +! {{ 20, 0, -14}, 0, 0}, /* 0 */ +! }; +! +! static vp_adjblock _vp_tonemask_adj_11[3]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 2, 0,99,99,99}}, /* 0 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 5, 0, 0,99,99,99}}, /* 1 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 2 */ + }; + +! +! static noise3 _psy_noisebias_11[3]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, + {-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +--- 15,37 ---- + + ********************************************************************/ + +! /* tonal masking curve level adjustments *************************/ +! static vp_adjblock _vp_tonemask_adj_11[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 3, 3,99,99,99}}, /* -2 */ +! {{-16,-16,-16,-16,-16,-16,-10,-8,-4, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */ +! {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /* 0 */ +! {{-20,-20,-20,-20,-20,-16,-10,-8,-4,-2, 0, 0, 0, 0,99,99,99}}, /* 10 */ + }; + +! /* noise bias */ +! static noise3 _psy_noisebias_11[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ ++ {{{-10,-10,-10,-10, -5, -5, -4, 2, 4, 10, 10, 12, 12, 12, 99, 99, 99}, ++ {-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 4, 5, 6, 12, 99, 99, 99}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, ++ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 10, 10, 12, 12, 12, 99, 99, 99}, + {-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 4, 5, 5, 10, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +*************** +*** 47,51 **** + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, + }; + +! static double _noise_thresh_11[3]={ .3,.5,.5 }; + +--- 45,60 ---- + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, + }; + +! /* tone master attenuation by base quality mode and bitrate tweak */ +! static att3 _psy_tone_masteratt_11[4]={ +! {{ 31, 28, 13}, 0, 0}, /* -2 */ +! {{ 30, 28, 12}, 0, 0}, /* -1 */ +! {{ 30, 26, 12}, 0, 0}, /* 0 */ +! {{ 20, 0, -14}, 0, 0}, /* 10 */ +! }; +! +! /* lowpass by mode **************/ +! static double _psy_lowpass_11[4]={4.1,4.5,5.5,30.,}; + ++ /* noise normalization **********/ ++ static double _noise_thresh_11[3]={ .3,.3,.5 }; +diff -crN libvorbis-1.2.0/lib/modes/psych_16.h aotuv-b5.5_20080330/lib/modes/psych_16.h +*** libvorbis-1.2.0/lib/modes/psych_16.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/psych_16.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,67 **** + + ********************************************************************/ + +! /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_16[4]={ +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ +! {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! }; +! +! static double _psy_lowpass_16[4]={6.5,8,30.,99.}; +! +! static att3 _psy_tone_masteratt_16[4]={ +! {{ 30, 25, 12}, 0, 0}, /* 0 */ +! {{ 25, 22, 12}, 0, 0}, /* 0 */ +! {{ 20, 12, 0}, 0, 0}, /* 0 */ +! {{ 15, 0, -14}, 0, 0}, /* 0 */ +! }; +! +! static vp_adjblock _vp_tonemask_adj_16[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 1 */ +! {{-20,-20,-20,-20,-20,-16,-10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ +! {{-30,-30,-30,-30,-30,-26,-20,-10, -5, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 2 */ + }; + +! +! static noise3 _psy_noisebias_16_short[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +! {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 6, 6, 6, 6, 8, 10, 12, 20}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +--- 15,43 ---- + + ********************************************************************/ + +! /* tonal masking curve level adjustments *************************/ +! static vp_adjblock _vp_tonemask_adj_16[5]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -2 */ +! {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-2, 0, 0, 0, 0, 0, 0, 0}}, /* -1 */ +! {{-16,-16,-16,-16,-16,-16,-10, -8, -6,-4, 0, 0, 0, 0, 0, 0, 0}}, /* 0.5 */ +! {{-20,-20,-20,-20,-20,-16,-10,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /* 5 */ +! {{-30,-30,-30,-30,-30,-26,-20,-10, -8,-6,-2,-2, 0, 0, 0, 0, 0}}, /* 10 */ + }; + +! /* noise bias */ +! static noise3 _psy_noisebias_16_short[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, +! {-12,-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 5, 6, 7, 8, 8, 15}, +! {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, +! +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 6, 6, 6, 6, 8, 10, 12, 20}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +*************** +*** 74,86 **** + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +! static noise3 _psy_noisebias_16_impulse[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +! {{{-15,-15,-15,-15,-15,-10,-10,-5, 4, 4, 4, 4, 5, 5, 6, 8, 15}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 0, 0, 0, 0, 4, 10}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +--- 50,66 ---- + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +! static noise3 _psy_noisebias_16_impulse[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, +! {-12,-12,-12,-12,-12, -7, -7, -2, 3, 3, 4, 5, 6, 7, 8, 8, 15}, +! {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, +! +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 10, 10, 10, 10, 12, 12, 14, 20}, + {-15,-15,-15,-15,-15,-10,-10, -5, 0, 0, 4, 5, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +! {{{-15,-15,-15,-15,-15,-10,-10, -5, 4, 4, 4, 4, 5, 5, 6, 8, 15}, + {-15,-15,-15,-15,-15,-15,-15,-10, -5, -5, -5, 0, 0, 0, 0, 4, 10}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10,-10,-10,-10,-10,-10,-10,-10,-10}}}, + +*************** +*** 93,101 **** + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +! static noise3 _psy_noisebias_16[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, + {-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +--- 73,85 ---- + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24,-20,-20,-20}}}, + }; + +! static noise3 _psy_noisebias_16[5]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, ++ {-10,-10,-10,-10,-10, -5, -2, -2, 2, 2, 2, 4, 5, 6, 8, 8, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, ++ ++ {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 6, 8, 8, 10, 10, 10, 14, 20}, + {-10,-10,-10,-10,-10, -5, -2, -2, 0, 0, 0, 4, 5, 6, 8, 8, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -6, -6}}}, + +*************** +*** 119,136 **** + {20,20,-1}, + }; + +! static double _noise_thresh_16[4]={ .3,.5,.5,.5 }; +! +! static int _noise_start_16[3]={ 256,256,9999 }; +! static int _noise_part_16[4]={ 8,8,8,8 }; + +! static int _psy_ath_floater_16[4]={ +! -100,-100,-100,-105, + }; + +! static int _psy_ath_abs_16[4]={ +! -130,-130,-130,-140, + }; + + + +--- 103,157 ---- + {20,20,-1}, + }; + +! /* ath ****************/ +! static int _psy_ath_floater_16[5]={ +! -100,-100,-100,-100,-105, +! }; +! static int _psy_ath_abs_16[5]={ +! -130,-130,-130,-130,-140, +! }; + +! /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_16[5]={ +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ +! {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4}, +! { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, +! { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + }; + +! /* tone master attenuation by base quality mode and bitrate tweak */ +! static att3 _psy_tone_masteratt_16[5]={ +! {{ 30, 28, 12}, 0, 0}, /* -2 */ +! {{ 30, 28, 12}, 0, 0}, /* -1 */ +! {{ 25, 23, 12}, 0, 0}, /* 0.5 */ +! {{ 20, 12, 0}, 0, 0}, /* 5 */ +! {{ 15, 0, -14}, 0, 0}, /* 10 */ + }; + ++ /* lowpass by mode **************/ ++ static double _psy_lowpass_16[5]={6.,6.5,8,30.,99.}; ++ ++ /* noise normalization **********/ ++ static int _noise_start_16[4]={ 256,256,256,9999 }; ++ ++ static int _noise_part_16[4]={ 8,8,8,8 }; + ++ static double _noise_thresh_16[4]={ .3,.3,.5,.5 }; + +diff -crN libvorbis-1.2.0/lib/modes/psych_44.h aotuv-b5.5_20080330/lib/modes/psych_44.h +*** libvorbis-1.2.0/lib/modes/psych_44.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/psych_44.h Sun Mar 30 14:43:38 2008 +*************** +*** 18,27 **** + + /* preecho trigger settings *****************************************/ + +! static vorbis_info_psy_global _psy_global_44[5]={ +! + {8, /* lines per eighth octave */ +! {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, + {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} +--- 18,43 ---- + + /* preecho trigger settings *****************************************/ + +! static vorbis_info_psy_global _psy_global_44[6]={ +! /* +! { lines per eighth octave, +! { pre-echo thresh.}, +! { post-echo thresh.}, stretch penalty, pre-echo minimum energy, +! ampmax att 1/sec, +! {coupling point(kHz)},{{coupling point limit0},{coupling point limit1}}, +! {coupling pre-point amp},{coupling post-point amp},{{sliding lowpass0},{sliding lowpass1}} +! }, +! */ +! /* q-2 */ +! {8, /* lines per eighth octave */ +! {24.f,16.f,16.f,16.f,16.f,16.f,14.f}, +! {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, +! -6.f, +! {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} +! }, + {8, /* lines per eighth octave */ +! // {20.f,14.f,12.f,12.f,12.f,12.f,12.f}, +! {20.f,14.f,14.f,14.f,14.f,14.f,14.f}, + {-60.f,-30.f,-40.f,-40.f,-40.f,-40.f,-40.f}, 2,-75.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} +*************** +*** 39,52 **** + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +! {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, + {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +! {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, +! {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, +--- 55,71 ---- + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +! // {10.f,8.f,8.f,8.f,8.f,8.f,8.f}, +! {8.f,8.f,8.f,6.f,6.f,6.f,7.f}, + {-20.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-80.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, + {8, /* lines per eighth octave */ +! // {10.f,6.f,6.f,6.f,6.f,6.f,6.f}, +! {6.f,6.f,6.f,6.f,6.f,6.f,6.f}, +! // {-15.f,-15.f,-12.f,-12.f,-12.f,-12.f,-12.f}, 0,-85.f, +! {-15.f,-14.f,-10.f,-10.f,-10.f,-11.f,-12.f}, 0,-85.f, + -6.f, + {99.},{{99.},{99.}},{0},{0},{{0.},{0.}} + }, +*************** +*** 56,81 **** + static compandblock _psy_compand_44[6]={ + /* sub-mode Z short */ + {{ +! 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 8, 9,10,11,12,13,14, 15, /* 15dB */ +! 16,17,18,19,20,21,22, 23, /* 23dB */ +! 24,25,26,27,28,29,30, 31, /* 31dB */ +! 32,33,34,35,36,37,38, 39, /* 39dB */ + }}, + /* mode_Z nominal short */ + {{ + 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +! 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ + 7, 8, 9,10,11,12,13, 14, /* 23dB */ + 15,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode A short */ + {{ + 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ +! 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ +! 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ +! 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }}, + /* sub-mode Z long */ +--- 75,115 ---- + static compandblock _psy_compand_44[6]={ + /* sub-mode Z short */ + {{ +! // 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! // 8, 9,10,11,12,13,14, 15, /* 15dB */ +! // 16,17,18,19,20,21,22, 23, /* 23dB */ +! // 24,25,26,27,28,29,30, 31, /* 31dB */ +! // 32,33,34,35,36,37,38, 39, /* 39dB */ +! 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +! 7, 7, 7, 8, 9, 9,10, 10, /* 15dB */ +! 11,12,13,14,15,15,15, 15, /* 23dB */ +! 16,16,17,17,17,18,18, 19, /* 31dB */ +! 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode_Z nominal short */ + {{ ++ // 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ ++ // 7, 7, 7, 7, 6, 6, 6, 7, /* 15dB */ ++ // 7, 8, 9,10,11,12,13, 14, /* 23dB */ ++ // 15,16,17,17,17,18,18, 19, /* 31dB */ ++ // 19,19,20,21,22,23,24, 25, /* 39dB */ + 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +! 7, 7, 7, 7, 7, 7, 7, 7, /* 15dB */ + 7, 8, 9,10,11,12,13, 14, /* 23dB */ + 15,16,17,17,17,18,18, 19, /* 31dB */ + 19,19,20,21,22,23,24, 25, /* 39dB */ + }}, + /* mode A short */ + {{ ++ // 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ ++ // 6, 6, 6, 5, 4, 4, 4, 4, /* 15dB */ ++ // 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ ++ // 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++ // 11,12,13,14,15,16,17, 18, /* 39dB */ + 0, 1, 2, 3, 4, 5, 5, 5, /* 7dB */ +! 6, 6, 6, 6, 6, 6, 6, 6, /* 15dB */ +! 6, 6, 6, 6, 6, 7, 7, 7, /* 23dB */ +! 8, 8, 8, 9, 9, 9,10, 11, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }}, + /* sub-mode Z long */ +*************** +*** 96,267 **** + }}, + /* mode A long */ + {{ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ +! 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ +! 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }} + }; + + /* tonal masking curve level adjustments *************************/ +! +! static vp_adjblock _vp_tonemask_adj_longblock[12]={ +! + /* 63 125 250 500 1 2 4 8 16 */ +! +! {{ -3, -8,-13,-15,-10,-10,-10,-10,-10,-10,-10, 0, 0, 0, 0, 0, 0}}, /* -1 */ +! +! /* {{-15,-15,-15,-15,-10, -8, -4, -2, 0, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ +! {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1, 0}}, /* 0 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ +! {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, -1, -1, 0}}, /* 1 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ +! {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -6, -3, -1, -1, -1, 0}}, /* 2 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ +! {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, -1, -1, 0}}, /* 3 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, *//* 4 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ +! +! /* {{-15,-15,-15,-15,-15,-12,-10, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ + }; +! +! static vp_adjblock _vp_tonemask_adj_otherblock[12]={ + /* 63 125 250 500 1 2 4 8 16 */ +! +! {{ -3, -8,-13,-15,-10,-10, -9, -9, -9, -9, -9, 1, 1, 1, 1, 1, 1}}, /* -1 */ +! +! /* {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0, 10, 0, 0, 0, 0, 0}}, 0 */ +! {{ -4,-10,-14,-16,-14,-13,-12,-12,-11,-11,-10, 0, 0, 0, 0, 0, 0}}, /* 0 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 5, 0, 0, 0, 0, 0}}, 1 */ +! {{ -6,-12,-14,-16,-15,-15,-14,-13,-13,-12,-12, -2, -2, -1, 0, 0, 0}}, /* 1 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 2 */ +! {{-12,-13,-14,-16,-16,-16,-15,-14,-13,-12,-12, -5, -2, -1, 0, 0, 0}}, /* 2 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 3 */ +! {{-15,-15,-15,-16,-16,-16,-16,-14,-13,-13,-13,-10, -4, -2, 0, 0, 0}}, /* 3 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 4 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 4 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 5 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-13,-11, -7 -3, -1, -1 , 0}}, /* 5 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 6 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -8, -4, -2, -2, 0}}, /* 6 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 7 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 7 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 8 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 8 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 9 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 9 */ +! +! /* {{-20,-20,-20,-20,-20,-18,-16,-14,-10, 0, 0, 0, 0, 0, 0, 0, 0}}, 10 */ +! {{-16,-16,-16,-16,-16,-16,-16,-15,-14,-14,-14,-12, -9, -4, -2, -2, 0}}, /* 10 */ + }; + + /* noise bias (transition block) */ +! static noise3 _psy_noisebias_trans[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +! /* 0 +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +! {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 3, 6}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, +! /* 1 +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, +! /* 2 +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, +! /* 3 +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +! /* 4 +! {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +! /* 5 +! {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, +! /* 6 +! {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, + {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, +! {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, +! /* 7 +! {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-32,-32,-32,-32,-28,-24,-24,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, +! {-34,-34,-34,-34,-30,-26,-26,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, +! /* 8 +! {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, + {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, + {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ +! {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, +! {-36,-36,-36,-36,-30,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10, -7}, +! {-36,-36,-36,-36,-34,-30,-28,-26,-24,-30,-30,-30,-30,-30,-30,-24,-20}}}, +! /* 9 +! {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! {-38,-38,-38,-38,-36,-34,-34,-30,-24,-20,-20,-20,-20,-18,-16,-12,-10}, +! {-40,-40,-40,-40,-40,-40,-40,-38,-35,-35,-35,-35,-35,-35,-35,-35,-30}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, +--- 130,268 ---- + }}, + /* mode A long */ + {{ ++ // 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ ++ // 8, 8, 7, 6, 5, 4, 4, 4, /* 15dB */ ++ // 4, 4, 5, 5, 5, 6, 6, 6, /* 23dB */ ++ // 7, 7, 7, 8, 8, 8, 9, 10, /* 31dB */ ++ // 11,12,13,14,15,16,17, 18, /* 39dB */ + 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 7, 7, 7, 6, 6, 6, 6, 6, /* 15dB */ +! 6, 6, 6, 6, 6, 7, 7, 7, /* 23dB */ +! 8, 8, 8, 9, 9, 9,10, 11, /* 31dB */ + 11,12,13,14,15,16,17, 18, /* 39dB */ + }} + }; + + /* tonal masking curve level adjustments *************************/ +! static vp_adjblock _vp_tonemask_adj_longblock[13]={ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-16,-16,-16,-15,-15,-15,-15,-15,-14,-13,-12,-11,-11, -4, 0, 0, 5}}, /* -2(addition) */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-14,-13, -7, -2, -2, 3}}, /* -1 */ +! +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-14,-13, -8, -3, -3, 1}}, /* 0 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-10, -3, -3, 0}}, /* 1 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-11, -5, -5, 0}}, /* 2 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-12, -7, -6, 0}}, /* 3 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -8, -9, 0}}, /* 4 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -8, -9, 0}}, /* 5 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 6 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 7 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 8 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 9 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12,-10,-10, 0}}, /* 10 */ + }; +! static vp_adjblock _vp_tonemask_adj_otherblock[13]={ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-16,-16,-16,-15,-15,-15,-15,-15,-14,-13,-12,-11,-11, -4, 0, 0, 5}}, /* -2(addition) */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-14,-13, -7, -2, -2, 3}}, /* -1 */ +! +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-14,-13, -8, -3, -3, 1}}, /* 0 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-10, -3, -3, 0}}, /* 1 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-11, -5, -5, 0}}, /* 2 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-15,-15,-14,-12, -7, -6, 0}}, /* 3 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -8, -9, 0}}, /* 4 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -8, -9, 0}}, /* 5 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 6 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 7 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 8 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12, -9,-10, 0}}, /* 9 */ +! {{-16,-16,-16,-16,-16,-16,-16,-16,-15,-15,-14,-14,-14,-12,-10,-10, 0}}, /* 10 */ + }; + + /* noise bias (transition block) */ +! static noise3 _psy_noisebias_trans[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-28,-28,-26,-26,-22,-18,-16,-10, -2, 2, 2, 2, 3, 5, 6, 7, 14}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, ++ /* -1 */ ++ /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-12, -4, 0, 0, 0, 1, 3, 4, 5, 12}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +! /* 0 */ +! /*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14, -8, -4, 0, 0, 0, 0, 2, 4, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +! {{{-15,-15,-15,-15,-15,-12, -6, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 1, 1, 2, 3, 8}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4, -2}}}, +! /* 1 */ +! /*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, -1, 1, 4}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, +! /* 2 */ +! /*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, */ +! {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -7, -4}}}, +! /* 3 */ +! /*{{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-12,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +! /* 4 */ +! /*{{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, +! /* 5 */ +! /*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, */ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-34,-34,-34,-34,-30,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}}, +! /* 6 */ +! /*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, + {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -6, -6, -6, -6, -4, -2, 0}, +! {-34,-34,-34,-34,-30,-26,-24,-18,-17,-15,-15,-15,-15,-13,-13,-12, -8}}}, +! /* 7 */ +! /*{{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, + {-32,-32,-32,-32,-28,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}},*/ + {{{-24,-24,-24,-24,-20,-18,-14, -8, -1, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-14,-12,-10, -8, -8, -8, -6, -4, 0}, +! {-34,-34,-34,-34,-30,-26,-26,-24,-22,-19,-19,-19,-19,-18,-17,-16,-12}}}, +! /* 8 */ +! /*{{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, + {-36,-36,-36,-36,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, + {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ +! {{{-24,-24,-24,-24,-22,-20,-15,-10, -8, -2, 0, 0, 0, 1, 2, 3, 7}, +! {-34,-34,-34,-34,-30,-30,-30,-24,-18,-14,-12,-10,-10,-10, -8, -6, -2}, +! {-36,-36,-36,-36,-34,-30,-28,-26,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, +! /* 9 */ +! /*{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, + {-36,-36,-36,-36,-34,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! {-36,-36,-36,-36,-32,-32,-32,-28,-20,-16,-16,-16,-16,-14,-12,-10, -7}, +! {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-14,-14,-14,-14,-14,-14,-12,-10}, + {-40,-40,-40,-40,-40,-40,-40,-40,-35,-30,-30,-30,-30,-30,-30,-30,-20}, +*************** +*** 269,333 **** + }; + + /* noise bias (long block) */ +! static noise3 _psy_noisebias_long[12]={ +! /*63 125 250 500 1k 2k 4k 8k 16k*/ + /* -1 */ +! {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, +! {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, +- + /* 0 */ +! /* {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +! {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 3, 6}, + {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 1 */ +! /* {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +! {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 1, 4}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, + /* 2 */ +! /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ +! {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -2, -1, 0, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 3 */ +! /* {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 2}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, + /* 4 */ +! /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, -1, 1}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, + /* 5 */ +! /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}}, + /* 6 */ +! /* {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, +! {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2, 0}, +! {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}}, + /* 7 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, + {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + /* 8 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, +--- 270,343 ---- + }; + + /* noise bias (long block) */ +! static noise3 _psy_noisebias_long[13]={ +! /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -2(addition mode) */ +! {{{-10,-10,-10,-10,-10, -4, 0, 0, 2, 6, 6, 6, 6, 10, 10, 12, 20}, +! {-20,-20,-20,-20,-20,-18,-12, -6, 0, 2, 2, 2, 3, 5, 6, 7, 14}, +! {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* -1 */ +! /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, +! {-20,-20,-20,-20,-20,-20,-10, -2, 0, 0, 0, 0, 0, 2, 4, 6, 15}, +! {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +! {{{-10,-10,-10,-10,-10, -4, 0, 0, 0, 6, 6, 6, 6, 10, 10, 12, 20}, +! {-20,-20,-20,-20,-20,-18,-12, -8, -2, 0, 0, 0, 1, 3, 4, 5, 12}, + {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 0 */ +! /*{{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 0, 0, 2, 4, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}},*/ +! {{{-10,-10,-10,-10,-10,-10, -8, 2, 2, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14, -6, 0, 0, 0, 1, 1, 2, 3, 8}, + {-20,-20,-20,-20,-20,-20,-20,-14, -8, -6, -6, -6, -6, -4, -4, -4, -2}}}, + /* 1 */ +! /*{{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},*/ +! {{{-10,-10,-10,-10,-10,-10, -8, -4, 0, 2, 4, 4, 5, 5, 5, 8, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, -1, 1, 4}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}}, + /* 2 */ +! /*{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -2, -2, -2, -2, 0, 2, 6}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ +! {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 5, 6, 10}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -2, -2, -1, 1, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}}, + /* 3 */ +! /*{{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 6}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-10,-10,-10,-10,-10,-10,-10, -8, 0, 2, 2, 2, 4, 4, 4, 5, 8}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 3}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -5}}}, + /* 4 */ +! /*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -1, 1, 5}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -4}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-20,-20,-20,-20,-20,-20,-20,-14,-10, -4, -3, -3, -3, -3, -2, 0, 1}, + {-20,-20,-20,-20,-20,-20,-20,-14,-10,-10,-10,-10,-10, -8, -8, -8, -7}}}, + /* 5 */ +! /*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -2, -1, 2}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, + {-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1, 0}, + {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}}, + /* 6 */ +! /*{{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 1}, +! {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2, 0}, +! {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}}, + /* 7 */ ++ // {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, ++ // {-24,-24,-24,-24,-24,-24,-24,-18,-14,-10, -8, -8, -8, -8, -6, -4, 0}, ++ // {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 1, 1, 1, 2, 3, 3, 4, 7}, +! {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-10, -8, -8, -8, -6, -4, 0}, + {-26,-26,-26,-26,-26,-26,-26,-22,-20,-19,-19,-19,-19,-18,-17,-16,-12}}}, + /* 8 */ + {{{-15,-15,-15,-15,-15,-15,-15,-10, -4, 0, 0, 0, 0, 1, 2, 3, 7}, +*************** +*** 344,410 **** + }; + + /* noise bias (impulse block) */ +! static noise3 _psy_noisebias_impulse[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +- + /* 0 */ +! /* {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, +! {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 3, 6}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 1 */ +! {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}}, + /* 2 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 4 */ + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 5 */ +! {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, +! {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, +! /* 6 + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, +! {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-30,-24,-16,-16,-16,-16,-16,-16,-14,-14,-12}, +! {-36,-36,-36,-36,-36,-34,-28,-24,-20,-20,-20,-20,-20,-20,-20,-18,-16}}}, + /* 7 */ +! /* {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, +! {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-24,-22}, +! {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, + /* 8 */ +- /* {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, +- {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, +- {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}},*/ + {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, +! {-34,-34,-34,-34,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-24}, +! {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-30,-24}}}, + /* 9 */ +! /* {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, +! {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}},*/ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, +--- 354,438 ---- + }; + + /* noise bias (impulse block) */ +! static noise3 _psy_noisebias_impulse[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-28,-28,-26,-26,-22,-18,-16,-10, -2, 2, 2, 2, 3, 5, 6, 7, 14}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, ++ /* -1 */ ++ /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-12, -4, 0, 0, 0, 1, 2, 4, 5, 12}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 0 */ +! /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -6, -2, 0, 0, 0, 0, 2, 4, 10}, +! {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 4, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 1, 1, 2, 3, 8}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, + /* 1 */ +! /*{{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -2, -2, 2}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}},*/ ++ {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -4, -4, -2, -2, -1, 1, 4}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8,-10,-10, -8, -8, -8, -6, -4}}}, + /* 2 */ ++ // {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, 0, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 3 */ ++ // {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, 0, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 4 */ ++ // {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -4, -2, 0}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -4, -4, -3, 0, 1}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10,-10,-10,-10,-10,-10,-10, -8, -4}}}, + /* 5 */ +! /*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, + {-32,-32,-32,-32,-28,-24,-22,-16,-10, -6, -8, -8, -6, -6, -6, -4, -2}, +! {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-32,-32,-32,-32,-28,-24,-22,-16,-12, -8, -8, -8, -6, -6, -5, -4, -2}, +! {-34,-34,-34,-34,-30,-26,-24,-18,-14,-12,-12,-12,-12,-12,-10, -9, -5}}}, +! /* 6 */ +! /*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-12,-12,-14,-14,-10, -9, -8, -6, -4}, +! {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}},*/ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-14,-14,-10, -9, -8, -6, -4}, +! {-34,-34,-34,-34,-34,-30,-26,-20,-16,-15,-15,-15,-15,-15,-13,-12, -8}}}, + /* 7 */ +! /*{{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-14,-14,-16,-16,-14,-12,-10,-10,-10}, +! {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}},*/ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -6, 0, 0, 0, 0, 4, 4, 6, 11}, +! {-34,-34,-34,-34,-30,-30,-24,-20,-16,-16,-16,-16,-14,-12,-10,-10, -8}, +! {-34,-34,-34,-34,-32,-32,-30,-24,-20,-19,-19,-19,-19,-19,-17,-16,-12}}}, + /* 8 */ + {{{-24,-24,-24,-24,-24,-22,-14,-10, -6, -1, -1, -1, -1, 3, 3, 5, 10}, +! {-34,-34,-34,-34,-30,-30,-30,-24,-20,-20,-20,-20,-20,-18,-16,-16,-14}, +! {-36,-36,-36,-36,-36,-34,-28,-24,-24,-24,-24,-24,-24,-24,-24,-20,-16}}}, + /* 9 */ +! // {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! // {-36,-36,-36,-36,-34,-32,-32,-30,-26,-26,-26,-26,-26,-22,-20,-20,-18}, +! // {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2, 2}, +! {-36,-36,-36,-36,-32,-32,-32,-28,-24,-24,-24,-24,-24,-22,-20,-20,-18}, + {-40,-40,-40,-40,-40,-40,-40,-32,-30,-30,-30,-30,-30,-30,-30,-24,-20}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-16,-16,-16,-16,-16,-14,-12}, +*************** +*** 413,448 **** + }; + + /* noise bias (padding block) */ +! static noise3 _psy_noisebias_padding[12]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! +! /* -1 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +! +! /* 0 */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, + /* 1 */ + {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, + /* 2 */ +! /* {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 4 */ + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 5 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, +--- 441,490 ---- + }; + + /* noise bias (padding block) */ +! static noise3 _psy_noisebias_padding[13]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ +! /* -2(addition mode) */ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, +! {-28,-28,-26,-26,-22,-18,-16,-10, -2, 2, 2, 2, 4, 6, 7, 8, 14}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}}, +! /* -1 */ +! /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-20,-16, -8, -6, -6, -2, 2, 2, 3, 6, 6, 15}, +! {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},*/ + {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-28,-28,-24,-20,-18,-12, -4, 0, 0, 1, 2, 4, 5, 6, 12}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, ++ /* 0 */ ++ /*{{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, 2, 3, 6, 6, 8, 10}, ++ {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}},*/ ++ {{{-10,-10,-10,-10,-10, -4, 0, 0, 4, 8, 8, 8, 8, 10, 12, 14, 20}, ++ {-30,-30,-30,-30,-26,-22,-20,-14, -6, 0, 0, 0, 1, 2, 3, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -4, -4, -4, -4, -2, 0, 2}}}, + /* 1 */ ++ // {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, + {{{-12,-12,-12,-12,-12, -8, -6, -4, 0, 4, 4, 4, 4, 10, 12, 14, 20}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 1, 1, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2, 0}}}, + /* 2 */ +! // {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 2, 2, 4, 8}, +! // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 8, 10, 10, 16}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, 0, 0, 0, 0, 2, 4, 8}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 3 */ + {{{-14,-14,-14,-14,-14,-10, -8, -6, -2, 2, 2, 2, 2, 6, 8, 8, 14}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, 0, 0, 2, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 4 */ ++ // {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 2, 6}, ++ // {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + {{{-16,-16,-16,-16,-16,-12,-10, -6, -2, 0, 0, 0, 0, 4, 6, 6, 12}, +! {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1, -1, 0, 0, 6}, + {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}}, + /* 5 */ + {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, +*************** +*** 453,468 **** + {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4}, + {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}}, + /* 7 */ +! {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1}, + {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}}, + /* 8 */ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2}, + {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}}, + /* 9 */ + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, +! {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, + {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8}, +--- 495,516 ---- + {-34,-34,-34,-34,-30,-30,-24,-20,-14, -8, -4, -4, -4, -4, -3, -1, 4}, + {-34,-34,-34,-34,-34,-30,-26,-20,-16,-13,-13,-13,-13,-13,-11, -8, -6}}}, + /* 7 */ +! /*{{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-10, -8, -6, -6, -6, -5, -3, 1}, ++ {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}},*/ ++ {{{-20,-20,-20,-20,-20,-18,-14,-10, -4, 0, 0, 0, 0, 4, 6, 6, 12}, ++ {-34,-34,-34,-34,-30,-30,-24,-20,-14,-10, -8, -6, -6, -6, -5, -3, 1}, + {-34,-34,-34,-34,-32,-32,-28,-22,-18,-16,-16,-16,-16,-16,-14,-12,-10}}}, + /* 8 */ + {{{-22,-22,-22,-22,-22,-20,-14,-10, -4, 0, 0, 0, 0, 3, 5, 5, 11}, + {-34,-34,-34,-34,-30,-30,-30,-24,-16,-12,-10, -8, -8, -8, -7, -5, -2}, + {-36,-36,-36,-36,-36,-34,-28,-22,-20,-20,-20,-20,-20,-20,-20,-16,-14}}}, + /* 9 */ ++ // {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, ++ // {-36,-36,-36,-36,-34,-32,-32,-24,-16,-12,-12,-12,-12,-12,-10, -8, -5}, ++ // {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + {{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -2, -2, -2, -2, 0, 2, 6}, +! {-36,-36,-36,-36,-32,-32,-32,-26,-18,-14,-12,-12,-12,-12,-10, -8, -5}, + {-40,-40,-40,-40,-40,-40,-40,-32,-26,-24,-24,-24,-24,-24,-24,-20,-18}}}, + /* 10 */ + {{{-30,-30,-30,-30,-30,-26,-24,-24,-24,-20,-12,-12,-12,-12,-12,-10, -8}, +*************** +*** 478,492 **** + {10,10,100}, + }; + +! static int _psy_tone_suppress[12]={ +! -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, + }; +- static int _psy_tone_0dB[12]={ +- 90,90,95,95,95,95,105,105,105,105,105,105, +- }; +- static int _psy_noise_suppress[12]={ +- -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, +- }; + + static vorbis_info_psy _psy_info_template={ + /* blockflag */ +--- 526,543 ---- + {10,10,100}, + }; + +! static int _psy_tone_suppress[13]={ +! /* -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45, */ +! -20,-20,-20,-20,-20,-20,-24,-30,-40,-40,-42,-45,-45, +! }; +! static int _psy_tone_0dB[13]={ +! /* 90,90,95,95,95,95,105,105,105,105,105,105, */ +! 90,90,90,95,95,95,95,105,105,105,105,105,105, +! }; +! static int _psy_noise_suppress[13]={ +! /* -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45, */ +! -20,-20,-20,-24,-24,-24,-24,-30,-40,-40,-42,-45,-45, + }; + + static vorbis_info_psy _psy_info_template={ + /* blockflag */ +*************** +*** 506,516 **** + + /* ath ****************/ + +! static int _psy_ath_floater[12]={ +! -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, +! }; +! static int _psy_ath_abs[12]={ +! -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, + }; + + /* stereo setup. These don't map directly to quality level, there's +--- 557,569 ---- + + /* ath ****************/ + +! static int _psy_ath_floater[13]={ +! /* -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, */ +! -100,-100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120, +! }; +! static int _psy_ath_abs[13]={ +! /* -130,-130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150, */ +! -130,-130,-130,-130,-130,-135,-140,-140,-140,-140,-140,-140,-150, + }; + + /* stereo setup. These don't map directly to quality level, there's +*************** +*** 522,535 **** + /* various stereo possibilities */ + + /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_44[12]={ +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ +! {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +! +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ + /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8}, +--- 575,596 ---- + /* various stereo possibilities */ + + /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_44[13]={ +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -2(addition mode) */ +! {{ 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 5, 4, 3}, +! { 1, 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 6, 7, 8, 8}, +! { 10,10.5, 11,11.5, 12,12.5, 13, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -1 */ +! /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, ++ { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 5, 4, 3}, ++ { 1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */ + /*{{ 4, 4, 4, 4, 4, 4, 4, 3, 2, 2, 1, 0, 0, 0, 0}, + { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 4, 3}, + { 1, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8}, +*************** +*** 538,613 **** + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +! +! +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ +! {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! +! +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ +! /* {{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, +! { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, + { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ + {{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ + {{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0}, + { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ +! /* {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, +! { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ +! {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, + { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ +! /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ +! /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ +! /* {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +--- 599,674 ---- + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 12,12.5, 13,13.5, 14,14.5, 15, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 */ +! /*{{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, + { 8, 8, 8, 8, 6, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3}, + { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, 0, 0, 0, 0}, ++ { 8, 8, 8, 8, 6, 6, 5, 4, 4, 4, 4, 4, 4, 3, 3}, ++ { 1, 2, 3, 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 */ +! /*{{ 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 6, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1}, +! { 3, 4, 4, 4, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 0, 0, 0, 0, 0}, + { 8, 8, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 */ + {{ 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, + { 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1}, + { 4, 4, 5, 6, 6, 6, 6, 6, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 */ + {{ 2, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 2, 1, 0}, + { 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 */ +! /*{{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0}, ++ { 6, 6, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ ++ {{ 2, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ++ { 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 0, 0, 0, 0}, + { 6, 7, 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 */ +! /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 */ +! /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 3, 3, 3, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 */ +! /*{{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, +! { 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, +! { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}},*/ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 8, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +! /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 */ + {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, +*************** +*** 615,628 **** + }; + + /* tone master attenuation by base quality mode and bitrate tweak */ +! static att3 _psy_tone_masteratt_44[12]={ +! {{ 35, 21, 9}, 0, 0}, /* -1 */ +! {{ 30, 20, 8}, -2, 1.25}, /* 0 */ +! /* {{ 25, 14, 4}, 0, 0}, *//* 1 */ +! {{ 25, 12, 2}, 0, 0}, /* 1 */ +! /* {{ 20, 10, -2}, 0, 0}, *//* 2 */ +! {{ 20, 9, -3}, 0, 0}, /* 2 */ +! {{ 20, 9, -4}, 0, 0}, /* 3 */ + {{ 20, 9, -4}, 0, 0}, /* 4 */ + {{ 20, 6, -6}, 0, 0}, /* 5 */ + {{ 20, 3, -10}, 0, 0}, /* 6 */ +--- 676,691 ---- + }; + + /* tone master attenuation by base quality mode and bitrate tweak */ +! static att3 _psy_tone_masteratt_44[13]={ +! {{ 40, 32, 16}, 0, 0}, /* -2 */ +! // {{ 35, 21, 9}, 0, 0}, /* -1 */ +! {{ 36, 25, 10}, 0, 0}, /* -1 */ +! // {{ 30, 20, 8}, -2, 1.25}, /* 0 */ +! {{ 32, 20, 8}, 0, 0}, /* 0 */ +! {{ 25, 14, 4}, 0, 0}, /* 1 */ +! {{ 20, 10, -2}, 0, 0}, /* 2 */ +! // {{ 20, 9, -4}, 0, 0}, /* 3 */ +! {{ 20, 10, -3}, 0, 0}, /* 3 */ + {{ 20, 9, -4}, 0, 0}, /* 4 */ + {{ 20, 6, -6}, 0, 0}, /* 5 */ + {{ 20, 3, -10}, 0, 0}, /* 6 */ +*************** +*** 633,666 **** + }; + + /* lowpass by mode **************/ +! static double _psy_lowpass_44[12]={ + /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ +! 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. + }; + + /* noise normalization **********/ + +! static int _noise_start_short_44[11]={ + /* 16,16,16,16,32,32,9999,9999,9999,9999 */ +! 32,16,16,16,32,9999,9999,9999,9999,9999,9999 + }; +! static int _noise_start_long_44[11]={ + /* 128,128,128,256,512,512,9999,9999,9999,9999 */ +! 256,128,128,256,512,9999,9999,9999,9999,9999,9999 + }; + +! static int _noise_part_short_44[11]={ +! 8,8,8,8,8,8,8,8,8,8,8 + }; +! static int _noise_part_long_44[11]={ +! 32,32,32,32,32,32,32,32,32,32,32 + }; + +! static double _noise_thresh_44[11]={ + /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ +! .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., + }; + +! static double _noise_thresh_5only[2]={ +! .5,.5, + }; +--- 696,746 ---- + }; + + /* lowpass by mode **************/ +! static double _psy_lowpass_44[13]={ + /* 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999. */ +! // 13.9,15.1,15.8,16.5,17.2,18.9,20.1,48.,999.,999.,999.,999. +! 13.0,14.3,15.1,15.8,16.5,17.2,18.3,20.1,48.,999.,999.,999.,999. + }; + + /* noise normalization **********/ + +! static int _noise_start_short_44[12]={ + /* 16,16,16,16,32,32,9999,9999,9999,9999 */ +! // 32,16,16,16,32,9999,9999,9999,9999,9999,9999 +! 32,32,16,16,32,64,9999,9999,9999,9999,9999,9999 + }; +! static int _noise_start_long_44[12]={ + /* 128,128,128,256,512,512,9999,9999,9999,9999 */ +! // 256,128,128,256,512,9999,9999,9999,9999,9999,9999 +! 256,256,128,128,256,512,9999,9999,9999,9999,9999,9999 + }; + +! static int _noise_part_short_44[12]={ +! /* 8,8,8,8,8,8,8,8,8,8,8 */ +! 8,8,8,8,8,8,8,8,8,8,8,8 + }; +! static int _noise_part_long_44[12]={ +! /* 32,32,32,32,32,32,32,32,32,32,32 */ +! 32,32,32,32,32,32,32,32,32,32,32,32 + }; + +! static double _noise_thresh_44[12]={ + /* .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999., */ +! // .2,.2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999., +! .17,.2,.2,.2,.35,.6,9999.,9999.,9999.,9999.,9999.,9999., + }; + +! /* 0~8kHz */ +! static double _noise_thresh_5only[3]={ +! .5,.5,.5 +! }; +! +! /* 32kHz only */ +! static int _noise_start_short_32[12]={ +! // 40,40,20,20,40,80,9999,9999,9999,9999,9999,9999 +! 48,48,24,24,40,80,9999,9999,9999,9999,9999,9999 +! }; +! static int _noise_start_long_32[12]={ +! // 320,320,160,160,320,640,9999,9999,9999,9999,9999,9999 +! 320,320,160,160,320,640,9999,9999,9999,9999,9999,9999 + }; +diff -crN libvorbis-1.2.0/lib/modes/psych_8.h aotuv-b5.5_20080330/lib/modes/psych_8.h +*** libvorbis-1.2.0/lib/modes/psych_8.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/psych_8.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,37 **** + + ********************************************************************/ + +! static att3 _psy_tone_masteratt_8[3]={ +! {{ 32, 25, 12}, 0, 0}, /* 0 */ +! {{ 30, 25, 12}, 0, 0}, /* 0 */ +! {{ 20, 0, -14}, 0, 0}, /* 0 */ + }; + +! static vp_adjblock _vp_tonemask_adj_8[3]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ +! {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0,10, 0, 0,99,99,99}}, /* 1 */ +! {{-15,-15,-15,-15,-10,-10, -6, 0, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 1 */ + }; + +! +! static noise3 _psy_noisebias_8[3]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, + {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +--- 15,62 ---- + + ********************************************************************/ + +! /* noise compander lookups */ +! static compandblock _psy_compand_8[3]={ +! {{ +! 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 8, 8, 9, 9,10,10,11, 11, /* 15dB */ +! 12,12,13,13,14,14,15, 16, /* 23dB */ +! 17,18,19,20,21,22,23, 24, /* 31dB */ +! 25,26,27,28,29,30,31, 32, /* 39dB */ +! }}, +! {{ +! 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 8, 8, 9, 9,10,10,11, 11, /* 15dB */ +! 12,12,13,13,14,14,15, 15, /* 23dB */ +! 16,16,17,17,17,18,18, 19, /* 31dB */ +! 19,19,20,21,22,23,24, 25, /* 39dB */ +! }}, +! {{ +! 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +! 7, 7, 6, 6, 5, 5, 4, 4, /* 15dB */ +! 3, 3, 3, 4, 5, 6, 7, 8, /* 23dB */ +! 9,10,11,12,13,14,15, 16, /* 31dB */ +! 17,18,19,20,21,22,23, 24, /* 39dB */ +! }}, + }; + +! /* tonal masking curve level adjustments *************************/ +! static vp_adjblock _vp_tonemask_adj_8[4]={ + /* adjust for mode zero */ + /* 63 125 250 500 1 2 4 8 16 */ +! {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 3, 3,99,99,99}}, /* -2 */ +! {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* -1 */ +! {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 0 */ +! {{-15,-15,-15,-15,-10,-10, -6,-2, 0, 0, 0, 0, 0, 0,99,99,99}}, /* 10 */ + }; + +! /* noise bias */ +! static noise3 _psy_noisebias_8[4]={ + /* 63 125 250 500 1k 2k 4k 8k 16k*/ ++ {{{-10,-10,-10,-10, -5, -5, -5, 3, 4, 8, 8, 8, 10, 10, 99, 99, 99}, ++ {-10,-10,-10,-10, -5, -2, -2, 3, 3, 4, 4, 5, 6, 8, 99, 99, 99}, ++ {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, ++ + {{{-10,-10,-10,-10, -5, -5, -5, 0, 4, 8, 8, 8, 10, 10, 99, 99, 99}, + {-10,-10,-10,-10, -5, -5, -5, 0, 0, 4, 4, 4, 4, 4, 99, 99, 99}, + {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, 99, 99, 99}}}, +*************** +*** 45,54 **** + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, + }; + + /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_8[3]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +--- 70,98 ---- + {-30,-30,-30,-30,-26,-26,-26,-26,-26,-26,-26,-26,-26,-24, 99, 99, 99}}}, + }; + ++ static noiseguard _psy_noiseguards_8[3]={ ++ {10,10,-1}, ++ {10,10,-1}, ++ {10,10,-1}, ++ }; ++ ++ ++ /* ath ****************/ ++ static int _psy_ath_floater_8[4]={ ++ -100,-100,-100,-105, ++ }; ++ static int _psy_ath_abs_8[4]={ ++ -130,-130,-130,-140, ++ }; ++ + /* stereo mode by base quality level */ +! static adj_stereo _psy_stereo_modes_8[4]={ + /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 */ + {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, ++ { 6, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4}, ++ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, ++ { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, ++ {{ 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3}, + { 6, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4}, + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, +*************** +*** 62,102 **** + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + }; + +! static noiseguard _psy_noiseguards_8[2]={ +! {10,10,-1}, +! {10,10,-1}, +! }; +! +! static compandblock _psy_compand_8[2]={ +! {{ +! 0, 1, 2, 3, 4, 5, 6, 7, /* 7dB */ +! 8, 8, 9, 9,10,10,11, 11, /* 15dB */ +! 12,12,13,13,14,14,15, 15, /* 23dB */ +! 16,16,17,17,17,18,18, 19, /* 31dB */ +! 19,19,20,21,22,23,24, 25, /* 39dB */ +! }}, +! {{ +! 0, 1, 2, 3, 4, 5, 6, 6, /* 7dB */ +! 7, 7, 6, 6, 5, 5, 4, 4, /* 15dB */ +! 3, 3, 3, 4, 5, 6, 7, 8, /* 23dB */ +! 9,10,11,12,13,14,15, 16, /* 31dB */ +! 17,18,19,20,21,22,23, 24, /* 39dB */ +! }}, +! }; +! +! static double _psy_lowpass_8[3]={3.,4.,4.}; +! static int _noise_start_8[2]={ +! 64,64, +! }; +! static int _noise_part_8[2]={ +! 8,8, +! }; +! +! static int _psy_ath_floater_8[3]={ +! -100,-100,-105, + }; +! +! static int _psy_ath_abs_8[3]={ +! -130,-130,-140, + }; +- +--- 106,126 ---- + { 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99}}, + }; + +! /* tone master attenuation by base quality mode and bitrate tweak */ +! static att3 _psy_tone_masteratt_8[4]={ +! {{ 33, 28, 13}, 0, 0}, /* -2 */ +! {{ 32, 28, 12}, 0, 0}, /* -1 */ +! {{ 30, 26, 12}, 0, 0}, /* 0 */ +! {{ 20, 0, -14}, 0, 0}, /* 10 */ +! }; +! +! /* lowpass by mode **************/ +! static double _psy_lowpass_8[4]={2.6,3.,4.,4.}; +! +! /* noise normalization **********/ +! static int _noise_start_8[3]={ +! 64,64,64, + }; +! static int _noise_part_8[3]={ +! 8,8,8, + }; +diff -crN libvorbis-1.2.0/lib/modes/residue_16.h aotuv-b5.5_20080330/lib/modes/residue_16.h +*** libvorbis-1.2.0/lib/modes/residue_16.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/residue_16.h Sun Mar 30 14:43:38 2008 +*************** +*** 84,90 **** + &_resbook_16s_2,&_resbook_16s_2} + }; + +! static vorbis_mapping_template _mapres_template_16_stereo[3]={ + { _map_nominal, _res_16s_0 }, /* 0 */ + { _map_nominal, _res_16s_1 }, /* 1 */ + { _map_nominal, _res_16s_2 }, /* 2 */ +--- 84,91 ---- + &_resbook_16s_2,&_resbook_16s_2} + }; + +! static vorbis_mapping_template _mapres_template_16_stereo[4]={ +! { _map_nominal, _res_16s_0 }, /* -1 */ + { _map_nominal, _res_16s_0 }, /* 0 */ + { _map_nominal, _res_16s_1 }, /* 1 */ + { _map_nominal, _res_16s_2 }, /* 2 */ +*************** +*** 156,162 **** + }; + + +! static vorbis_mapping_template _mapres_template_16_uncoupled[3]={ + { _map_nominal_u, _res_16u_0 }, /* 0 */ + { _map_nominal_u, _res_16u_1 }, /* 1 */ + { _map_nominal_u, _res_16u_2 }, /* 2 */ +--- 157,164 ---- + }; + + +! static vorbis_mapping_template _mapres_template_16_uncoupled[4]={ +! { _map_nominal_u, _res_16u_0 }, /* -1 */ + { _map_nominal_u, _res_16u_0 }, /* 0 */ + { _map_nominal_u, _res_16u_1 }, /* 1 */ + { _map_nominal_u, _res_16u_2 }, /* 2 */ +diff -crN libvorbis-1.2.0/lib/modes/residue_44.h aotuv-b5.5_20080330/lib/modes/residue_44.h +*** libvorbis-1.2.0/lib/modes/residue_44.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/residue_44.h Sun Mar 30 14:43:38 2008 +*************** +*** 278,283 **** +--- 278,284 ---- + }; + + static vorbis_mapping_template _mapres_template_44_stereo[]={ ++ { _map_nominal, _res_44s_n1 }, /* -2 */ + { _map_nominal, _res_44s_n1 }, /* -1 */ + { _map_nominal, _res_44s_0 }, /* 0 */ + { _map_nominal, _res_44s_1 }, /* 1 */ +diff -crN libvorbis-1.2.0/lib/modes/residue_44u.h aotuv-b5.5_20080330/lib/modes/residue_44u.h +*** libvorbis-1.2.0/lib/modes/residue_44u.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/residue_44u.h Sun Mar 30 14:43:38 2008 +*************** +*** 304,309 **** +--- 304,310 ---- + }; + + static vorbis_mapping_template _mapres_template_44_uncoupled[]={ ++ { _map_nominal_u, _res_44u_n1 }, /* -2 */ + { _map_nominal_u, _res_44u_n1 }, /* -1 */ + { _map_nominal_u, _res_44u_0 }, /* 0 */ + { _map_nominal_u, _res_44u_1 }, /* 1 */ +diff -crN libvorbis-1.2.0/lib/modes/residue_8.h aotuv-b5.5_20080330/lib/modes/residue_8.h +*** libvorbis-1.2.0/lib/modes/residue_8.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/residue_8.h Sun Mar 30 14:43:38 2008 +*************** +*** 60,66 **** + &_resbook_8s_1,&_resbook_8s_1}, + }; + +! static vorbis_mapping_template _mapres_template_8_stereo[2]={ + { _map_nominal, _res_8s_0 }, /* 0 */ + { _map_nominal, _res_8s_1 }, /* 1 */ + }; +--- 60,67 ---- + &_resbook_8s_1,&_resbook_8s_1}, + }; + +! static vorbis_mapping_template _mapres_template_8_stereo[3]={ +! { _map_nominal, _res_8s_0 }, /* -1 */ + { _map_nominal, _res_8s_0 }, /* 0 */ + { _map_nominal, _res_8s_1 }, /* 1 */ + }; +*************** +*** 103,109 **** + &_resbook_8u_1,&_resbook_8u_1}, + }; + +! static vorbis_mapping_template _mapres_template_8_uncoupled[2]={ + { _map_nominal_u, _res_8u_0 }, /* 0 */ + { _map_nominal_u, _res_8u_1 }, /* 1 */ + }; +--- 104,111 ---- + &_resbook_8u_1,&_resbook_8u_1}, + }; + +! static vorbis_mapping_template _mapres_template_8_uncoupled[3]={ +! { _map_nominal_u, _res_8u_0 }, /* -1 */ + { _map_nominal_u, _res_8u_0 }, /* 0 */ + { _map_nominal_u, _res_8u_1 }, /* 1 */ + }; +diff -crN libvorbis-1.2.0/lib/modes/setup_11.h aotuv-b5.5_20080330/lib/modes/setup_11.h +*** libvorbis-1.2.0/lib/modes/setup_11.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_11.h Sun Mar 30 14:43:38 2008 +*************** +*** 17,44 **** + + #include "psych_11.h" + +! static int blocksize_11[2]={ +! 512,512 + }; + +! static int _floor_mapping_11[2]={ +! 6,6, + }; + +! static double rate_mapping_11[3]={ +! 8000.,13000.,44000., + }; + +! static double rate_mapping_11_uncoupled[3]={ +! 12000.,20000.,50000., + }; + +! static double quality_mapping_11[3]={ +! -.1,.0,1. + }; + + ve_setup_data_template ve_setup_11_stereo={ +! 2, + rate_mapping_11, + quality_mapping_11, + 2, +--- 17,47 ---- + + #include "psych_11.h" + +! static int blocksize_11[3]={ +! 512,512,512 + }; + +! static int _floor_mapping_11[3]={ +! 6,6,6 + }; + +! static double rate_mapping_11[4]={ +! // 8000.,13000.,44000., +! 8000.,10000.,13000.,44000., + }; + +! static double rate_mapping_11_uncoupled[4]={ +! // 12000.,20000.,50000., +! 14000.,16000.,20000.,50000., + }; + +! static double quality_mapping_11[4]={ +! -.2,-.1,.0,1. + }; + + ve_setup_data_template ve_setup_11_stereo={ +! // 2, +! 3, + rate_mapping_11, + quality_mapping_11, + 2, +*************** +*** 89,95 **** + }; + + ve_setup_data_template ve_setup_11_uncoupled={ +! 2, + rate_mapping_11_uncoupled, + quality_mapping_11, + -1, +--- 92,99 ---- + }; + + ve_setup_data_template ve_setup_11_uncoupled={ +! // 2, +! 3, + rate_mapping_11_uncoupled, + quality_mapping_11, + -1, +diff -crN libvorbis-1.2.0/lib/modes/setup_16.h aotuv-b5.5_20080330/lib/modes/setup_16.h +*** libvorbis-1.2.0/lib/modes/setup_16.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_16.h Sun Mar 30 14:43:38 2008 +*************** +*** 18,53 **** + #include "psych_16.h" + #include "residue_16.h" + +! static int blocksize_16_short[3]={ +! 1024,512,512 + }; +! static int blocksize_16_long[3]={ +! 1024,1024,1024 + }; + +! static int _floor_mapping_16_short[3]={ +! 9,3,3 + }; +! static int _floor_mapping_16[3]={ +! 9,9,9 + }; + +! static double rate_mapping_16[4]={ +! 12000.,20000.,44000.,86000. + }; + +! static double rate_mapping_16_uncoupled[4]={ +! 16000.,28000.,64000.,100000. + }; + +! static double _global_mapping_16[4]={ 1., 2., 3., 4. }; + +! static double quality_mapping_16[4]={ -.1,.05,.5,1. }; + +! static double _psy_compand_16_mapping[4]={ 0., .8, 1., 1.}; + + ve_setup_data_template ve_setup_16_stereo={ +! 3, + rate_mapping_16, + quality_mapping_16, + 2, +--- 18,57 ---- + #include "psych_16.h" + #include "residue_16.h" + +! static int blocksize_16_short[4]={ +! 1024,1024,512,512 + }; +! static int blocksize_16_long[4]={ +! 1024,1024,1024,1024 + }; + +! static int _floor_mapping_16_short[4]={ +! 9,9,3,3 + }; +! static int _floor_mapping_16[4]={ +! 9,9,9,9 + }; + +! static double rate_mapping_16[5]={ +! // 12000.,20000.,44000.,86000. +! 10000.,12000.,20000.,44000.,86000. + }; + +! static double rate_mapping_16_uncoupled[5]={ +! // 16000.,28000.,64000.,100000. +! 16000.,18000.,28000.,64000.,100000. + }; + +! static double _global_mapping_16[5]={ 2., 2., 3., 4., 5. }; + +! static double quality_mapping_16[5]={ -.2,-.1,.05,.5,1. }; + +! //static double _psy_compand_16_mapping[5]={ 0., 0., .8, 1., 1.}; +! static double _psy_compand_16_mapping[5]={ 0., 1., 1.8, 2., 2.}; + + ve_setup_data_template ve_setup_16_stereo={ +! // 3, +! 4, + rate_mapping_16, + quality_mapping_16, + 2, +*************** +*** 98,104 **** + }; + + ve_setup_data_template ve_setup_16_uncoupled={ +! 3, + rate_mapping_16_uncoupled, + quality_mapping_16, + -1, +--- 102,109 ---- + }; + + ve_setup_data_template ve_setup_16_uncoupled={ +! // 3, +! 4, + rate_mapping_16_uncoupled, + quality_mapping_16, + -1, +*************** +*** 116,122 **** + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + +! _psy_noiseguards_8, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, +--- 121,127 ---- + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + +! _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, +diff -crN libvorbis-1.2.0/lib/modes/setup_22.h aotuv-b5.5_20080330/lib/modes/setup_22.h +*** libvorbis-1.2.0/lib/modes/setup_22.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_22.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,32 **** + + ********************************************************************/ + +! static double rate_mapping_22[4]={ +! 15000.,20000.,44000.,86000. + }; + +! static double rate_mapping_22_uncoupled[4]={ +! 16000.,28000.,50000.,90000. + }; + +! static double _psy_lowpass_22[4]={9.5,11.,30.,99.}; + + ve_setup_data_template ve_setup_22_stereo={ +! 3, + rate_mapping_22, + quality_mapping_16, + 2, +--- 15,35 ---- + + ********************************************************************/ + +! static double rate_mapping_22[5]={ +! // 15000.,20000.,44000.,86000. +! 14000.,16000.,20000.,44000.,86000. + }; + +! static double rate_mapping_22_uncoupled[5]={ +! // 16000.,28000.,50000.,90000. +! 22000.,24000.,28000.,50000.,90000. + }; + +! static double _psy_lowpass_22[5]={8.5,9.5,11.,30.,99.}; + + ve_setup_data_template ve_setup_22_stereo={ +! // 3, +! 4, + rate_mapping_22, + quality_mapping_16, + 2, +*************** +*** 77,83 **** + }; + + ve_setup_data_template ve_setup_22_uncoupled={ +! 3, + rate_mapping_22_uncoupled, + quality_mapping_16, + -1, +--- 80,87 ---- + }; + + ve_setup_data_template ve_setup_22_uncoupled={ +! // 3, +! 4, + rate_mapping_22_uncoupled, + quality_mapping_16, + -1, +*************** +*** 95,101 **** + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + +! _psy_noiseguards_8, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, +--- 99,105 ---- + _vp_tonemask_adj_16, + _vp_tonemask_adj_16, + +! _psy_noiseguards_16, + _psy_noisebias_16_impulse, + _psy_noisebias_16_short, + _psy_noisebias_16_short, +diff -crN libvorbis-1.2.0/lib/modes/setup_32.h aotuv-b5.5_20080330/lib/modes/setup_32.h +*** libvorbis-1.2.0/lib/modes/setup_32.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_32.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,36 **** + + ********************************************************************/ + +! static double rate_mapping_32[12]={ +! 18000.,28000.,35000.,45000.,56000.,60000., + 75000.,90000.,100000.,115000.,150000.,190000., + }; + +! static double rate_mapping_32_un[12]={ +! 30000.,42000.,52000.,64000.,72000.,78000., + 86000.,92000.,110000.,120000.,140000.,190000., + }; + +! static double _psy_lowpass_32[12]={ +! 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. + }; + + ve_setup_data_template ve_setup_32_stereo={ +! 11, + rate_mapping_32, + quality_mapping_44, + 2, +--- 15,47 ---- + + ********************************************************************/ + +! static double rate_mapping_32[13]={ +! // 18000.,28000.,35000.,45000.,56000.,60000., +! 14000.,21000.,28000.,35000.,45000.,56000.,60000., + 75000.,90000.,100000.,115000.,150000.,190000., + }; + +! static double rate_mapping_32_un[13]={ +! // 30000.,42000.,52000.,64000.,72000.,78000., +! 26000.,32000.,42000.,52000.,64000.,72000.,78000., + 86000.,92000.,110000.,120000.,140000.,190000., + }; + +! static double _psy_lowpass_32[13]={ +! // 12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. +! 12.1,12.6,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99. + }; + ++ static int _floor_short_mapping_32[12]={ ++ 1,1,0,0,2,2,4,5,5,5,5,5 ++ }; ++ static int _floor_long_mapping_32[12]={ ++ 8,8,7,7,7,7,7,7,7,7,7,7 ++ }; ++ + ve_setup_data_template ve_setup_32_stereo={ +! // 11, +! 12, + rate_mapping_32, + quality_mapping_44, + 2, +*************** +*** 59,65 **** + _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, + +--- 70,76 ---- + _psy_compand_short_mapping, + _psy_compand_long_mapping, + +! {_noise_start_short_32,_noise_start_long_32}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + +*************** +*** 74,87 **** + + _floor_books, + _floor, +! _floor_short_mapping_44, +! _floor_long_mapping_44, + + _mapres_template_44_stereo + }; + + ve_setup_data_template ve_setup_32_uncoupled={ +! 11, + rate_mapping_32_un, + quality_mapping_44, + -1, +--- 85,99 ---- + + _floor_books, + _floor, +! _floor_short_mapping_32, +! _floor_long_mapping_32, + + _mapres_template_44_stereo + }; + + ve_setup_data_template ve_setup_32_uncoupled={ +! // 11, +! 12, + rate_mapping_32_un, + quality_mapping_44, + -1, +*************** +*** 110,116 **** + _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, + +--- 122,128 ---- + _psy_compand_short_mapping, + _psy_compand_long_mapping, + +! {_noise_start_short_32,_noise_start_long_32}, + {_noise_part_short_44,_noise_part_long_44}, + _noise_thresh_44, + +*************** +*** 125,132 **** + + _floor_books, + _floor, +! _floor_short_mapping_44, +! _floor_long_mapping_44, + + _mapres_template_44_uncoupled + }; +--- 137,144 ---- + + _floor_books, + _floor, +! _floor_short_mapping_32, +! _floor_long_mapping_32, + + _mapres_template_44_uncoupled + }; +diff -crN libvorbis-1.2.0/lib/modes/setup_44.h aotuv-b5.5_20080330/lib/modes/setup_44.h +*** libvorbis-1.2.0/lib/modes/setup_44.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_44.h Sun Mar 30 14:43:38 2008 +*************** +*** 19,61 **** + #include "modes/residue_44.h" + #include "modes/psych_44.h" + +! static double rate_mapping_44_stereo[12]={ +! 22500.,32000.,40000.,48000.,56000.,64000., + 80000.,96000.,112000.,128000.,160000.,250001. + }; + +! static double quality_mapping_44[12]={ +! -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 + }; + +! static int blocksize_short_44[11]={ +! 512,256,256,256,256,256,256,256,256,256,256 + }; +! static int blocksize_long_44[11]={ +! 4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 + }; + +! static double _psy_compand_short_mapping[12]={ +! 0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. + }; +! static double _psy_compand_long_mapping[12]={ +! 3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. + }; + +! static double _global_mapping_44[12]={ + /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ +! 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. + }; + +! static int _floor_short_mapping_44[11]={ +! 1,0,0,2,2,4,5,5,5,5,5 + }; +! static int _floor_long_mapping_44[11]={ +! 8,7,7,7,7,7,7,7,7,7,7 + }; + + ve_setup_data_template ve_setup_44_stereo={ +! 11, + rate_mapping_44_stereo, + quality_mapping_44, + 2, +--- 19,65 ---- + #include "modes/residue_44.h" + #include "modes/psych_44.h" + +! static double rate_mapping_44_stereo[13]={ +! // 22500.,32000.,40000.,48000.,56000.,64000., +! 16000.,24000.,32000.,40000.,48000.,56000.,64000., + 80000.,96000.,112000.,128000.,160000.,250001. + }; + +! static double quality_mapping_44[13]={ +! -.2,-.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0 + }; + +! static int blocksize_short_44[12]={ +! 512,512,256,256,256,256,256,256,256,256,256,256 + }; +! static int blocksize_long_44[12]={ +! 4096,4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048 + }; + +! static double _psy_compand_short_mapping[13]={ +! 0., 0., 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2. + }; +! static double _psy_compand_long_mapping[13]={ +! 4., 4., 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5. + }; + +! static double _global_mapping_44[13]={ + /* 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4. */ +! // 0., 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4. +! 0., 1., 2., 2., 2.5, 3., 3., 3.5, 3.7, 4., 4., 5., 5. // low +! // 0., 1., 2., 2., 2.5, 3., 3.2, 4.0, 4.0, 4.0, 4.5, 5., 5. // high + }; + +! static int _floor_short_mapping_44[12]={ +! 1,1,0,0,2,2,4,5,5,5,5,5 + }; +! static int _floor_long_mapping_44[12]={ +! 11,11,10,10,10,7,7,7,7,7,7,7 + }; + + ve_setup_data_template ve_setup_44_stereo={ +! // 11, +! 12, + rate_mapping_44_stereo, + quality_mapping_44, + 2, +*************** +*** 69,75 **** + _psy_tone_0dB, + _psy_tone_suppress, + +! _vp_tonemask_adj_otherblock, + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + +--- 73,79 ---- + _psy_tone_0dB, + _psy_tone_suppress, + +! _vp_tonemask_adj_otherblock, // impulse + _vp_tonemask_adj_longblock, + _vp_tonemask_adj_otherblock, + +diff -crN libvorbis-1.2.0/lib/modes/setup_44u.h aotuv-b5.5_20080330/lib/modes/setup_44u.h +*** libvorbis-1.2.0/lib/modes/setup_44u.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_44u.h Sun Mar 30 14:43:38 2008 +*************** +*** 17,29 **** + + #include "modes/residue_44u.h" + +! static double rate_mapping_44_un[12]={ +! 32000.,48000.,60000.,70000.,80000.,86000., + 96000.,110000.,120000.,140000.,160000.,240001. + }; + + ve_setup_data_template ve_setup_44_uncoupled={ +! 11, + rate_mapping_44_un, + quality_mapping_44, + -1, +--- 17,31 ---- + + #include "modes/residue_44u.h" + +! static double rate_mapping_44_un[13]={ +! // 32000.,48000.,60000.,70000.,80000.,86000., +! 28000.,40000.,48000.,60000.,70000.,80000.,86000., + 96000.,110000.,120000.,140000.,160000.,240001. + }; + + ve_setup_data_template ve_setup_44_uncoupled={ +! // 11, +! 12, + rate_mapping_44_un, + quality_mapping_44, + -1, +diff -crN libvorbis-1.2.0/lib/modes/setup_8.h aotuv-b5.5_20080330/lib/modes/setup_8.h +*** libvorbis-1.2.0/lib/modes/setup_8.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_8.h Sun Mar 30 14:43:38 2008 +*************** +*** 18,49 **** + #include "psych_8.h" + #include "residue_8.h" + +! static int blocksize_8[2]={ +! 512,512 + }; + +! static int _floor_mapping_8[2]={ +! 6,6, + }; + +! static double rate_mapping_8[3]={ +! 6000.,9000.,32000., + }; + +! static double rate_mapping_8_uncoupled[3]={ +! 8000.,14000.,42000., + }; + +! static double quality_mapping_8[3]={ +! -.1,.0,1. + }; + +! static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; + +! static double _global_mapping_8[3]={ 1., 2., 3. }; + + ve_setup_data_template ve_setup_8_stereo={ +! 2, + rate_mapping_8, + quality_mapping_8, + 2, +--- 18,54 ---- + #include "psych_8.h" + #include "residue_8.h" + +! static int blocksize_8[3]={ +! 512,512,512 + }; + +! static int _floor_mapping_8[3]={ +! 6,6,6 + }; + +! static double rate_mapping_8[4]={ +! // 6000.,9000.,32000., +! 5000.,6000.,9000.,32000., + }; + +! static double rate_mapping_8_uncoupled[4]={ +! // 8000.,14000.,42000., +! 8000.,10000.,14000.,42000., + }; + +! static double quality_mapping_8[4]={ +! -.2,-.1,.0,1. + }; + +! //static double _psy_compand_8_mapping[3]={ 0., 1., 1.}; +! static double _psy_compand_8_mapping[4]={ 0., 1., 2., 2.}; + +! //static double _global_mapping_8[3]={ 1., 2., 3. }; +! static double _global_mapping_8[4]={ 2., 2., 3., 4. }; + + ve_setup_data_template ve_setup_8_stereo={ +! // 2, +! 3, + rate_mapping_8, + quality_mapping_8, + 2, +*************** +*** 94,100 **** + }; + + ve_setup_data_template ve_setup_8_uncoupled={ +! 2, + rate_mapping_8_uncoupled, + quality_mapping_8, + -1, +--- 99,106 ---- + }; + + ve_setup_data_template ve_setup_8_uncoupled={ +! // 2, +! 3, + rate_mapping_8_uncoupled, + quality_mapping_8, + -1, +diff -crN libvorbis-1.2.0/lib/modes/setup_X.h aotuv-b5.5_20080330/lib/modes/setup_X.h +*** libvorbis-1.2.0/lib/modes/setup_X.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/modes/setup_X.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,27 **** + + ********************************************************************/ + +! static double rate_mapping_X[12]={ +! -1.,-1.,-1.,-1.,-1.,-1., + -1.,-1.,-1.,-1.,-1.,-1. + }; + + ve_setup_data_template ve_setup_X_stereo={ +! 11, + rate_mapping_X, + quality_mapping_44, + 2, +--- 15,28 ---- + + ********************************************************************/ + +! static double rate_mapping_X[13]={ +! -1.,-1.,-1.,-1.,-1.,-1.,-1. + -1.,-1.,-1.,-1.,-1.,-1. + }; + + ve_setup_data_template ve_setup_X_stereo={ +! // 11, +! 12, + rate_mapping_X, + quality_mapping_44, + 2, +*************** +*** 72,78 **** + }; + + ve_setup_data_template ve_setup_X_uncoupled={ +! 11, + rate_mapping_X, + quality_mapping_44, + -1, +--- 73,80 ---- + }; + + ve_setup_data_template ve_setup_X_uncoupled={ +! // 11, +! 12, + rate_mapping_X, + quality_mapping_44, + -1, +*************** +*** 123,129 **** + }; + + ve_setup_data_template ve_setup_XX_stereo={ +! 2, + rate_mapping_X, + quality_mapping_8, + 2, +--- 125,132 ---- + }; + + ve_setup_data_template ve_setup_XX_stereo={ +! // 2, +! 3, + rate_mapping_X, + quality_mapping_8, + 2, +*************** +*** 174,180 **** + }; + + ve_setup_data_template ve_setup_XX_uncoupled={ +! 2, + rate_mapping_X, + quality_mapping_8, + -1, +--- 177,184 ---- + }; + + ve_setup_data_template ve_setup_XX_uncoupled={ +! // 2, +! 3, + rate_mapping_X, + quality_mapping_8, + -1, +diff -crN libvorbis-1.2.0/lib/psy.c aotuv-b5.5_20080330/lib/psy.c +*** libvorbis-1.2.0/lib/psy.c Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/psy.c Sun Mar 30 14:43:38 2008 +*************** +*** 23,28 **** +--- 23,29 ---- + + #include "masking.h" + #include "psy.h" ++ #include "psy_table.h" + #include "os.h" + #include "lpc.h" + #include "smallft.h" +*************** +*** 30,38 **** + #include "misc.h" + + #define NEGINF -9999.f +- static double stereo_threshholds[]={0.0, .5, 1.0, 1.5, 2.5, 4.5, 8.5, 16.5, 9e10}; +- static double stereo_threshholds_limited[]={0.0, .5, 1.0, 1.5, 2.0, 2.5, 4.5, 8.5, 9e10}; + + vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; +--- 31,89 ---- + #include "misc.h" + + #define NEGINF -9999.f + ++ /* ++ rephase = reverse phase limit (postpoint) ++ 0 1 2 3 4 5 6 7 8 */ ++ static double stereo_threshholds[]= {0.0, 0.5, 1.0, 1.5, 2.5, 4.5, 8.5,16.5, 9e10}; ++ static double stereo_threshholds_rephase[]= {0.0, 0.5, 0.5, 1.0, 1.5, 1.5, 2.5, 2.5, 9e10}; ++ ++ static double stereo_threshholds_low[]= {0.0, 0.5, 0.5, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0}; ++ static double stereo_threshholds_high[]= {0.0, 0.5, 0.5, 0.5, 1.0, 3.0, 5.5, 8.5, 0.0}; ++ ++ ++ static int m3n32[] = {21,13,10,4}; ++ static int m3n44[] = {15,9,7,3}; ++ static int m3n48[] = {14,8,6,3}; ++ static int m3n32x2[] = {42,26,20,8}; ++ static int m3n44x2[] = {30,18,14,6}; ++ static int m3n48x2[] = {28,16,12,6}; ++ ++ static int freq_bfn128[128] = { ++ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, ++ 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, ++ 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,11,11,11,11, ++ 12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15, ++ ++ 16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19, ++ 20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23, ++ 24,24,24,24,25,25,25,24,23,22,21,20,19,18,17,16, ++ 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ++ }; ++ static int freq_bfn256[256] = { ++ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, ++ 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, ++ 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,11,11,11,11, ++ 12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15, ++ 16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19, ++ 20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23, ++ 24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27, ++ 28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31, ++ ++ 32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35, ++ 36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39, ++ 40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43, ++ 44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47, ++ 48,48,48,48,49,49,49,49,50,50,50,50,51,50,49,48, ++ 47,46,45,44,43,42,41,40,39,38,37,36,35,34,33,32, ++ 31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16, ++ 15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, ++ }; ++ ++ static float nnmid_th=0.3; ++ ++ ++ + vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){ + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy_global *gi=&ci->psy_g_param; +*************** +*** 284,298 **** + p->n=n; + p->rate=rate; + +! /* AoTuV HF weighting */ +! p->m_val = 1.; +! if(rate < 26000) p->m_val = 0; +! else if(rate < 38000) p->m_val = .94; /* 32kHz */ +! else if(rate > 46000) p->m_val = 1.275; /* 48kHz */ +! + /* set up the lookups for a given blocksize and sample rate */ + +! for(i=0,j=0;in=n; + p->rate=rate; + +! /* AoTuV HF weighting etc. */ +! p->n25p=n/4; +! p->n33p=n/3; +! p->n75p=n*3/4; +! p->nn25pt=vi->normal_partition/4; +! p->nn50pt=p->nn25pt*2; +! p->nn75pt=p->nn25pt*3; +! if(rate < 26000){ +! /* below 26kHz */ +! p->m_val = 0; +! for(i=0; i<4; i++) p->m3n[i] = 0; +! p->tonecomp_endp=0; // dummy +! p->tonecomp_thres=.25; +! p->st_freqlimit=n; +! p->min_nn_lp=0; p->nn_mec_s= 0; p->nn_mec_m= 0; +! }else if(rate < 38000){ +! /* 32kHz */ +! p->m_val = .93; +! if(n==128) { p->tonecomp_endp= 124; p->tonecomp_thres=.7; +! p->st_freqlimit=n; p->min_nn_lp=120; +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n32[i];} +! else if(n==256) { p->tonecomp_endp= 248; p->tonecomp_thres=.7; +! p->st_freqlimit=n; p->min_nn_lp=240; +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n32x2[i];} +! else if(n==1024){ p->tonecomp_endp= 992; p->tonecomp_thres=.7; +! p->st_freqlimit=n; p->min_nn_lp=960; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! else if(n==2048){ p->tonecomp_endp=1984; p->tonecomp_thres=.7; +! p->st_freqlimit=n; p->min_nn_lp=1920; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! }else if(rate > 46000){ +! /* 48kHz */ +! p->m_val = 1.205; +! if(n==128) { p->tonecomp_endp= 83; p->tonecomp_thres=.7; +! p->st_freqlimit= 88; p->min_nn_lp= 80; +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n48[i];} +! else if(n==256) { p->tonecomp_endp= 166; p->tonecomp_thres=.7; +! p->st_freqlimit= 176; p->min_nn_lp= 160; +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n48x2[i];} +! else if(n==1024){ p->tonecomp_endp= 664; p->tonecomp_thres=.7; +! p->st_freqlimit= 704; p->min_nn_lp= 640; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! else if(n==2048){ p->tonecomp_endp=1328; p->tonecomp_thres=.7; +! p->st_freqlimit=1408; p->min_nn_lp=1280; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! }else{ +! /* 44.1kHz */ +! p->m_val = 1.; +! if(n==128) { p->tonecomp_endp= 90; p->tonecomp_thres=.7; //15503.90625 +! p->st_freqlimit= 96; p->min_nn_lp= 87; //16537.5 , 14987.109375 +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n44[i];} +! else if(n==256) { p->tonecomp_endp= 180; p->tonecomp_thres=.7; +! p->st_freqlimit= 192; p->min_nn_lp= 174; +! p->nn_mec_s = .48; p->nn_mec_m =.24; +! for(i=0; i<4; i++) p->m3n[i] = m3n44x2[i];} +! else if(n==1024){ p->tonecomp_endp= 720; p->tonecomp_thres=.7; +! p->st_freqlimit= 768; p->min_nn_lp= 696; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! else if(n==2048){ p->tonecomp_endp=1440; p->tonecomp_thres=.7; +! p->st_freqlimit=1536; p->min_nn_lp=1392; +! p->nn_mec_s =.24; p->nn_mec_m =.12;} +! } +! + /* set up the lookups for a given blocksize and sample rate */ + +! j=0; +! for(i=0;iath[i]=p->ath[j-1]; ++ } + + for(i=0;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; + if(dB<0)dB=0; +--- 935,953 ---- + } + #endif + +! /* aoTuV M5 extension */ +! i=0; +! if((p->vi->noisecompand_high[NOISE_COMPAND_LEVELS-1] > 1) && (noise_compand_level > 0)){ +! int thter = p->n33p; +! for(;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; +! if(dB<0)dB=0; +! logmask[i]= work[i]+p->vi->noisecompand[dB]- +! ((p->vi->noisecompand[dB]-p->vi->noisecompand_high[dB])*noise_compand_level); +! } +! } +! for(;i=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1; + if(dB<0)dB=0; +*************** +*** 855,874 **** + float *noise, + float *tone, + int offset_select, + float *logmask, + float *mdct, +! float *logmdct){ +! int i,n=p->n; +! float de, coeffi, cx;/* AoTuV */ + float toneatt=p->vi->tone_masteratt[offset_select]; + + cx = p->m_val; + + for(i=0;inoiseoffset[offset_select][i]; + if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; +! logmask[i]=max(val,tone[i]+toneatt); +! + + /* AoTuV */ + /** @ M1 ** +--- 985,1224 ---- + float *noise, + float *tone, + int offset_select, ++ int bit_managed, + float *logmask, + float *mdct, +! float *logmdct, +! float *lastmdct, float *tempmdct, +! float low_compand, +! int end_block, +! int blocktype, int modenumber, +! int nW_modenumber, +! int lW_blocktype, int lW_modenumber, int lW_no, int padnum){ +! +! int i,j,n=p->n; +! int m2_sw=0; /* aoTuV for M2 */ +! int m3_sw, *m3n, m3_count, mdctbuf_flag; /* aoTuV for M3 */ +! int m4_end, m4_lp_pos, m4_start; /* aoTuV for M4 */ +! float de, coeffi, cx; /* aoTuV for M1 */ +! float noise_rate, noise_rate_low, noise_center, rate_mod, tone_rate; /* aoTuV for M3 */ +! float m4_thres; /* aoTuV for M4 */ + float toneatt=p->vi->tone_masteratt[offset_select]; + + cx = p->m_val; ++ m3n = p->m3n; ++ m4_start=p->vi->normal_start; ++ m4_end = p->tonecomp_endp; ++ m4_thres = p->tonecomp_thres; ++ m4_lp_pos=9999; ++ ++ end_block+=p->vi->normal_partition; ++ if(end_block>n)end_block=n; ++ ++ /* Collapse of low(mid) frequency is prevented. (for 32/44/48kHz q-2) */ ++ if(low_compand<0 || toneatt<25.)low_compand=0; ++ else low_compand*=(toneatt-25.); ++ ++ /** @ M2 PRE **/ ++ if(p->vi->normal_thresh<.48){ ++ if((cx > 0.5) && !modenumber && blocktype && (n==128)){ ++ if(p->vi->normal_thresh>.35) m2_sw = 10+(int)(p->vi->flacint*100); ++ else m2_sw = 10; ++ } ++ } ++ ++ /* flag for lastmdct & tempmdct (bitrate managed mode) */ ++ if( (bit_managed && (offset_select==2)) || (!bit_managed && (offset_select==1)) ) mdctbuf_flag=1; ++ else mdctbuf_flag=0; ++ ++ /** @ M3&M4 PRE **/ ++ if(cx < 0.5){ ++ m3_sw = 0; /* for M3 */ ++ m4_end=end_block; /* for M4 */ ++ }else{ ++ /** M3 PRE **/ ++ if((n == 128) && !modenumber && !blocktype){ ++ if(toneatt < 3) m3_count = 2; // q6~ ++ else m3_count = 3; ++ ++ if(!lW_blocktype && !lW_modenumber){ /* last window "short" - type "impulse" */ ++ if(lW_no < 8){ ++ /* impulse - @impulse case1 */ ++ noise_rate = 0.7-(float)(lW_no-1)/17; ++ noise_center = (float)(lW_no*m3_count); ++ tone_rate = 8-lW_no; ++ }else{ ++ /* impulse - @impulse case2 */ ++ noise_rate = 0.3; ++ noise_center = 25; ++ tone_rate = 0; ++ if((lW_no*m3_count) < 24) noise_center = lW_no*m3_count; ++ } ++ if(mdctbuf_flag == 1){ ++ for(i=0; i<128; i++) tempmdct[i] -= 5; ++ } ++ }else{ /* non_impulse - @Short(impulse) case */ ++ noise_rate = 0.7; ++ noise_center = 0; ++ tone_rate = 8.; ++ if(mdctbuf_flag == 1){ ++ for(i=0; i<128; i++) tempmdct[i] = lastmdct[i] - 5; ++ } ++ } ++ noise_rate_low = 0; ++ m3_sw = 1; ++ if(padnum)noise_rate*=.8; ++ for(i=0;ivi->normal_thresh>1.){ ++ m4_start = 9999; ++ }else{ ++ if(m4_end>end_block)m4_lp_pos=m4_end; ++ else m4_lp_pos=end_block; ++ } ++ } + + for(i=0;inoiseoffset[offset_select][i]; ++ float tval= tone[i]+toneatt; ++ if(i<=m4_start)tval-=low_compand; + if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp; +! +! /* AoTuV */ +! /** @ M2 MAIN ** +! floor is pulled below suitably. (padding block only) (#2) +! by Aoyumi @ 2006/06/14 +! */ +! if(m2_sw){ +! // the conspicuous low level pre-echo of the padding block origin is reduced. +! if((logmdct[i]-lastmdct[i]) > 20){ +! if(i > m3n[3]) val -= (logmdct[i]-lastmdct[i]-20)/m2_sw; +! else val -= (logmdct[i]-lastmdct[i]-20)/(m2_sw+m2_sw); +! } +! } +! +! /* AoTuV */ +! /** @ M3 MAIN ** +! Dynamic impulse block noise control. (#6) +! 48/44.1/32kHz only. +! by Aoyumi @ 2007/07/27 +! */ +! if(m3_sw){ +! if(val>tval){ +! if( (val>lastmdct[i]) && (logmdct[i]>(tempmdct[i]+noise_center)) ){ +! int toneac=0; +! float valmask=0; +! +! if(mdctbuf_flag == 1)tempmdct[i] = logmdct[i]; // reset +! if(logmdct[i]>lastmdct[i]){ +! rate_mod = noise_rate; +! }else{ +! rate_mod = noise_rate_low; +! } +! +! if( !padnum && (i20) ){ +! float dBsub=(logmdct[i]-lastmdct[i]); +! if(dBsub>25){ +! toneac=1; +! if(tval>-100){ +! float tr_cur=tone_rate; +! if(dBsub<(25+tr_cur)) tr_cur=dBsub-25; +! else tval-=tr_cur; +! if(tval<-100)tval=-100; +! } +! } +! } +! if(i > m3n[1]){ +! if((val-tval)>30) valmask=((val-tval-30)/10+30)*rate_mod; +! else valmask=(val-tval)*rate_mod; +! }else if(i > m3n[2]){ +! if((val-tval)>20) valmask=((val-tval-20)/10+20)*rate_mod; +! else valmask=(val-tval)*rate_mod; +! }else if(i > m3n[3]){ +! if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.5; +! else valmask=(val-tval)*rate_mod*0.5; +! }else{ +! if((val-tval)>10) valmask=((val-tval-10)/10+10)*rate_mod*0.3; +! else valmask=(val-tval)*rate_mod*0.3; +! } +! if((val-valmask)>lastmdct[i])val-=valmask; +! else val=lastmdct[i]; +! +! if( toneac && ((val-lastmdct[i])>20) ){ +! val-=(val-lastmdct[i]-20)*.2; +! } +! } +! } +! } +! +! /* AoTuV */ +! /** @ M4 MAIN ** +! The purpose of this portion is working Noise Normalization more correctly. +! (There is this in order to prevent extreme boost of floor) +! m4_start = start point +! m4_end = end point +! m4_thres = threshold +! by Aoyumi @ 2006/03/20 +! */ +! //logmask[i]=max(val,tval); +! if(val>tval){ +! logmask[i]=val; +! }else if((i>m4_start) && (i-140)){ // -140dB(test OK) +! if(logmdct[i]>val){ +! if(logmdct[i]= 0.5)){ ++ if((n == 128) || (n == 256)){ ++ for(i=0; i logmdct[i*8+j]){ ++ lastmdct[i] = logmdct[i*8+j]; ++ } ++ } ++ } ++ } ++ } ++ } ++ /* This affects calculation of a floor curve. */ ++ for(i=m4_lp_pos; ifloorB)-1; + int offset=31-abs(floorA-floorB); +! float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; + + floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))]; + +--- 1333,1339 ---- + + int test=(floorA>floorB)-1; + int offset=31-abs(floorA-floorB); +! float floormag=hypot_lookup[((offset<0)-1)&offset]+1.f; // floormag = 0.990065 ~ 0.707107 + + floormag*=FLOOR1_fromdB_INV_LOOKUP[(floorB&test)|(floorA&(~test))]; + +*************** +*** 992,997 **** +--- 1367,1388 ---- + if(-a>b)return -sqrt(a*a+b*b); + return sqrt(b*b+a*a); + } ++ /* modified hypot by aoyumi ++ better method should be found. */ ++ static float min_indemnity_dipole_hypot(float a, float b){ ++ float thnor=0.92; ++ float threv=0.84; ++ float a2 = a*a; ++ float b2 = b*b; ++ if(a>0.){ ++ if(b>0.)return sqrt(a2+b2*thnor); ++ if(a>-b)return sqrt(a2-b2+b2*threv); ++ return -sqrt(b2-a2+a2*threv); ++ } ++ if(b<0.)return -sqrt(a2+b2*thnor); ++ if(-a>b)return -sqrt(a2-b2+b2*threv); ++ return sqrt(b2-a2+a2*threv); ++ } + + /* revert to round hypot for now */ + float **_vp_quantize_couple_memo(vorbis_block *vb, +*************** +*** 1004,1019 **** + float **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); + int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; + +! for(i=0;icoupling_steps;i++){ +! float *mdctM=mdct[vi->coupling_mag[i]]; +! float *mdctA=mdct[vi->coupling_ang[i]]; +! ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); +! for(j=0;jcoupling_steps*sizeof(*ret)); + int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; + +! if(1){ // set new hypot +! for(i=0;icoupling_steps;i++){ +! float *mdctM=mdct[vi->coupling_mag[i]]; +! float *mdctA=mdct[vi->coupling_ang[i]]; +! +! ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); +! for(j=0;jcoupling_steps;i++){ +! float *mdctM=mdct[vi->coupling_mag[i]]; +! float *mdctA=mdct[vi->coupling_ang[i]]; +! +! ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); +! for(j=0;jf2); + } + + int **_vp_quantize_couple_sort(vorbis_block *vb, + vorbis_look_psy *p, + vorbis_info_mapping0 *vi, + float **mags){ + +! + if(p->vi->normal_point_p){ + int i,j,k,n=p->n; + int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); +--- 1426,1555 ---- + return (f1f2); + } + ++ /*** optimization of sort (for 8 or 32 element) ***/ ++ #ifdef OPT_SORT ++ #define C(o,a,b)\ ++ (fabs(data[o+a])>=fabs(data[o+b])) ++ #define O(o,a,b,c,d)\ ++ {n[o]=o+a;n[o+1]=o+b;n[o+2]=o+c;n[o+3]=o+d;} ++ #define SORT4(o)\ ++ if(C(o,2,3))if(C(o,0,1))if(C(o,0,2))if(C(o,1,2))O(o,0,1,2,3)\ ++ else if(C(o,1,3))O(o,0,2,1,3)\ ++ else O(o,0,2,3,1)\ ++ else if(C(o,0,3))if(C(o,1,3))O(o,2,0,1,3)\ ++ else O(o,2,0,3,1)\ ++ else O(o,2,3,0,1)\ ++ else if(C(o,1,2))if(C(o,0,2))O(o,1,0,2,3)\ ++ else if(C(o,0,3))O(o,1,2,0,3)\ ++ else O(o,1,2,3,0)\ ++ else if(C(o,1,3))if(C(o,0,3))O(o,2,1,0,3)\ ++ else O(o,2,1,3,0)\ ++ else O(o,2,3,1,0)\ ++ else if(C(o,0,1))if(C(o,0,3))if(C(o,1,3))O(o,0,1,3,2)\ ++ else if(C(o,1,2))O(o,0,3,1,2)\ ++ else O(o,0,3,2,1)\ ++ else if(C(o,0,2))if(C(o,1,2))O(o,3,0,1,2)\ ++ else O(o,3,0,2,1)\ ++ else O(o,3,2,0,1)\ ++ else if(C(o,1,3))if(C(o,0,3))O(o,1,0,3,2)\ ++ else if(C(o,0,2))O(o,1,3,0,2)\ ++ else O(o,1,3,2,0)\ ++ else if(C(o,1,2))if(C(o,0,2))O(o,3,1,0,2)\ ++ else O(o,3,1,2,0)\ ++ else O(o,3,2,1,0) ++ ++ static void sortindex_fix8(int *index, ++ float *data, ++ int offset){ ++ int i,j,k,n[8]; ++ index+=offset; ++ data+=offset; ++ SORT4(0) ++ SORT4(4) ++ j=0;k=4; ++ for(i=0;i<8;i++) ++ index[i]=n[(k>=8)||(j<4)&&C(0,n[j],n[k])?j++:k++]+offset; ++ } ++ ++ static void sortindex_fix32(int *index, ++ float *data, ++ int offset){ ++ int i,j,k,n[32]; ++ for(i=0;i<32;i+=8) ++ sortindex_fix8(index,data,offset+i); ++ index+=offset; ++ for(i=j=0,k=8;i<16;i++) ++ n[i]=index[(k>=16)||(j<8)&&C(0,index[j],index[k])?j++:k++]; ++ for(i=j=16,k=24;i<32;i++) ++ n[i]=index[(k>=32)||(j<24)&&C(0,index[j],index[k])?j++:k++]; ++ for(i=j=0,k=16;i<32;i++) ++ index[i]=n[(k>=32)||(j<16)&&C(0,n[j],n[k])?j++:k++]; ++ } ++ ++ static void sortindex_shellsort(int *index, ++ float *data, ++ int offset, ++ int count){ ++ int gap,pos,left,right,i,j; ++ index+=offset; ++ for(i=0;i=4)gap/=3; ++ while(gap>0){ ++ for(pos=gap;pos=0;left-=gap){ ++ i=index[left];j=index[left+gap]; ++ if(!C(0,i,j)){ ++ index[left]=j; ++ index[left+gap]=i; ++ }else break; ++ } ++ } ++ gap/=3; ++ } ++ } ++ ++ static void sortindex(int *index, ++ float *data, ++ int offset, ++ int count){ ++ if(count==8)sortindex_fix8(index,data,offset); ++ else if(count==32)sortindex_fix32(index,data,offset); ++ else sortindex_shellsort(index,data,offset,count); ++ } ++ ++ #undef C ++ #undef O ++ #undef SORT4 ++ ++ #endif ++ /*** OPT_SORT End ***/ ++ ++ + int **_vp_quantize_couple_sort(vorbis_block *vb, + vorbis_look_psy *p, + vorbis_info_mapping0 *vi, + float **mags){ + +! #ifdef OPT_SORT +! if(p->vi->normal_point_p){ +! int i,j,n=p->n; +! int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); +! int partition=p->vi->normal_partition; +! +! for(i=0;icoupling_steps;i++){ +! ret[i]=_vorbis_block_alloc(vb,n*sizeof(**ret)); +! +! for(j=0;jvi->normal_point_p){ + int i,j,k,n=p->n; + int **ret=_vorbis_block_alloc(vb,vi->coupling_steps*sizeof(*ret)); +*************** +*** 1048,1057 **** +--- 1568,1589 ---- + return(ret); + } + return(NULL); ++ #endif + } + + void _vp_noise_normalize_sort(vorbis_look_psy *p, + float *magnitudes,int *sortedindex){ ++ #ifdef OPT_SORT ++ int j,n=p->n; ++ vorbis_info_psy *vi=p->vi; ++ int partition=vi->normal_partition; ++ int start=vi->normal_start; ++ ++ for(j=start;jn)partition=n-j; ++ sortindex(sortedindex-start,magnitudes,j,partition); ++ } ++ #else + int i,j,n=p->n; + vorbis_info_psy *vi=p->vi; + int partition=vi->normal_partition; +*************** +*** 1066,1076 **** + sortedindex[i+j-start]=work[i]-magnitudes; + } + } + } + + void _vp_noise_normalize(vorbis_look_psy *p, +! float *in,float *out,int *sortedindex){ +! int flag=0,i,j=0,n=p->n; + vorbis_info_psy *vi=p->vi; + int partition=vi->normal_partition; + int start=vi->normal_start; +--- 1598,1610 ---- + sortedindex[i+j-start]=work[i]-magnitudes; + } + } ++ #endif + } + + void _vp_noise_normalize(vorbis_look_psy *p, +! float *in,float *out,int *sortedindex, +! int blocktype, int modenumber){ +! int i,j=0,n=p->n; + vorbis_info_psy *vi=p->vi; + int partition=vi->normal_partition; + int start=vi->normal_start; +*************** +*** 1084,1110 **** + for(;j+partition<=n;j+=partition){ + float acc=0.; + int k; + +! for(i=j;i=.25f){ +! out[k]=rint(in[k]); +! acc-=in[k]*in[k]; +! flag=1; +! }else{ +! if(accnormal_thresh)break; +! out[k]=unitnorm(in[k]); +! acc-=1.; +! } + } + + for(;inn25pt; ++ int div_high=j+p->nn75pt; ++ int low_flag=0; ++ int high_flag=0; + +! for(i=j;inn50pt){ ++ if(acc>=vi->normal_thresh && fabs(in[k])>nnmid_th){ ++ out[k]=unitnorm(in[k]); ++ acc-=1.; ++ nn_count++; ++ if(k==div_low)low_flag=k; ++ else high_flag=k; ++ } ++ } ++ } ++ /* NN main */ + for(i=0;i=.25f){ // or rint(in[k])!=0.f +! out[k]=rint(in[k]); +! //acc-=in[k]*in[k]; +! }else{ +! if(accnormal_thresh)break; +! if(low_flag==k || high_flag==k)continue; +! out[k]=unitnorm(in[k]); +! acc-=1.; +! nn_count++; +! } + } + ++ /* The minimum energy complement */ ++ if(modenumber && (energy_loss==partition) && (j<=p->min_nn_lp) && (nn_count)){ ++ k=sortedindex[i+j-start]; ++ if(fabs(in[k])>=p->nn_mec_m){ ++ out[k]=unitnorm(in[k]); ++ i++; ++ } ++ } ++ ++ // The last process + for(;in; +! + /* perform any requested channel coupling */ + /* point stereo can only be used in a first stage (in this encoder) + because of the dependency on floor lookups */ +--- 1696,1707 ---- + int **mag_sort, + int **ifloor, + int *nonzero, +! int sliding_lowpass, +! int blocktype, int modenumber, +! float **mdct, float **res_org){ + + int i,j,k,n=p->n; +! + /* perform any requested channel coupling */ + /* point stereo can only be used in a first stage (in this encoder) + because of the dependency on floor lookups */ +*************** +*** 1147,1185 **** + + float *rM=res[vi->coupling_mag[i]]; + float *rA=res[vi->coupling_ang[i]]; + float *qM=rM+n; + float *qA=rA+n; + int *floorM=ifloor[vi->coupling_mag[i]]; + int *floorA=ifloor[vi->coupling_ang[i]]; + float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; + float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; + int partition=(p->vi->normal_point_p?p->vi->normal_partition:p->n); +! int limit=g->coupling_pointlimit[p->vi->blockflag][blobno]; +! int pointlimit=limit; +! + nonzero[vi->coupling_mag[i]]=1; + nonzero[vi->coupling_ang[i]]=1; +! +! /* The threshold of a stereo is changed with the size of n */ +! if(n > 1000) +! postpoint=stereo_threshholds_limited[g->coupling_postpointamp[blobno]]; +! +! for(j=0;jn;j+=partition){ + float acc=0.f; + + for(k=0;k=limit && fabs(rM[l])coupling_mag[i]]; + float *rA=res[vi->coupling_ang[i]]; ++ float *rMo=res_org[vi->coupling_mag[i]]; ++ float *rAo=res_org[vi->coupling_ang[i]]; + float *qM=rM+n; + float *qA=rA+n; ++ float *mdctM=mdct[vi->coupling_mag[i]]; ++ float *mdctA=mdct[vi->coupling_ang[i]]; + int *floorM=ifloor[vi->coupling_mag[i]]; + int *floorA=ifloor[vi->coupling_ang[i]]; + float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; + float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; ++ float sth_low=stereo_threshholds_low[g->coupling_prepointamp[blobno]]; ++ float sth_high=stereo_threshholds_high[g->coupling_postpointamp[blobno]]; ++ float postpoint_backup; ++ float st_thresh; + int partition=(p->vi->normal_point_p?p->vi->normal_partition:p->n); +! int pointlimit=g->coupling_pointlimit[p->vi->blockflag][blobno]; +! int freqlimit=p->st_freqlimit; +! unsigned char Mc_treshp[2048]; +! unsigned char Ac_treshp[2048]; +! int lof_st; +! int hif_st; +! int hif_stcopy; +! int old_lof_st=0; +! int old_hif_st=0; +! int Afreq_num=0; +! int Mfreq_num=0; +! int stcont_start=0; // M6 start point +! + nonzero[vi->coupling_mag[i]]=1; + nonzero[vi->coupling_ang[i]]=1; +! +! postpoint_backup=postpoint; +! +! /** @ M6 PRE **/ +! // lossless only? +! if(!stereo_threshholds[g->coupling_postpointamp[blobno]])stcont_start=n; +! else{ +! // exception handling +! if((postpoint-sth_high)noiseoffset[1][j]>=-2)break; +! } +! // start point correction & threshold setup +! st_thresh=.1; +! if(p->m_val<.5){ +! // low frequency limit +! if(stcont_startvi->normal_thresh>1.)st_thresh=.25; +! for(j=0;j<=freqlimit;j++){ // or j=stcont_start){ ++ int m; ++ int lof_num; ++ int hif_num; ++ ++ lof_st=LOF_TABLE[l]; ++ hif_st=HIF_TABLE[l]; ++ /*** original calc. ++ float magicnum=.175; // 0.16`0.19 ++ lof_st=l-(l/2)*(magicnum*.5); ++ hif_st=l+l*magicnum; ++ ****/ ++ ++ hif_stcopy=hif_st; ++ ++ // limit setting ++ if(hif_st>freqlimit)hif_st=freqlimit; ++ ++ if(old_lof_st || old_hif_st){ ++ if(hif_st>l){ ++ // hif_st, lof_st ...absolute value ++ // lof_num, hif_num ...relative value ++ ++ // low freq.(lower) ++ lof_num=lof_st-old_lof_st; ++ switch(lof_num){ ++ case 0: ++ Afreq_num+=Ac_treshp[l-1]; ++ Mfreq_num+=Mc_treshp[l-1]; ++ break; ++ case 1: ++ Afreq_num+=Ac_treshp[l-1]; ++ Mfreq_num+=Mc_treshp[l-1]; ++ Afreq_num-=Ac_treshp[old_lof_st]; ++ Mfreq_num-=Mc_treshp[old_lof_st]; ++ break; ++ default:/* puts("err. low") */;break; ++ } ++ ++ // high freq.(higher) ++ hif_num=hif_st-old_hif_st; ++ switch(hif_num){ ++ case 0: ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ break; ++ case 1: ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ Afreq_num+=Ac_treshp[hif_st]; ++ Mfreq_num+=Mc_treshp[hif_st]; ++ break; ++ case 2: ++ Afreq_num-=Ac_treshp[l]; ++ Mfreq_num-=Mc_treshp[l]; ++ Afreq_num+=Ac_treshp[hif_st]; ++ Mfreq_num+=Mc_treshp[hif_st]; ++ Afreq_num+=Ac_treshp[hif_st-1]; ++ Mfreq_num+=Mc_treshp[hif_st-1]; ++ break; ++ default:/* puts("err. high") */;break; ++ } ++ } ++ }else{ ++ for(m=lof_st; m<=hif_st; m++){ ++ if(m==l)continue; ++ if(Ac_treshp[m]) Afreq_num++; ++ if(Mc_treshp[m]) Mfreq_num++; ++ } ++ } ++ if(l>=pointlimit){ ++ shigh=sth_high/(hif_stcopy-lof_st); ++ shighA=shigh*Afreq_num; ++ shighM=shigh*Mfreq_num; ++ if((shighA+rAs)>(shighM+rMs))shigh=shighA; ++ else shigh=shighM; ++ }else{ ++ slow=sth_low/(hif_stcopy-lof_st); ++ slowA=slow*Afreq_num; ++ slowM=slow*Mfreq_num; ++ if(p->noiseoffset[1][l]<-1){ ++ slowA*=(p->noiseoffset[1][l]+2); ++ slowM*=(p->noiseoffset[1][l]+2); ++ } ++ } ++ old_lof_st=lof_st; ++ old_hif_st=hif_st; ++ } + ++ if(l>=pointlimit){ ++ postpoint-=shigh; ++ /* The following prevents an extreme reduction of residue. (2ch stereo only) */ ++ if( ((a>0.) && (b<0.)) || ((b>0.) && (a<0.)) ){ ++ hypot_reserve = fabs(fabs(a)-fabs(b)); ++ if(hypot_reserve < 0.001){ // 0~0.000999- ++ dummypoint = stereo_threshholds_rephase[g->coupling_postpointamp[blobno]]; ++ dummypoint = dummypoint+((postpoint-dummypoint)*(hypot_reserve*1000)); ++ if(postpoint > dummypoint) postpoint = dummypoint; ++ } ++ } ++ } ++ + if(l=pointlimit && rMs=pointlimit)acc+=qM[l]*qM[l]; +! } + }else{ + couple_lossless(rM[l],rA[l],qM+l,qA+l); + } +*************** +*** 1188,1227 **** + qA[l]=0.; + } + } +! +! if(p->vi->normal_point_p){ + for(k=0;k=p->vi->normal_thresh;k++){ +! int l=mag_sort[i][j+k]; + if(l=pointlimit && rint(qM[l])==0.f){ + qM[l]=unitnorm(qM[l]); +! acc-=1.f; + } +! } + } + } + } + } + } + +! /* AoTuV */ +! /** @ M2 ** +! The boost problem by the combination of noise normalization and point stereo is eased. +! However, this is a temporary patch. +! by Aoyumi @ 2004/04/18 + */ + +! void hf_reduction(vorbis_info_psy_global *g, +! vorbis_look_psy *p, +! vorbis_info_mapping0 *vi, +! float **mdct){ +! +! int i,j,n=p->n, de=0.3*p->m_val; +! int limit=g->coupling_pointlimit[p->vi->blockflag][PACKETBLOBS/2]; +! int start=p->vi->normal_start; +! +! for(i=0; icoupling_steps; i++){ +! /* for(j=start; jvi->normal_point_p && p->vi->normal_start!=9999){ +! int div_low=j+p->nn25pt; +! int div_high=j+p->nn75pt; +! int low_flag=0; +! int high_flag=0; +! int nn_count=0; +! int l; // k=parttion counter. l=mdct counter. j=partition block counter +! +! /* partition is 8 or 32 */ +! if(partition==8){ div_low--; div_high--; } +! rpacc=acc; +! +! /* When the energy loss of a partition is large, +! NN is performed in the middle of partition. (without impulse block) */ +! if((energy_loss==partition) && !(!modenumber && !blocktype)){ +! for(l=div_low; l<=div_high ;l+=p->nn50pt){ +! if(l>=pointlimit && acc>=p->vi->normal_thresh && +! fabs(qM[l])>nnmid_th && l0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.)) ){ +! acc-=1.f; rpacc-=1.25; +! }else{ +! acc-=1.f; rpacc-=1.f; +! } +! qM[l]=unitnorm(qM[l]); +! nn_count++; +! if(l==div_low)low_flag=l; +! else high_flag=l; +! } +! } +! } +! /* NN main (point stereo) */ + for(k=0;k=p->vi->normal_thresh;k++){ +! l=mag_sort[i][j+k]; + if(l=pointlimit && rint(qM[l])==0.f){ ++ if(low_flag==l || high_flag==l)continue; ++ if( ((mdctM[l]>0.) && (mdctA[l]<0.)) || ((mdctA[l]>0.) && (mdctM[l]<0.)) ){ ++ if(rpaccvi->normal_thresh)continue; ++ acc-=1.f; rpacc-=1.25; ++ }else{ ++ acc-=1.f; rpacc-=1.f; ++ } + qM[l]=unitnorm(qM[l]); +! nn_count++; +! } +! } +! /* The minimum energy complement. (long & trans. block) */ +! if(modenumber && (energy_loss==partition) && (j<=p->min_nn_lp) && (nn_count)){ +! for(;k=pointlimit) && (rint(qM[l])==0.f) && (fabs(rM[l]+rA[l])>=p->nn_mec_s)){ +! qM[l]=unitnorm(qM[l]); +! break; +! } + } +! } + } + } + } + } + } + +! /* aoTuV M5 +! noise_compand_level of low frequency is determined from the level of high frequency. +! by Aoyumi @ 2005/09/14 +! +! return value +! [normal compander] 0 <> 1.0 [high compander] +! -1 @ disable + */ ++ float lb_loudnoise_fix(vorbis_look_psy *p, ++ float noise_compand_level, ++ float *logmdct, ++ int lW_modenumber, ++ int blocktype, int modenumber){ + +! int i, n=p->n, nq1=p->n25p, nq3=p->n75p; +! double hi_th=0; +! +! if(p->m_val < 0.5)return(-1); /* 48/44.1/32kHz only */ +! if(p->vi->normal_thresh>.45)return(-1); /* under q3 */ +! +! /* select trans. block(short>>long case). */ +! if(!modenumber)return(-1); +! if(blocktype || lW_modenumber)return(noise_compand_level); +! +! /* calculation of a threshold. */ +! for(i=nq1; i-130)hi_th += logmdct[i]; +! else hi_th += -130; +! } +! hi_th /= n; +! +! /* calculation of a high_compand_level */ +! if(hi_th > -40.) noise_compand_level=-1; +! else if(hi_th < -50.) noise_compand_level=1.; +! else noise_compand_level=1.-((hi_th+50)/10); +! +! return(noise_compand_level); + } +diff -crN libvorbis-1.2.0/lib/psy.h aotuv-b5.5_20080330/lib/psy.h +*** libvorbis-1.2.0/lib/psy.h Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/psy.h Sun Mar 30 14:43:38 2008 +*************** +*** 15,20 **** +--- 15,22 ---- + + ********************************************************************/ + ++ #define OPT_SORT ++ + #ifndef _V_PSY_H_ + #define _V_PSY_H_ + #include "smallft.h" +*************** +*** 54,59 **** +--- 56,64 ---- + int noisewindowfixed; + float noiseoff[P_NOISECURVES][P_BANDS]; + float noisecompand[NOISE_COMPAND_LEVELS]; ++ float noisecompand_high[NOISE_COMPAND_LEVELS]; ++ ++ float flacint; + + float max_curve_dB; + +*************** +*** 110,116 **** + int total_octave_lines; + long rate; /* cache it */ + +! float m_val; /* Masking compensation value */ + + } vorbis_look_psy; + +--- 115,135 ---- + int total_octave_lines; + long rate; /* cache it */ + +! int m3n[4]; /* number for M3 */ +! int tonecomp_endp; /* for M4 */ +! int min_nn_lp; /* for M6 */ +! float tonecomp_thres; /* for M4 */ +! float nn_mec_s; /* minimum energy complement for noise normalization [stereo] */ +! float nn_mec_m; /* minimum energy complement for noise normalization [mono] */ +! float m_val; /* masking compensation value */ +! +! int st_freqlimit; /* for M6 */ +! int n25p; /* mdct n(25%) */ +! int n33p; /* mdct n(33%) */ +! int n75p; /* mdct n(75%) */ +! int nn75pt; /* 75 % partition for noise normalization */ +! int nn50pt; /* half partition for noise normalization */ +! int nn25pt; /* quarter partition for noise normalization */ + + } vorbis_look_psy; + +*************** +*** 129,134 **** +--- 148,154 ---- + int sliding_lowpass); + + extern void _vp_noisemask(vorbis_look_psy *p, ++ float noise_compand_level, + float *logmdct, + float *logmask); + +*************** +*** 142,150 **** + float *noise, + float *tone, + int offset_select, + float *logmask, + float *mdct, +! float *logmdct); + + extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd); + +--- 162,177 ---- + float *noise, + float *tone, + int offset_select, ++ int bit_managed, + float *logmask, + float *mdct, +! float *logmdct, +! float *lastmdct, float *tempmdct, +! float low_compand, +! int end_block, +! int blocktype, int modenumber, +! int nW_modenumber, +! int lW_blocktype, int lW_modenumber, int lW_no, int padnum); + + extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd); + +*************** +*** 163,172 **** + int **mag_sort, + int **ifloor, + int *nonzero, +! int sliding_lowpass); + + extern void _vp_noise_normalize(vorbis_look_psy *p, +! float *in,float *out,int *sortedindex); + + extern void _vp_noise_normalize_sort(vorbis_look_psy *p, + float *magnitudes,int *sortedindex); +--- 190,202 ---- + int **mag_sort, + int **ifloor, + int *nonzero, +! int sliding_lowpass, +! int blocktype, int modenumber, +! float **mdct, float **res_org); + + extern void _vp_noise_normalize(vorbis_look_psy *p, +! float *in,float *out,int *sortedindex, +! int blocktype, int modenumber); + + extern void _vp_noise_normalize_sort(vorbis_look_psy *p, + float *magnitudes,int *sortedindex); +*************** +*** 176,185 **** + vorbis_info_mapping0 *vi, + float **mags); + +! extern void hf_reduction(vorbis_info_psy_global *g, +! vorbis_look_psy *p, +! vorbis_info_mapping0 *vi, +! float **mdct); + + + #endif +--- 206,216 ---- + vorbis_info_mapping0 *vi, + float **mags); + +! extern float lb_loudnoise_fix(vorbis_look_psy *p, +! float noise_compand_level, +! float *logmdct, +! int lW_modenumber, +! int blocktype, int modenumber); + + + #endif +diff -crN libvorbis-1.2.0/lib/psy_table.h aotuv-b5.5_20080330/lib/psy_table.h +*** libvorbis-1.2.0/lib/psy_table.h Thu Jan 01 09:00:00 1970 +--- aotuv-b5.5_20080330/lib/psy_table.h Sun Mar 30 14:43:38 2008 +*************** +*** 0 **** +--- 1,521 ---- ++ /* aoTuV */ ++ ++ /* M6 table */ ++ static short LOF_TABLE[4096]={ ++ 0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ++ 15, 16, 17, 18, 19, 20, 21, 22, 22, 23, 24, 25, 26, 27, 28, 29, ++ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 43, 44, ++ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, ++ 61, 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, ++ 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 87, 88, 89, 90, ++ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, ++ 107, 108, 109, 110, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, ++ 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 131, 132, 133, 134, 135, 136, ++ 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, ++ 153, 154, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, ++ 168, 169, 170, 171, 172, 173, 174, 175, 175, 176, 177, 178, 179, 180, 181, 182, ++ 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 196, 197, ++ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, ++ 214, 215, 216, 217, 218, 219, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, ++ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 240, 241, 242, 243, ++ 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, ++ 260, 261, 262, 263, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, ++ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 284, 285, 286, 287, 288, 289, ++ 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, ++ 306, 307, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, ++ 321, 322, 323, 324, 325, 326, 327, 328, 328, 329, 330, 331, 332, 333, 334, 335, ++ 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 349, 350, ++ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, ++ 367, 368, 369, 370, 371, 372, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, ++ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 393, 394, 395, 396, ++ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, ++ 413, 414, 415, 416, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, ++ 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 437, 438, 439, 440, 441, 442, ++ 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, ++ 459, 460, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, ++ 474, 475, 476, 477, 478, 479, 480, 481, 481, 482, 483, 484, 485, 486, 487, 488, ++ 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 502, 503, ++ 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, ++ 520, 521, 522, 523, 524, 525, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, ++ 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 546, 547, 548, 549, ++ 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, ++ 566, 567, 568, 569, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, ++ 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 590, 591, 592, 593, 594, 595, ++ 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, ++ 612, 613, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, ++ 627, 628, 629, 630, 631, 632, 633, 634, 634, 635, 636, 637, 638, 639, 640, 641, ++ 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 655, 656, ++ 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, ++ 673, 674, 675, 676, 677, 678, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, ++ 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 699, 700, 701, 702, ++ 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, ++ 719, 720, 721, 722, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, ++ 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 743, 744, 745, 746, 747, 748, ++ 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, ++ 765, 766, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, ++ 780, 781, 782, 783, 784, 785, 786, 787, 787, 788, 789, 790, 791, 792, 793, 794, ++ 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 808, 809, ++ 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, ++ 826, 827, 828, 829, 830, 831, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840, ++ 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 852, 853, 854, 855, ++ 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, ++ 872, 873, 874, 875, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, ++ 887, 888, 889, 890, 891, 892, 893, 894, 895, 896, 896, 897, 898, 899, 900, 901, ++ 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914, 915, 916, 917, ++ 918, 919, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, ++ 933, 934, 935, 936, 937, 938, 939, 940, 940, 941, 942, 943, 944, 945, 946, 947, ++ 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 961, 962, ++ 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, ++ 979, 980, 981, 982, 983, 984, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, ++ 994, 995, 996, 997, 998, 999,1000,1001,1002,1003,1004,1005,1005,1006,1007,1008, ++ 1009,1010,1011,1012,1013,1014,1015,1016,1017,1018,1019,1020,1021,1022,1023,1024, ++ 1025,1026,1027,1028,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039, ++ 1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1049,1050,1051,1052,1053,1054, ++ 1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070, ++ 1071,1072,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085, ++ 1086,1087,1088,1089,1090,1091,1092,1093,1093,1094,1095,1096,1097,1098,1099,1100, ++ 1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1114,1115, ++ 1116,1117,1118,1119,1120,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130,1131, ++ 1132,1133,1134,1135,1136,1137,1137,1138,1139,1140,1141,1142,1143,1144,1145,1146, ++ 1147,1148,1149,1150,1151,1152,1153,1154,1155,1156,1157,1158,1158,1159,1160,1161, ++ 1162,1163,1164,1165,1166,1167,1168,1169,1170,1171,1172,1173,1174,1175,1176,1177, ++ 1178,1179,1180,1181,1181,1182,1183,1184,1185,1186,1187,1188,1189,1190,1191,1192, ++ 1193,1194,1195,1196,1197,1198,1199,1200,1201,1202,1202,1203,1204,1205,1206,1207, ++ 1208,1209,1210,1211,1212,1213,1214,1215,1216,1217,1218,1219,1220,1221,1222,1223, ++ 1224,1225,1225,1226,1227,1228,1229,1230,1231,1232,1233,1234,1235,1236,1237,1238, ++ 1239,1240,1241,1242,1243,1244,1245,1246,1246,1247,1248,1249,1250,1251,1252,1253, ++ 1254,1255,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1267,1268, ++ 1269,1270,1271,1272,1273,1274,1275,1276,1277,1278,1279,1280,1281,1282,1283,1284, ++ 1285,1286,1287,1288,1289,1290,1290,1291,1292,1293,1294,1295,1296,1297,1298,1299, ++ 1300,1301,1302,1303,1304,1305,1306,1307,1308,1309,1310,1311,1311,1312,1313,1314, ++ 1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330, ++ 1331,1332,1333,1334,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345, ++ 1346,1347,1348,1349,1350,1351,1352,1353,1354,1355,1355,1356,1357,1358,1359,1360, ++ 1361,1362,1363,1364,1365,1366,1367,1368,1369,1370,1371,1372,1373,1374,1375,1376, ++ 1377,1378,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387,1388,1389,1390,1391, ++ 1392,1393,1394,1395,1396,1397,1398,1399,1399,1400,1401,1402,1403,1404,1405,1406, ++ 1407,1408,1409,1410,1411,1412,1413,1414,1415,1416,1417,1418,1419,1420,1420,1421, ++ 1422,1423,1424,1425,1426,1427,1428,1429,1430,1431,1432,1433,1434,1435,1436,1437, ++ 1438,1439,1440,1441,1442,1443,1443,1444,1445,1446,1447,1448,1449,1450,1451,1452, ++ 1453,1454,1455,1456,1457,1458,1459,1460,1461,1462,1463,1464,1464,1465,1466,1467, ++ 1468,1469,1470,1471,1472,1473,1474,1475,1476,1477,1478,1479,1480,1481,1482,1483, ++ 1484,1485,1486,1487,1487,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498, ++ 1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1508,1509,1510,1511,1512,1513, ++ 1514,1515,1516,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529, ++ 1530,1531,1531,1532,1533,1534,1535,1536,1537,1538,1539,1540,1541,1542,1543,1544, ++ 1545,1546,1547,1548,1549,1550,1551,1552,1552,1553,1554,1555,1556,1557,1558,1559, ++ 1560,1561,1562,1563,1564,1565,1566,1567,1568,1569,1570,1571,1572,1573,1573,1574, ++ 1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590, ++ 1591,1592,1593,1594,1595,1596,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605, ++ 1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1617,1618,1619,1620, ++ 1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636, ++ 1637,1638,1639,1640,1640,1641,1642,1643,1644,1645,1646,1647,1648,1649,1650,1651, ++ 1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1661,1662,1663,1664,1665,1666, ++ 1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682, ++ 1683,1684,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697, ++ 1698,1699,1700,1701,1702,1703,1704,1705,1705,1706,1707,1708,1709,1710,1711,1712, ++ 1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1726,1727, ++ 1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743, ++ 1744,1745,1746,1747,1748,1749,1749,1750,1751,1752,1753,1754,1755,1756,1757,1758, ++ 1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1770,1771,1772,1773, ++ 1774,1775,1776,1777,1778,1779,1780,1781,1782,1783,1784,1785,1786,1787,1788,1789, ++ 1790,1791,1792,1793,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804, ++ 1805,1806,1807,1808,1809,1810,1811,1812,1813,1814,1814,1815,1816,1817,1818,1819, ++ 1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835, ++ 1836,1837,1837,1838,1839,1840,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850, ++ 1851,1852,1853,1854,1855,1856,1857,1858,1858,1859,1860,1861,1862,1863,1864,1865, ++ 1866,1867,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1879,1880, ++ 1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896, ++ 1897,1898,1899,1900,1901,1902,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911, ++ 1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1923,1924,1925,1926, ++ 1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942, ++ 1943,1944,1945,1946,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957, ++ 1958,1959,1960,1961,1962,1963,1964,1965,1966,1967,1967,1968,1969,1970,1971,1972, ++ 1973,1974,1975,1976,1977,1978,1979,1980,1981,1982,1983,1984,1985,1986,1987,1988, ++ 1989,1990,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003, ++ 2004,2005,2006,2007,2008,2009,2010,2011,2011,2012,2013,2014,2015,2016,2017,2018, ++ 2019,2020,2021,2022,2023,2024,2025,2026,2027,2028,2029,2030,2031,2032,2032,2033, ++ 2034,2035,2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049, ++ 2050,2051,2052,2053,2054,2055,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064, ++ 2065,2066,2067,2068,2069,2070,2071,2072,2073,2074,2075,2076,2076,2077,2078,2079, ++ 2080,2081,2082,2083,2084,2085,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095, ++ 2096,2097,2098,2099,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110, ++ 2111,2112,2113,2114,2115,2116,2117,2118,2119,2120,2120,2121,2122,2123,2124,2125, ++ 2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2137,2138,2139,2140,2141, ++ 2142,2143,2143,2144,2145,2146,2147,2148,2149,2150,2151,2152,2153,2154,2155,2156, ++ 2157,2158,2159,2160,2161,2162,2163,2164,2164,2165,2166,2167,2168,2169,2170,2171, ++ 2172,2173,2174,2175,2176,2177,2178,2179,2180,2181,2182,2183,2184,2185,2185,2186, ++ 2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202, ++ 2203,2204,2205,2206,2207,2208,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217, ++ 2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2229,2230,2231,2232, ++ 2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248, ++ 2249,2250,2251,2252,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263, ++ 2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2273,2274,2275,2276,2277,2278, ++ 2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294, ++ 2295,2296,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309, ++ 2310,2311,2312,2313,2314,2315,2316,2317,2317,2318,2319,2320,2321,2322,2323,2324, ++ 2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2338,2339, ++ 2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355, ++ 2356,2357,2358,2359,2360,2361,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370, ++ 2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2382,2383,2384,2385, ++ 2386,2387,2388,2389,2390,2391,2392,2393,2394,2395,2396,2397,2398,2399,2400,2401, ++ 2402,2403,2404,2405,2405,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416, ++ 2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2426,2427,2428,2429,2430,2431, ++ 2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447, ++ 2448,2449,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462, ++ 2463,2464,2465,2466,2467,2468,2469,2470,2470,2471,2472,2473,2474,2475,2476,2477, ++ 2478,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2489,2490,2491,2491,2492, ++ 2493,2494,2495,2496,2497,2498,2499,2500,2501,2502,2503,2504,2505,2506,2507,2508, ++ 2509,2510,2511,2512,2513,2514,2514,2515,2516,2517,2518,2519,2520,2521,2522,2523, ++ 2524,2525,2526,2527,2528,2529,2530,2531,2532,2533,2534,2535,2535,2536,2537,2538, ++ 2539,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553,2554, ++ 2555,2556,2557,2558,2558,2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569, ++ 2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2579,2580,2581,2582,2583,2584, ++ 2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600, ++ 2601,2602,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615, ++ 2616,2617,2618,2619,2620,2621,2622,2623,2623,2624,2625,2626,2627,2628,2629,2630, ++ 2631,2632,2633,2634,2635,2636,2637,2638,2639,2640,2641,2642,2643,2644,2644,2645, ++ 2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2658,2659,2660,2661, ++ 2662,2663,2664,2665,2666,2667,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676, ++ 2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2688,2689,2690,2691, ++ 2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707, ++ 2708,2709,2710,2711,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722, ++ 2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2732,2733,2734,2735,2736,2737, ++ 2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753, ++ 2754,2755,2755,2756,2757,2758,2759,2760,2761,2762,2763,2764,2765,2766,2767,2768, ++ 2769,2770,2771,2772,2773,2774,2775,2776,2776,2777,2778,2779,2780,2781,2782,2783, ++ 2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2797,2798, ++ 2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814, ++ 2815,2816,2817,2818,2819,2820,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829, ++ 2830,2831,2832,2833,2834,2835,2836,2837,2838,2839,2840,2841,2841,2842,2843,2844, ++ 2845,2846,2847,2848,2849,2850,2851,2852,2853,2854,2855,2856,2857,2858,2859,2860, ++ 2861,2862,2863,2864,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2874,2875, ++ 2876,2877,2878,2879,2880,2881,2882,2883,2884,2885,2885,2886,2887,2888,2889,2890, ++ 2891,2892,2893,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906, ++ 2907,2908,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921, ++ 2922,2923,2924,2925,2926,2927,2928,2929,2929,2930,2931,2932,2933,2934,2935,2936, ++ 2937,2938,2939,2940,2941,2942,2943,2944,2945,2946,2947,2948,2949,2950,2950,2951, ++ 2952,2953,2954,2955,2956,2957,2958,2959,2960,2961,2962,2963,2964,2965,2966,2967, ++ 2968,2969,2970,2971,2972,2973,2973,2974,2975,2976,2977,2978,2979,2980,2981,2982, ++ 2983,2984,2985,2986,2987,2988,2989,2990,2991,2992,2993,2994,2994,2995,2996,2997, ++ 2998,2999,3000,3001,3002,3003,3004,3005,3006,3007,3008,3009,3010,3011,3012,3013, ++ 3014,3015,3016,3017,3017,3018,3019,3020,3021,3022,3023,3024,3025,3026,3027,3028, ++ 3029,3030,3031,3032,3033,3034,3035,3036,3037,3038,3038,3039,3040,3041,3042,3043, ++ 3044,3045,3046,3047,3048,3049,3050,3051,3052,3053,3054,3055,3056,3057,3058,3059, ++ 3060,3061,3061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,3072,3073,3074, ++ 3075,3076,3077,3078,3079,3080,3081,3082,3082,3083,3084,3085,3086,3087,3088,3089, ++ 3090,3091,3092,3093,3094,3095,3096,3097,3098,3099,3100,3101,3102,3103,3103,3104, ++ 3105,3106,3107,3108,3109,3110,3111,3112,3113,3114,3115,3116,3117,3118,3119,3120, ++ 3121,3122,3123,3124,3125,3126,3126,3127,3128,3129,3130,3131,3132,3133,3134,3135, ++ 3136,3137,3138,3139,3140,3141,3142,3143,3144,3145,3146,3147,3147,3148,3149,3150, ++ 3151,3152,3153,3154,3155,3156,3157,3158,3159,3160,3161,3162,3163,3164,3165,3166, ++ 3167,3168,3169,3170,3170,3171,3172,3173,3174,3175,3176,3177,3178,3179,3180,3181, ++ 3182,3183,3184,3185,3186,3187,3188,3189,3190,3191,3191,3192,3193,3194,3195,3196, ++ 3197,3198,3199,3200,3201,3202,3203,3204,3205,3206,3207,3208,3209,3210,3211,3212, ++ 3213,3214,3214,3215,3216,3217,3218,3219,3220,3221,3222,3223,3224,3225,3226,3227, ++ 3228,3229,3230,3231,3232,3233,3234,3235,3235,3236,3237,3238,3239,3240,3241,3242, ++ 3243,3244,3245,3246,3247,3248,3249,3250,3251,3252,3253,3254,3255,3256,3256,3257, ++ 3258,3259,3260,3261,3262,3263,3264,3265,3266,3267,3268,3269,3270,3271,3272,3273, ++ 3274,3275,3276,3277,3278,3279,3279,3280,3281,3282,3283,3284,3285,3286,3287,3288, ++ 3289,3290,3291,3292,3293,3294,3295,3296,3297,3298,3299,3300,3300,3301,3302,3303, ++ 3304,3305,3306,3307,3308,3309,3310,3311,3312,3313,3314,3315,3316,3317,3318,3319, ++ 3320,3321,3322,3323,3323,3324,3325,3326,3327,3328,3329,3330,3331,3332,3333,3334, ++ 3335,3336,3337,3338,3339,3340,3341,3342,3343,3344,3344,3345,3346,3347,3348,3349, ++ 3350,3351,3352,3353,3354,3355,3356,3357,3358,3359,3360,3361,3362,3363,3364,3365, ++ 3366,3367,3367,3368,3369,3370,3371,3372,3373,3374,3375,3376,3377,3378,3379,3380, ++ 3381,3382,3383,3384,3385,3386,3387,3388,3388,3389,3390,3391,3392,3393,3394,3395, ++ 3396,3397,3398,3399,3400,3401,3402,3403,3404,3405,3406,3407,3408,3409,3409,3410, ++ 3411,3412,3413,3414,3415,3416,3417,3418,3419,3420,3421,3422,3423,3424,3425,3426, ++ 3427,3428,3429,3430,3431,3432,3432,3433,3434,3435,3436,3437,3438,3439,3440,3441, ++ 3442,3443,3444,3445,3446,3447,3448,3449,3450,3451,3452,3453,3453,3454,3455,3456, ++ 3457,3458,3459,3460,3461,3462,3463,3464,3465,3466,3467,3468,3469,3470,3471,3472, ++ 3473,3474,3475,3476,3476,3477,3478,3479,3480,3481,3482,3483,3484,3485,3486,3487, ++ 3488,3489,3490,3491,3492,3493,3494,3495,3496,3497,3497,3498,3499,3500,3501,3502, ++ 3503,3504,3505,3506,3507,3508,3509,3510,3511,3512,3513,3514,3515,3516,3517,3518, ++ 3519,3520,3520,3521,3522,3523,3524,3525,3526,3527,3528,3529,3530,3531,3532,3533, ++ 3534,3535,3536,3537,3538,3539,3540,3541,3541,3542,3543,3544,3545,3546,3547,3548, ++ 3549,3550,3551,3552,3553,3554,3555,3556,3557,3558,3559,3560,3561,3562,3562,3563, ++ 3564,3565,3566,3567,3568,3569,3570,3571,3572,3573,3574,3575,3576,3577,3578,3579, ++ 3580,3581,3582,3583,3584,3585,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594, ++ 3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3606,3607,3608,3609, ++ 3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625, ++ 3626,3627,3628,3629,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640, ++ 3641,3642,3643,3644,3645,3646,3647,3648,3649,3650,3650,3651,3652,3653,3654,3655, ++ 3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671, ++ 3672,3673,3673,3674,3675,3676,3677,3678,3679,3680,3681,3682,3683,3684,3685,3686, ++ 3687,3688,3689,3690,3691,3692,3693,3694,3694,3695,3696,3697,3698,3699,3700,3701, ++ 3702,3703,3704,3705,3706,3707,3708,3709,3710,3711,3712,3713,3714,3715,3715,3716, ++ 3717,3718,3719,3720,3721,3722,3723,3724,3725,3726,3727,3728,3729,3730,3731,3732, ++ 3733,3734,3735,3736,3737,3738,3738,3739,3740,3741,3742,3743,3744,3745,3746,3747, ++ 3748,3749,3750,3751,3752,3753,3754,3755,3756,3757,3758,3759,3759,3760,3761,3762, ++ 3763,3764,3765,3766,3767,3768,3769,3770,3771,3772,3773,3774,3775,3776,3777,3778, ++ 3779,3780,3781,3782,3782,3783,3784,3785,3786,3787,3788,3789,3790,3791,3792,3793, ++ 3794,3795,3796,3797,3798,3799,3800,3801,3802,3803,3803,3804,3805,3806,3807,3808, ++ 3809,3810,3811,3812,3813,3814,3815,3816,3817,3818,3819,3820,3821,3822,3823,3824, ++ 3825,3826,3826,3827,3828,3829,3830,3831,3832,3833,3834,3835,3836,3837,3838,3839, ++ 3840,3841,3842,3843,3844,3845,3846,3847,3847,3848,3849,3850,3851,3852,3853,3854, ++ 3855,3856,3857,3858,3859,3860,3861,3862,3863,3864,3865,3866,3867,3868,3868,3869, ++ 3870,3871,3872,3873,3874,3875,3876,3877,3878,3879,3880,3881,3882,3883,3884,3885, ++ 3886,3887,3888,3889,3890,3891,3891,3892,3893,3894,3895,3896,3897,3898,3899,3900, ++ 3901,3902,3903,3904,3905,3906,3907,3908,3909,3910,3911,3912,3912,3913,3914,3915 ++ }; ++ ++ ++ static short HIF_TABLE[4096]={ ++ 0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, ++ 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 34, 35, 36, ++ 37, 38, 39, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, ++ 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 68, 69, 70, 71, 72, 74, ++ 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 92, ++ 93, 95, 96, 97, 98, 99, 101, 102, 103, 104, 105, 106, 108, 109, 110, 111, ++ 112, 113, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 128, 129, 130, ++ 131, 132, 133, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 148, 149, ++ 150, 151, 152, 153, 155, 156, 157, 158, 159, 160, 162, 163, 164, 165, 166, 168, ++ 169, 170, 171, 172, 173, 175, 176, 177, 178, 179, 180, 182, 183, 184, 185, 186, ++ 187, 189, 190, 191, 192, 193, 195, 196, 197, 198, 199, 200, 202, 203, 204, 205, ++ 206, 207, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 220, 222, 223, 224, ++ 225, 226, 227, 229, 230, 231, 232, 233, 234, 236, 237, 238, 239, 240, 242, 243, ++ 244, 245, 246, 247, 249, 250, 251, 252, 253, 254, 256, 257, 258, 259, 260, 262, ++ 263, 264, 265, 266, 267, 269, 270, 271, 272, 273, 274, 276, 277, 278, 279, 280, ++ 281, 283, 284, 285, 286, 287, 289, 290, 291, 292, 293, 294, 296, 297, 298, 299, ++ 300, 301, 303, 304, 305, 306, 307, 309, 310, 311, 312, 313, 314, 316, 317, 318, ++ 319, 320, 321, 323, 324, 325, 326, 327, 328, 330, 331, 332, 333, 334, 336, 337, ++ 338, 339, 340, 341, 343, 344, 345, 346, 347, 348, 350, 351, 352, 353, 354, 356, ++ 357, 358, 359, 360, 361, 363, 364, 365, 366, 367, 368, 370, 371, 372, 373, 374, ++ 375, 377, 378, 379, 380, 381, 383, 384, 385, 386, 387, 388, 390, 391, 392, 393, ++ 394, 395, 397, 398, 399, 400, 401, 403, 404, 405, 406, 407, 408, 410, 411, 412, ++ 413, 414, 415, 417, 418, 419, 420, 421, 422, 424, 425, 426, 427, 428, 430, 431, ++ 432, 433, 434, 435, 437, 438, 439, 440, 441, 442, 444, 445, 446, 447, 448, 450, ++ 451, 452, 453, 454, 455, 457, 458, 459, 460, 461, 462, 464, 465, 466, 467, 468, ++ 469, 471, 472, 473, 474, 475, 477, 478, 479, 480, 481, 482, 484, 485, 486, 487, ++ 488, 489, 491, 492, 493, 494, 495, 497, 498, 499, 500, 501, 502, 504, 505, 506, ++ 507, 508, 509, 511, 512, 513, 514, 515, 516, 518, 519, 520, 521, 522, 524, 525, ++ 526, 527, 528, 529, 531, 532, 533, 534, 535, 536, 538, 539, 540, 541, 542, 544, ++ 545, 546, 547, 548, 549, 551, 552, 553, 554, 555, 556, 558, 559, 560, 561, 562, ++ 563, 565, 566, 567, 568, 569, 571, 572, 573, 574, 575, 576, 578, 579, 580, 581, ++ 582, 583, 585, 586, 587, 588, 589, 591, 592, 593, 594, 595, 596, 598, 599, 600, ++ 601, 602, 603, 605, 606, 607, 608, 609, 610, 612, 613, 614, 615, 616, 618, 619, ++ 620, 621, 622, 623, 625, 626, 627, 628, 629, 630, 632, 633, 634, 635, 636, 638, ++ 639, 640, 641, 642, 643, 645, 646, 647, 648, 649, 650, 652, 653, 654, 655, 656, ++ 657, 659, 660, 661, 662, 663, 665, 666, 667, 668, 669, 670, 672, 673, 674, 675, ++ 676, 677, 679, 680, 681, 682, 683, 685, 686, 687, 688, 689, 690, 692, 693, 694, ++ 695, 696, 697, 699, 700, 701, 702, 703, 704, 706, 707, 708, 709, 710, 712, 713, ++ 714, 715, 716, 717, 719, 720, 721, 722, 723, 724, 726, 727, 728, 729, 730, 732, ++ 733, 734, 735, 736, 737, 739, 740, 741, 742, 743, 744, 746, 747, 748, 749, 750, ++ 751, 753, 754, 755, 756, 757, 759, 760, 761, 762, 763, 764, 766, 767, 768, 769, ++ 770, 771, 773, 774, 775, 776, 777, 779, 780, 781, 782, 783, 784, 786, 787, 788, ++ 789, 790, 791, 793, 794, 795, 796, 797, 798, 800, 801, 802, 803, 804, 806, 807, ++ 808, 809, 810, 811, 813, 814, 815, 816, 817, 818, 820, 821, 822, 823, 824, 826, ++ 827, 828, 829, 830, 831, 833, 834, 835, 836, 837, 838, 840, 841, 842, 843, 844, ++ 845, 847, 848, 849, 850, 851, 853, 854, 855, 856, 857, 858, 860, 861, 862, 863, ++ 864, 865, 867, 868, 869, 870, 871, 873, 874, 875, 876, 877, 878, 880, 881, 882, ++ 883, 884, 885, 887, 888, 889, 890, 891, 892, 894, 895, 896, 897, 898, 900, 901, ++ 902, 903, 904, 905, 907, 908, 909, 910, 911, 912, 914, 915, 916, 917, 918, 920, ++ 921, 922, 923, 924, 925, 927, 928, 929, 930, 931, 932, 934, 935, 936, 937, 938, ++ 939, 941, 942, 943, 944, 945, 947, 948, 949, 950, 951, 952, 954, 955, 956, 957, ++ 958, 959, 961, 962, 963, 964, 965, 967, 968, 969, 970, 971, 972, 974, 975, 976, ++ 977, 978, 979, 981, 982, 983, 984, 985, 986, 988, 989, 990, 991, 992, 994, 995, ++ 996, 997, 998, 999,1001,1002,1003,1004,1005,1006,1008,1009,1010,1011,1012,1014, ++ 1015,1016,1017,1018,1019,1021,1022,1023,1024,1025,1026,1028,1029,1030,1031,1032, ++ 1033,1035,1036,1037,1038,1039,1041,1042,1043,1044,1045,1046,1048,1049,1050,1051, ++ 1052,1053,1055,1056,1057,1058,1059,1061,1062,1063,1064,1065,1066,1068,1069,1070, ++ 1071,1072,1073,1075,1076,1077,1078,1079,1080,1082,1083,1084,1085,1086,1088,1089, ++ 1090,1091,1092,1093,1095,1096,1097,1098,1099,1100,1102,1103,1104,1105,1106,1108, ++ 1109,1110,1111,1112,1113,1115,1116,1117,1118,1119,1120,1122,1123,1124,1125,1126, ++ 1127,1129,1130,1131,1132,1133,1135,1136,1137,1138,1139,1140,1142,1143,1144,1145, ++ 1146,1147,1149,1150,1151,1152,1153,1155,1156,1157,1158,1159,1160,1162,1163,1164, ++ 1165,1166,1167,1169,1170,1171,1172,1173,1174,1176,1177,1178,1179,1180,1182,1183, ++ 1184,1185,1186,1187,1189,1190,1191,1192,1193,1194,1196,1197,1198,1199,1200,1202, ++ 1203,1204,1205,1206,1207,1209,1210,1211,1212,1213,1214,1216,1217,1218,1219,1220, ++ 1221,1223,1224,1225,1226,1227,1229,1230,1231,1232,1233,1234,1236,1237,1238,1239, ++ 1240,1241,1243,1244,1245,1246,1247,1249,1250,1251,1252,1253,1254,1256,1257,1258, ++ 1259,1260,1261,1263,1264,1265,1266,1267,1268,1270,1271,1272,1273,1274,1276,1277, ++ 1278,1279,1280,1281,1283,1284,1285,1286,1287,1288,1290,1291,1292,1293,1294,1296, ++ 1297,1298,1299,1300,1301,1303,1304,1305,1306,1307,1308,1310,1311,1312,1313,1314, ++ 1315,1317,1318,1319,1320,1321,1323,1324,1325,1326,1327,1328,1330,1331,1332,1333, ++ 1334,1335,1337,1338,1339,1340,1341,1343,1344,1345,1346,1347,1348,1350,1351,1352, ++ 1353,1354,1355,1357,1358,1359,1360,1361,1362,1364,1365,1366,1367,1368,1370,1371, ++ 1372,1373,1374,1375,1377,1378,1379,1380,1381,1382,1384,1385,1386,1387,1388,1390, ++ 1391,1392,1393,1394,1395,1397,1398,1399,1400,1401,1402,1404,1405,1406,1407,1408, ++ 1409,1411,1412,1413,1414,1415,1417,1418,1419,1420,1421,1422,1424,1425,1426,1427, ++ 1428,1429,1431,1432,1433,1434,1435,1437,1438,1439,1440,1441,1442,1444,1445,1446, ++ 1447,1448,1449,1451,1452,1453,1454,1455,1456,1458,1459,1460,1461,1462,1464,1465, ++ 1466,1467,1468,1469,1471,1472,1473,1474,1475,1476,1478,1479,1480,1481,1482,1484, ++ 1485,1486,1487,1488,1489,1491,1492,1493,1494,1495,1496,1498,1499,1500,1501,1502, ++ 1503,1505,1506,1507,1508,1509,1511,1512,1513,1514,1515,1516,1518,1519,1520,1521, ++ 1522,1523,1525,1526,1527,1528,1529,1531,1532,1533,1534,1535,1536,1538,1539,1540, ++ 1541,1542,1543,1545,1546,1547,1548,1549,1550,1552,1553,1554,1555,1556,1558,1559, ++ 1560,1561,1562,1563,1565,1566,1567,1568,1569,1570,1572,1573,1574,1575,1576,1578, ++ 1579,1580,1581,1582,1583,1585,1586,1587,1588,1589,1590,1592,1593,1594,1595,1596, ++ 1597,1599,1600,1601,1602,1603,1605,1606,1607,1608,1609,1610,1612,1613,1614,1615, ++ 1616,1617,1619,1620,1621,1622,1623,1625,1626,1627,1628,1629,1630,1632,1633,1634, ++ 1635,1636,1637,1639,1640,1641,1642,1643,1644,1646,1647,1648,1649,1650,1652,1653, ++ 1654,1655,1656,1657,1659,1660,1661,1662,1663,1664,1666,1667,1668,1669,1670,1672, ++ 1673,1674,1675,1676,1677,1679,1680,1681,1682,1683,1684,1686,1687,1688,1689,1690, ++ 1691,1693,1694,1695,1696,1697,1699,1700,1701,1702,1703,1704,1706,1707,1708,1709, ++ 1710,1711,1713,1714,1715,1716,1717,1719,1720,1721,1722,1723,1724,1726,1727,1728, ++ 1729,1730,1731,1733,1734,1735,1736,1737,1738,1740,1741,1742,1743,1744,1746,1747, ++ 1748,1749,1750,1751,1753,1754,1755,1756,1757,1758,1760,1761,1762,1763,1764,1766, ++ 1767,1768,1769,1770,1771,1773,1774,1775,1776,1777,1778,1780,1781,1782,1783,1784, ++ 1785,1787,1788,1789,1790,1791,1793,1794,1795,1796,1797,1798,1800,1801,1802,1803, ++ 1804,1805,1807,1808,1809,1810,1811,1813,1814,1815,1816,1817,1818,1820,1821,1822, ++ 1823,1824,1825,1827,1828,1829,1830,1831,1832,1834,1835,1836,1837,1838,1840,1841, ++ 1842,1843,1844,1845,1847,1848,1849,1850,1851,1852,1854,1855,1856,1857,1858,1860, ++ 1861,1862,1863,1864,1865,1867,1868,1869,1870,1871,1872,1874,1875,1876,1877,1878, ++ 1879,1881,1882,1883,1884,1885,1887,1888,1889,1890,1891,1892,1894,1895,1896,1897, ++ 1898,1899,1901,1902,1903,1904,1905,1907,1908,1909,1910,1911,1912,1914,1915,1916, ++ 1917,1918,1919,1921,1922,1923,1924,1925,1926,1928,1929,1930,1931,1932,1934,1935, ++ 1936,1937,1938,1939,1941,1942,1943,1944,1945,1946,1948,1949,1950,1951,1952,1954, ++ 1955,1956,1957,1958,1959,1961,1962,1963,1964,1965,1966,1968,1969,1970,1971,1972, ++ 1973,1975,1976,1977,1978,1979,1981,1982,1983,1984,1985,1986,1988,1989,1990,1991, ++ 1992,1993,1995,1996,1997,1998,1999,2001,2002,2003,2004,2005,2006,2008,2009,2010, ++ 2011,2012,2013,2015,2016,2017,2018,2019,2020,2022,2023,2024,2025,2026,2028,2029, ++ 2030,2031,2032,2033,2035,2036,2037,2038,2039,2040,2042,2043,2044,2045,2046,2048, ++ 2049,2050,2051,2052,2053,2055,2056,2057,2058,2059,2060,2062,2063,2064,2065,2066, ++ 2067,2069,2070,2071,2072,2073,2075,2076,2077,2078,2079,2080,2082,2083,2084,2085, ++ 2086,2087,2089,2090,2091,2092,2093,2095,2096,2097,2098,2099,2100,2102,2103,2104, ++ 2105,2106,2107,2109,2110,2111,2112,2113,2114,2116,2117,2118,2119,2120,2122,2123, ++ 2124,2125,2126,2127,2129,2130,2131,2132,2133,2134,2136,2137,2138,2139,2140,2142, ++ 2143,2144,2145,2146,2147,2149,2150,2151,2152,2153,2154,2156,2157,2158,2159,2160, ++ 2161,2163,2164,2165,2166,2167,2169,2170,2171,2172,2173,2174,2176,2177,2178,2179, ++ 2180,2181,2183,2184,2185,2186,2187,2189,2190,2191,2192,2193,2194,2196,2197,2198, ++ 2199,2200,2201,2203,2204,2205,2206,2207,2208,2210,2211,2212,2213,2214,2216,2217, ++ 2218,2219,2220,2221,2223,2224,2225,2226,2227,2228,2230,2231,2232,2233,2234,2236, ++ 2237,2238,2239,2240,2241,2243,2244,2245,2246,2247,2248,2250,2251,2252,2253,2254, ++ 2255,2257,2258,2259,2260,2261,2263,2264,2265,2266,2267,2268,2270,2271,2272,2273, ++ 2274,2275,2277,2278,2279,2280,2281,2283,2284,2285,2286,2287,2288,2290,2291,2292, ++ 2293,2294,2295,2297,2298,2299,2300,2301,2302,2304,2305,2306,2307,2308,2310,2311, ++ 2312,2313,2314,2315,2317,2318,2319,2320,2321,2322,2324,2325,2326,2327,2328,2330, ++ 2331,2332,2333,2334,2335,2337,2338,2339,2340,2341,2342,2344,2345,2346,2347,2348, ++ 2349,2351,2352,2353,2354,2355,2357,2358,2359,2360,2361,2362,2364,2365,2366,2367, ++ 2368,2369,2371,2372,2373,2374,2375,2377,2378,2379,2380,2381,2382,2384,2385,2386, ++ 2387,2388,2389,2391,2392,2393,2394,2395,2396,2398,2399,2400,2401,2402,2404,2405, ++ 2406,2407,2408,2409,2411,2412,2413,2414,2415,2416,2418,2419,2420,2421,2422,2424, ++ 2425,2426,2427,2428,2429,2431,2432,2433,2434,2435,2436,2438,2439,2440,2441,2442, ++ 2443,2445,2446,2447,2448,2449,2451,2452,2453,2454,2455,2456,2458,2459,2460,2461, ++ 2462,2463,2465,2466,2467,2468,2469,2471,2472,2473,2474,2475,2476,2478,2479,2480, ++ 2481,2482,2483,2485,2486,2487,2488,2489,2490,2492,2493,2494,2495,2496,2498,2499, ++ 2500,2501,2502,2503,2505,2506,2507,2508,2509,2510,2512,2513,2514,2515,2516,2518, ++ 2519,2520,2521,2522,2523,2525,2526,2527,2528,2529,2530,2532,2533,2534,2535,2536, ++ 2537,2539,2540,2541,2542,2543,2545,2546,2547,2548,2549,2550,2552,2553,2554,2555, ++ 2556,2557,2559,2560,2561,2562,2563,2565,2566,2567,2568,2569,2570,2572,2573,2574, ++ 2575,2576,2577,2579,2580,2581,2582,2583,2584,2586,2587,2588,2589,2590,2592,2593, ++ 2594,2595,2596,2597,2599,2600,2601,2602,2603,2604,2606,2607,2608,2609,2610,2612, ++ 2613,2614,2615,2616,2617,2619,2620,2621,2622,2623,2624,2626,2627,2628,2629,2630, ++ 2631,2633,2634,2635,2636,2637,2639,2640,2641,2642,2643,2644,2646,2647,2648,2649, ++ 2650,2651,2653,2654,2655,2656,2657,2659,2660,2661,2662,2663,2664,2666,2667,2668, ++ 2669,2670,2671,2673,2674,2675,2676,2677,2678,2680,2681,2682,2683,2684,2686,2687, ++ 2688,2689,2690,2691,2693,2694,2695,2696,2697,2698,2700,2701,2702,2703,2704,2706, ++ 2707,2708,2709,2710,2711,2713,2714,2715,2716,2717,2718,2720,2721,2722,2723,2724, ++ 2725,2727,2728,2729,2730,2731,2733,2734,2735,2736,2737,2738,2740,2741,2742,2743, ++ 2744,2745,2747,2748,2749,2750,2751,2753,2754,2755,2756,2757,2758,2760,2761,2762, ++ 2763,2764,2765,2767,2768,2769,2770,2771,2772,2774,2775,2776,2777,2778,2780,2781, ++ 2782,2783,2784,2785,2787,2788,2789,2790,2791,2792,2794,2795,2796,2797,2798,2800, ++ 2801,2802,2803,2804,2805,2807,2808,2809,2810,2811,2812,2814,2815,2816,2817,2818, ++ 2819,2821,2822,2823,2824,2825,2827,2828,2829,2830,2831,2832,2834,2835,2836,2837, ++ 2838,2839,2841,2842,2843,2844,2845,2847,2848,2849,2850,2851,2852,2854,2855,2856, ++ 2857,2858,2859,2861,2862,2863,2864,2865,2866,2868,2869,2870,2871,2872,2874,2875, ++ 2876,2877,2878,2879,2881,2882,2883,2884,2885,2886,2888,2889,2890,2891,2892,2894, ++ 2895,2896,2897,2898,2899,2901,2902,2903,2904,2905,2906,2908,2909,2910,2911,2912, ++ 2913,2915,2916,2917,2918,2919,2921,2922,2923,2924,2925,2926,2928,2929,2930,2931, ++ 2932,2933,2935,2936,2937,2938,2939,2941,2942,2943,2944,2945,2946,2948,2949,2950, ++ 2951,2952,2953,2955,2956,2957,2958,2959,2960,2962,2963,2964,2965,2966,2968,2969, ++ 2970,2971,2972,2973,2975,2976,2977,2978,2979,2980,2982,2983,2984,2985,2986,2988, ++ 2989,2990,2991,2992,2993,2995,2996,2997,2998,2999,3000,3002,3003,3004,3005,3006, ++ 3007,3009,3010,3011,3012,3013,3015,3016,3017,3018,3019,3020,3022,3023,3024,3025, ++ 3026,3027,3029,3030,3031,3032,3033,3035,3036,3037,3038,3039,3040,3042,3043,3044, ++ 3045,3046,3047,3049,3050,3051,3052,3053,3054,3056,3057,3058,3059,3060,3062,3063, ++ 3064,3065,3066,3067,3069,3070,3071,3072,3073,3074,3076,3077,3078,3079,3080,3082, ++ 3083,3084,3085,3086,3087,3089,3090,3091,3092,3093,3094,3096,3097,3098,3099,3100, ++ 3101,3103,3104,3105,3106,3107,3109,3110,3111,3112,3113,3114,3116,3117,3118,3119, ++ 3120,3121,3123,3124,3125,3126,3127,3129,3130,3131,3132,3133,3134,3136,3137,3138, ++ 3139,3140,3141,3143,3144,3145,3146,3147,3148,3150,3151,3152,3153,3154,3156,3157, ++ 3158,3159,3160,3161,3163,3164,3165,3166,3167,3168,3170,3171,3172,3173,3174,3176, ++ 3177,3178,3179,3180,3181,3183,3184,3185,3186,3187,3188,3190,3191,3192,3193,3194, ++ 3195,3197,3198,3199,3200,3201,3203,3204,3205,3206,3207,3208,3210,3211,3212,3213, ++ 3214,3215,3217,3218,3219,3220,3221,3223,3224,3225,3226,3227,3228,3230,3231,3232, ++ 3233,3234,3235,3237,3238,3239,3240,3241,3242,3244,3245,3246,3247,3248,3250,3251, ++ 3252,3253,3254,3255,3257,3258,3259,3260,3261,3262,3264,3265,3266,3267,3268,3270, ++ 3271,3272,3273,3274,3275,3277,3278,3279,3280,3281,3282,3284,3285,3286,3287,3288, ++ 3289,3291,3292,3293,3294,3295,3297,3298,3299,3300,3301,3302,3304,3305,3306,3307, ++ 3308,3309,3311,3312,3313,3314,3315,3317,3318,3319,3320,3321,3322,3324,3325,3326, ++ 3327,3328,3329,3331,3332,3333,3334,3335,3336,3338,3339,3340,3341,3342,3344,3345, ++ 3346,3347,3348,3349,3351,3352,3353,3354,3355,3356,3358,3359,3360,3361,3362,3364, ++ 3365,3366,3367,3368,3369,3371,3372,3373,3374,3375,3376,3378,3379,3380,3381,3382, ++ 3383,3385,3386,3387,3388,3389,3391,3392,3393,3394,3395,3396,3398,3399,3400,3401, ++ 3402,3403,3405,3406,3407,3408,3409,3411,3412,3413,3414,3415,3416,3418,3419,3420, ++ 3421,3422,3423,3425,3426,3427,3428,3429,3430,3432,3433,3434,3435,3436,3438,3439, ++ 3440,3441,3442,3443,3445,3446,3447,3448,3449,3450,3452,3453,3454,3455,3456,3458, ++ 3459,3460,3461,3462,3463,3465,3466,3467,3468,3469,3470,3472,3473,3474,3475,3476, ++ 3477,3479,3480,3481,3482,3483,3485,3486,3487,3488,3489,3490,3492,3493,3494,3495, ++ 3496,3497,3499,3500,3501,3502,3503,3505,3506,3507,3508,3509,3510,3512,3513,3514, ++ 3515,3516,3517,3519,3520,3521,3522,3523,3524,3526,3527,3528,3529,3530,3532,3533, ++ 3534,3535,3536,3537,3539,3540,3541,3542,3543,3544,3546,3547,3548,3549,3550,3552, ++ 3553,3554,3555,3556,3557,3559,3560,3561,3562,3563,3564,3566,3567,3568,3569,3570, ++ 3571,3573,3574,3575,3576,3577,3579,3580,3581,3582,3583,3584,3586,3587,3588,3589, ++ 3590,3591,3593,3594,3595,3596,3597,3599,3600,3601,3602,3603,3604,3606,3607,3608, ++ 3609,3610,3611,3613,3614,3615,3616,3617,3618,3620,3621,3622,3623,3624,3626,3627, ++ 3628,3629,3630,3631,3633,3634,3635,3636,3637,3638,3640,3641,3642,3643,3644,3646, ++ 3647,3648,3649,3650,3651,3653,3654,3655,3656,3657,3658,3660,3661,3662,3663,3664, ++ 3665,3667,3668,3669,3670,3671,3673,3674,3675,3676,3677,3678,3680,3681,3682,3683, ++ 3684,3685,3687,3688,3689,3690,3691,3693,3694,3695,3696,3697,3698,3700,3701,3702, ++ 3703,3704,3705,3707,3708,3709,3710,3711,3712,3714,3715,3716,3717,3718,3720,3721, ++ 3722,3723,3724,3725,3727,3728,3729,3730,3731,3732,3734,3735,3736,3737,3738,3740, ++ 3741,3742,3743,3744,3745,3747,3748,3749,3750,3751,3752,3754,3755,3756,3757,3758, ++ 3759,3761,3762,3763,3764,3765,3767,3768,3769,3770,3771,3772,3774,3775,3776,3777, ++ 3778,3779,3781,3782,3783,3784,3785,3787,3788,3789,3790,3791,3792,3794,3795,3796, ++ 3797,3798,3799,3801,3802,3803,3804,3805,3806,3808,3809,3810,3811,3812,3814,3815, ++ 3816,3817,3818,3819,3821,3822,3823,3824,3825,3826,3828,3829,3830,3831,3832,3834, ++ 3835,3836,3837,3838,3839,3841,3842,3843,3844,3845,3846,3848,3849,3850,3851,3852, ++ 3853,3855,3856,3857,3858,3859,3861,3862,3863,3864,3865,3866,3868,3869,3870,3871, ++ 3872,3873,3875,3876,3877,3878,3879,3881,3882,3883,3884,3885,3886,3888,3889,3890, ++ 3891,3892,3893,3895,3896,3897,3898,3899,3900,3902,3903,3904,3905,3906,3908,3909, ++ 3910,3911,3912,3913,3915,3916,3917,3918,3919,3920,3922,3923,3924,3925,3926,3928, ++ 3929,3930,3931,3932,3933,3935,3936,3937,3938,3939,3940,3942,3943,3944,3945,3946, ++ 3947,3949,3950,3951,3952,3953,3955,3956,3957,3958,3959,3960,3962,3963,3964,3965, ++ 3966,3967,3969,3970,3971,3972,3973,3975,3976,3977,3978,3979,3980,3982,3983,3984, ++ 3985,3986,3987,3989,3990,3991,3992,3993,3994,3996,3997,3998,3999,4000,4002,4003, ++ 4004,4005,4006,4007,4009,4010,4011,4012,4013,4014,4016,4017,4018,4019,4020,4022, ++ 4023,4024,4025,4026,4027,4029,4030,4031,4032,4033,4034,4036,4037,4038,4039,4040, ++ 4041,4043,4044,4045,4046,4047,4049,4050,4051,4052,4053,4054,4056,4057,4058,4059, ++ 4060,4061,4063,4064,4065,4066,4067,4069,4070,4071,4072,4073,4074,4076,4077,4078, ++ 4079,4080,4081,4083,4084,4085,4086,4087,4088,4090,4091,4092,4093,4094,4096,4097, ++ 4098,4099,4100,4101,4103,4104,4105,4106,4107,4108,4110,4111,4112,4113,4114,4116, ++ 4117,4118,4119,4120,4121,4123,4124,4125,4126,4127,4128,4130,4131,4132,4133,4134, ++ 4135,4137,4138,4139,4140,4141,4143,4144,4145,4146,4147,4148,4150,4151,4152,4153, ++ 4154,4155,4157,4158,4159,4160,4161,4163,4164,4165,4166,4167,4168,4170,4171,4172, ++ 4173,4174,4175,4177,4178,4179,4180,4181,4182,4184,4185,4186,4187,4188,4190,4191, ++ 4192,4193,4194,4195,4197,4198,4199,4200,4201,4202,4204,4205,4206,4207,4208,4210, ++ 4211,4212,4213,4214,4215,4217,4218,4219,4220,4221,4222,4224,4225,4226,4227,4228, ++ 4229,4231,4232,4233,4234,4235,4237,4238,4239,4240,4241,4242,4244,4245,4246,4247, ++ 4248,4249,4251,4252,4253,4254,4255,4257,4258,4259,4260,4261,4262,4264,4265,4266, ++ 4267,4268,4269,4271,4272,4273,4274,4275,4276,4278,4279,4280,4281,4282,4284,4285, ++ 4286,4287,4288,4289,4291,4292,4293,4294,4295,4296,4298,4299,4300,4301,4302,4304, ++ 4305,4306,4307,4308,4309,4311,4312,4313,4314,4315,4316,4318,4319,4320,4321,4322, ++ 4323,4325,4326,4327,4328,4329,4331,4332,4333,4334,4335,4336,4338,4339,4340,4341, ++ 4342,4343,4345,4346,4347,4348,4349,4351,4352,4353,4354,4355,4356,4358,4359,4360, ++ 4361,4362,4363,4365,4366,4367,4368,4369,4370,4372,4373,4374,4375,4376,4378,4379, ++ 4380,4381,4382,4383,4385,4386,4387,4388,4389,4390,4392,4393,4394,4395,4396,4398, ++ 4399,4400,4401,4402,4403,4405,4406,4407,4408,4409,4410,4412,4413,4414,4415,4416, ++ 4417,4419,4420,4421,4422,4423,4425,4426,4427,4428,4429,4430,4432,4433,4434,4435, ++ 4436,4437,4439,4440,4441,4442,4443,4445,4446,4447,4448,4449,4450,4452,4453,4454, ++ 4455,4456,4457,4459,4460,4461,4462,4463,4464,4466,4467,4468,4469,4470,4472,4473, ++ 4474,4475,4476,4477,4479,4480,4481,4482,4483,4484,4486,4487,4488,4489,4490,4492, ++ 4493,4494,4495,4496,4497,4499,4500,4501,4502,4503,4504,4506,4507,4508,4509,4510, ++ 4511,4513,4514,4515,4516,4517,4519,4520,4521,4522,4523,4524,4526,4527,4528,4529, ++ 4530,4531,4533,4534,4535,4536,4537,4539,4540,4541,4542,4543,4544,4546,4547,4548, ++ 4549,4550,4551,4553,4554,4555,4556,4557,4558,4560,4561,4562,4563,4564,4566,4567, ++ 4568,4569,4570,4571,4573,4574,4575,4576,4577,4578,4580,4581,4582,4583,4584,4586, ++ 4587,4588,4589,4590,4591,4593,4594,4595,4596,4597,4598,4600,4601,4602,4603,4604, ++ 4605,4607,4608,4609,4610,4611,4613,4614,4615,4616,4617,4618,4620,4621,4622,4623, ++ 4624,4625,4627,4628,4629,4630,4631,4633,4634,4635,4636,4637,4638,4640,4641,4642, ++ 4643,4644,4645,4647,4648,4649,4650,4651,4652,4654,4655,4656,4657,4658,4660,4661, ++ 4662,4663,4664,4665,4667,4668,4669,4670,4671,4672,4674,4675,4676,4677,4678,4680, ++ 4681,4682,4683,4684,4685,4687,4688,4689,4690,4691,4692,4694,4695,4696,4697,4698, ++ 4699,4701,4702,4703,4704,4705,4707,4708,4709,4710,4711,4712,4714,4715,4716,4717, ++ 4718,4719,4721,4722,4723,4724,4725,4727,4728,4729,4730,4731,4732,4734,4735,4736, ++ 4737,4738,4739,4741,4742,4743,4744,4745,4746,4748,4749,4750,4751,4752,4754,4755, ++ 4756,4757,4758,4759,4761,4762,4763,4764,4765,4766,4768,4769,4770,4771,4772,4774, ++ 4775,4776,4777,4778,4779,4781,4782,4783,4784,4785,4786,4788,4789,4790,4791,4792, ++ 4793,4795,4796,4797,4798,4799,4801,4802,4803,4804,4805,4806,4808,4809,4810,4811 ++ }; +diff -crN libvorbis-1.2.0/lib/vorbisenc.c aotuv-b5.5_20080330/lib/vorbisenc.c +*** libvorbis-1.2.0/lib/vorbisenc.c Tue Jul 24 09:09:48 2007 +--- aotuv-b5.5_20080330/lib/vorbisenc.c Sun Mar 30 14:43:38 2008 +*************** +*** 370,380 **** + + static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block, + compandblock *in, double *x){ +! int i,is=s; +! double ds=s-is; + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; + + ds=x[is]*(1.-ds)+x[is+1]*ds; + is=(int)ds; + ds-=is; +--- 370,385 ---- + + static void vorbis_encode_compand_setup(vorbis_info *vi,double s,int block, + compandblock *in, double *x){ +! int i,is=s, ishcm, hcm_stop=5; // high compander limit +! double ds=s-is, dshcm; +! + codec_setup_info *ci=vi->codec_setup; + vorbis_info_psy *p=ci->psy_param[block]; ++ ++ /* the place was borrowed... */ ++ p->flacint=ds; + ++ /* interpolate the compander mapping */ + ds=x[is]*(1.-ds)+x[is+1]*ds; + is=(int)ds; + ds-=is; +*************** +*** 383,391 **** +--- 388,419 ---- + ds=1.; + } + ++ /* high compander setup */ ++ ishcm = is; ++ dshcm = ds+.3; ++ if(dshcm > 1.0){ ++ ishcm++; ++ dshcm=dshcm-1; ++ } ++ if(x[hcm_stop] < ((float)ishcm+dshcm)){ ++ ishcm = x[hcm_stop]; ++ dshcm = x[hcm_stop]-ishcm; ++ } ++ if(dshcm==0 && ishcm>0){ // the same ++ ishcm--; ++ dshcm=1.; ++ } ++ + /* interpolate the compander settings */ + for(i=0;inoisecompand[i]=in[is].data[i]*(1.-ds)+in[is+1].data[i]*ds; ++ /* interpolate the high compander settings */ ++ if(s < (float)hcm_stop){ ++ for(i=0;inoisecompand_high[i]=in[ishcm].data[i]*(1.-dshcm)+in[ishcm+1].data[i]*dshcm; ++ }else{ // disable high compander ++ for(i=0;inoisecompand_high[i]=0; ++ } + return; + } + diff -Nru /tmp/X5pbunHnbI/libvorbis-1.2.0.dfsg/debian/patches/series /tmp/d5SPXkh9Av/libvorbis-1.2.0.dfsg/debian/patches/series --- libvorbis-1.2.0.dfsg/debian/patches/series 2008-05-02 10:48:39.000000000 +0700 +++ libvorbis-1.2.0.dfsg/debian/patches/series 2008-05-02 10:48:40.000000000 +0700 @@ -1 +1,2 @@ +aotuvb5.5-libvorbis1.2.0.diff local-remove_nonfree_docs.diff diff -Nru /tmp/X5pbunHnbI/libvorbis-1.2.0.dfsg/debian/rules /tmp/d5SPXkh9Av/libvorbis-1.2.0.dfsg/debian/rules --- libvorbis-1.2.0.dfsg/debian/rules 2008-05-02 10:48:39.000000000 +0700 +++ libvorbis-1.2.0.dfsg/debian/rules 2008-05-02 10:48:40.000000000 +0700 @@ -101,7 +101,7 @@ dh_testdir dh_testroot dh_installchangelogs - dh_installdocs + dh_installdocs -A aoTuV_README-1st.txt aoTuV_technical.txt dh_installexamples dh_installmime dh_installman