[xiph-commits] r7001 - in branches/monty-vorbis-aotuv-branch: lib

xiphmont at dactyl.lonelymoon.com xiphmont
Mon Jul 5 14:23:48 PDT 2004


lib/modes vq
Message-ID: <20040705212348.7A7489AAAB at dactyl.lonelymoon.com>

Author: xiphmont
Date: Mon Jul  5 14:23:48 2004
New Revision: 7001

Added:
branches/monty-vorbis-aotuv-branch/vq/44c0m.vqs
branches/monty-vorbis-aotuv-branch/vq/44c1m.vqs
Modified:
branches/monty-vorbis-aotuv-branch/lib/codec_internal.h
branches/monty-vorbis-aotuv-branch/lib/mapping0.c
branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h
branches/monty-vorbis-aotuv-branch/lib/modes/residue_44.h
branches/monty-vorbis-aotuv-branch/lib/modes/residue_44u.h
branches/monty-vorbis-aotuv-branch/lib/modes/setup_32.h
branches/monty-vorbis-aotuv-branch/lib/modes/setup_44.h
branches/monty-vorbis-aotuv-branch/lib/modes/setup_44u.h
branches/monty-vorbis-aotuv-branch/lib/modes/setup_8.h
branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h
branches/monty-vorbis-aotuv-branch/lib/psy.c
branches/monty-vorbis-aotuv-branch/lib/vorbisenc.c
branches/monty-vorbis-aotuv-branch/vq/44c0.vqs
branches/monty-vorbis-aotuv-branch/vq/44c1.vqs
branches/monty-vorbis-aotuv-branch/vq/bookutil.h
Log:
Incremental update

Roll AoTuV's -q -2 and -q -1 into libvorbis -1 (AoTuV q -2 gives
bitrate performance similar to 1.0.1's -1)

Found/corrected an old setup bug concerning uncoupled modes and -q
values over 1.

Keep the vq/ utilities up to date w.r.t. newer GCC releases.



Modified: branches/monty-vorbis-aotuv-branch/lib/codec_internal.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/codec_internal.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/codec_internal.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -18,6 +18,10 @@
#ifndef _V_CODECI_H_
#define _V_CODECI_H_

+#define TRAIN_FLOOR1
+#define TRAIN_RES
+#define TRAIN_RESAUX
+
#include "envelope.h"
#include "codebook.h"


Modified: branches/monty-vorbis-aotuv-branch/lib/mapping0.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/mapping0.c	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/mapping0.c	2004-07-05 21:22:49 UTC (rev 7001)
@@ -274,7 +274,20 @@

gmdct[i]=_vorbis_block_alloc(vb,n/2*sizeof(**gmdct));

-    scale_dB=todB(&scale);
+    scale_dB=todB(&scale) + .345; /* + .345 is a hack; the original
+                                     todB estimation used on IEEE 754
+                                     compliant machines had a bug that
+                                     returned dB values about a third
+                                     of a decibel too high.  The bug
+                                     was harmless because tunings
+                                     implicitly took that into
+                                     account.  However, fixing the bug
+                                     in the estimator requires
+                                     changing all the tunings as well.
+                                     For now, it's easier to sync
+                                     things back up here, and
+                                     recalibrate the tunings in the
+                                     next major model upgrade. */

#if 0
if(vi->channels==2)
@@ -301,11 +314,38 @@

/* FFT yields more accurate tonal estimation (not phase sensitive) */
drft_forward(&b->fft_look[vb->W],pcm);
-    logfft[0]=scale_dB+todB(pcm);
+    logfft[0]=scale_dB+todB(pcm)  + .345; /* + .345 is a hack; the
+                                     original todB estimation used on
+                                     IEEE 754 compliant machines had a
+                                     bug that returned dB values about
+                                     a third of a decibel too high.
+                                     The bug was harmless because
+                                     tunings implicitly took that into
+                                     account.  However, fixing the bug
+                                     in the estimator requires
+                                     changing all the tunings as well.
+                                     For now, it's easier to sync
+                                     things back up here, and
+                                     recalibrate the tunings in the
+                                     next major model upgrade. */
local_ampmax[i]=logfft[0];
for(j=1;j<n-1;j+=2){
float temp=pcm[j]*pcm[j]+pcm[j+1]*pcm[j+1];
-      temp=logfft[(j+1)>>1]=scale_dB+.5f*todB(&temp);
+      temp=logfft[(j+1)>>1]=scale_dB+.5f*todB(&temp)  + .345; /* +
+                                     .345 is a hack; the original todB
+                                     estimation used on IEEE 754
+                                     compliant machines had a bug that
+                                     returned dB values about a third
+                                     of a decibel too high.  The bug
+                                     was harmless because tunings
+                                     implicitly took that into
+                                     account.  However, fixing the bug
+                                     in the estimator requires
+                                     changing all the tunings as well.
+                                     For now, it's easier to sync
+                                     things back up here, and
+                                     recalibrate the tunings in the
+                                     next major model upgrade. */
if(temp>local_ampmax[i])local_ampmax[i]=temp;
}

@@ -347,7 +387,20 @@
memset(floor_posts[i],0,sizeof(**floor_posts)*PACKETBLOBS);

for(j=0;j<n/2;j++)
-	logmdct[j]=todB(mdct+j);
+	logmdct[j]=todB(mdct+j)  + .345; /* + .345 is a hack; the original
+                                     todB estimation used on IEEE 754
+                                     compliant machines had a bug that
+                                     returned dB values about a third
+                                     of a decibel too high.  The bug
+                                     was harmless because tunings
+                                     implicitly took that into
+                                     account.  However, fixing the bug
+                                     in the estimator requires
+                                     changing all the tunings as well.
+                                     For now, it's easier to sync
+                                     things back up here, and
+                                     recalibrate the tunings in the
+                                     next major model upgrade. */

#if 0
if(vi->channels==2){
@@ -403,15 +456,31 @@
performing bitrate management, the line fit is performed
multiple times for up/down tweakage on demand. */

-      _vp_offset_and_mix(psy_look,
-			 noise,
-			 tone,
-			 1,
-			 logmask,
-			 mdct,
-			 logmdct);
-
#if 0
+      {
+      float aotuv[psy_look->n];
+#endif
+
+	_vp_offset_and_mix(psy_look,
+			   noise,
+			   tone,
+			   1,
+			   logmask,
+			   mdct,
+			   logmdct);
+
+#if 0
+	if(vi->channels==2){
+	  if(i==0)
+	    _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);
+	}
+      }
+#endif
+
+
+#if 0
if(vi->channels==2){
if(i==0)
_analysis_output("mask1L",seq,logmask,n/2,1,0,0);

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -62,7 +62,7 @@
24,25,26,27,28,29,30, 31,     /* 31dB */
32,33,34,35,36,37,38, 39,     /* 39dB */
}},
-  /* mode_Z nominal short*/
+  /* mode_Z nominal short */
{{
0, 1, 2, 3, 4, 5, 6,  6,     /* 7dB */
7, 7, 7, 7, 6, 6, 6,  7,     /* 15dB */
@@ -106,203 +106,138 @@

/* tonal masking curve level adjustments *************************/

-// low-mode added
-static vp_adjblock _vp_tonemask_adj_longblock_low[3]={
-  /* adjust for mode zero */
-   /* 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}}, /* 0(-2) */
-   {{ -3, -8,-13,-15,-12,-12,-11,-11,-11,-11,-11, -1, -1, -1, -1,  0,  0}}, /* 1(-1) */
-   {{ -4,-10,-14,-16,-15,-14,-13,-12,-12,-12,-11, -1, -1, -1, -1, -1,  0}}, /* 2(-0) */
-};
-static vp_adjblock _vp_tonemask_adj_otherblock_low[3]={
-  /* adjust for mode zero */
-   /* 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}}, /* 0(-2) */
-   {{ -3, -8,-13,-15,-11,-11,-10,-10,-10,-10,-10,  0,  0,  0,  0,  0,  0}}, /* 1(-1) */
-   {{ -4,-10,-14,-16,-14,-13,-11,-11,-10,-10,-10,  0,  0,  0,  0,  0,  0}}, /* 2(-0) */
-};
+static vp_adjblock _vp_tonemask_adj_longblock[12]={

-static vp_adjblock _vp_tonemask_adj_longblock[11]={
-  /* adjust for mode zero */
-  /* 63     125     250     500     1     2     4     8    16 */
/* 63     125     250     500       1       2       4       8      16 */
-//  {{-15,-15,-15,-15,-10, -8, -4,-2, 0, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
+
+   {{ -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 *
+   /*  {{-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 */
+   /*  {{-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,-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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[11]={
-  /* adjust for mode zero */
-  /* 63     125     250     500       1     2     4     8    16 */
+static vp_adjblock _vp_tonemask_adj_otherblock[12]={
+
/* 63     125     250     500       1       2       4       8      16 */
-//  {{-20,-20,-20,-20,-14,-12,-10, -8, -4, 0, 0,10, 0, 0, 0, 0, 0}}, /* 0 */
+
+   {{ -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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 */
+   /*  {{-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 low-bitrate (impulse,padding,trans)
- // q-2 added
-static noise3 _psy_noisebias_trans_low[3]={
+/* noise bias (transition block) */
+static noise3 _psy_noisebias_trans[12]={
/*  63     125     250     500      1k       2k      4k      8k     16k*/
-  /* 0 */
-//  {{{-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,  4,  8,  8, 15},
-//    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
-    /* 0(-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}}},
-  /* 1 */
-//  {{{-15,-15,-15,-15,-15,-10, -5,  0,  2,  2,  6,  6,  6,  8, 10, 12, 15},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2,  0,  0,  0,  2,  4,  10},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4,  -2}}},
-    /* 1(-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, 12},
-    {-30,-30,-30,-30,-30,-24,-20,-14,-10, -6, -8, -8, -6, -6, -6, -4, -2}}},
-    /* 2(-0) */
-  {{{-15,-15,-15,-15,-15,-10, -5,  0,  2,  2,  6,  6,  6,  8, 10, 12, 15},
-    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2,  0,  0,  0,  2,  3,   6},
-    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -4,  -2}}},
-};
-// noise bias low-bitrate (long)
- // q-2 added
-static noise3 _psy_noisebias_long_low[3]={
-    /*63     125     250     500      1k       2k      4k      8k     16k*/
-  /* 0 */
-//  {{{-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(-2) */
-  {{{-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}}},
-  /* 1 */
-//  {{{-10,-10,-10,-10,-10,-10, -8, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
-//    {-20,-20,-20,-20,-20,-20,-20,-14, -8, -2,  0,  0,  0,  0,  2,  4,  10},
-//    {-20,-20,-20,-20,-20,-20,-20,-14, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
-    /* 1(-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,  1,  3,  5,  10},
-    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
-    /* 2(-0) */
-  {{{-10,-10,-10,-10,-10,-10, -8, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
-    {-20,-20,-20,-20,-20,-20,-20,-14, -8, -2,  0,  0,  0,  0,  2,  3,  6},
-    {-20,-20,-20,-20,-20,-20,-20,-14, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
-};
-
-
-// noise bias (transition block)
-static noise3 _psy_noisebias_trans[11]={
-  /*  63     125     250     500      1k       2k      4k      8k     16k*/
-  /* 0 (1.0) */
-//  {{{-15,-15,-15,-15,-15,-12,-10, -8,  0,  2,  4,  4,  5,  5,  5,  8,  10},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4, -2, -2,  0,  0,  2,  4,  10},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -4, -4, -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}}},
+  /* 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,-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,  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}}},
+  /* 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, -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,  9},
{-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, -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, -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, -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, -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,-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,-22,-20,-15,-10, -8, -2,  0,  0,  0,  1,  2,  3,  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,-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}}},*/
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2,  2},
{-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},
+      {-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}}},*/
{{{-30,-30,-30,-30,-30,-30,-30,-28,-20,-12,-10,-10,-10,-10,-10, -8, -6},
{-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}}},
@@ -312,63 +247,61 @@
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};

-// noise bias (long block)
-static noise3 _psy_noisebias_long[11]={
-    /*63     125     250     500      1k       2k      4k      8k     16k*/
-  /* 0 (1.0) */
-//  {{{-10,-10,-10,-10,-10,-10, -8,  2,  2,  2,  4,  4,  5,  5,  5,  8,  10},
-//    {-20,-20,-20,-20,-20,-20,-10, -6, -4, -2, -2, -2,  0,  0,  2,  4,  10},
-//    {-20,-20,-20,-20,-20,-20,-20,-10, -6, -6, -6, -6, -6, -4, -4, -4, -2}}},
+/*  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,  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 (1.0) */
-//  {{{-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, -8, -8, -8, -8, -8, -6, -6, -6, -4}}},
/* 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,  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, -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, -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,  3,  3,  4,  4,  7},
{-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, -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, -2, -1,  2},
+      {-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -5}}},*/
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
{-22,-22,-22,-22,-22,-22,-22,-16,-12, -6, -4, -4, -4, -4, -3, -1,  0},
{-24,-24,-24,-24,-24,-24,-24,-18,-14,-12,-12,-12,-12,-10,-10, -9, -8}}},
/* 6 */
-//  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
-//    {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2,  1},
-//    {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},
+  /*  {{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
+      {-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -4, -2,  1},
+      {-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12, -8}}},*/
{{{-15,-15,-15,-15,-15,-15,-15,-10, -4,  1,  1,  1,  2,  3,  3,  4,  7},
{-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -6, -6, -6, -6, -5, -2,  0},
{-26,-26,-26,-26,-26,-26,-26,-18,-16,-15,-15,-15,-15,-13,-13,-12,-10}}},
@@ -390,13 +323,19 @@
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};

-// noise bias (impulse block)
-static noise3 _psy_noisebias_impulse[11]={
+/* 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,  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}}},
@@ -421,30 +360,30 @@
{-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,-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}}},*/
{{{-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,-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,-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}}},*/
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2,  0},
{-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,-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}}},*/
{{{-28,-28,-28,-28,-28,-28,-28,-20,-14, -8, -4, -4, -4, -4, -4, -2,  0},
{-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,-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}}},
@@ -454,9 +393,15 @@
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};

-// noise bias (padding block)
-static noise3 _psy_noisebias_padding[11]={
+/* 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},
@@ -466,9 +411,9 @@
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -4,  0,  0,  0,  2,  2,  4,  8},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -6, -6, -6, -6, -4, -2,  0}}},
/* 2 */
-//  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  8, 10, 10, 16},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4,  0,  0,  0,  2,  2,  4,  8},
-//    {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
+  /*  {{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  8, 10, 10, 16},
+      {-30,-30,-30,-30,-26,-22,-20,-14,-10, -4,  0,  0,  0,  2,  2,  4,  8},
+      {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},*/
{{{-14,-14,-14,-14,-14,-10, -8, -6, -2,  2,  2,  2,  2,  8, 10, 10, 16},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -6, -1, -1, -1,  0,  0,  2,  6},
{-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -8, -6, -4, -2}}},
@@ -514,53 +459,39 @@
{10,10,100},
};

-
-static int _psy_tone_suppress[11]={
-  -20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45,
+static int _psy_tone_suppress[12]={
+  -20,-20,-20,-20,-20,-24,-30,-40,-40,-45,-45,-45,
};
-// low-mode added
-static int _psy_tone_suppress_low[3]={
-  -20,-20,-20
- };
-static int _psy_tone_0dB[11]={
-  90,95,95,95,95,105,105,105,105,105,105,
+static int _psy_tone_0dB[12]={
+  90,90,95,95,95,95,105,105,105,105,105,105,
};
-// low-mode added
-static int _psy_tone_0dB_low[3]={
-  90,90,90
+static int _psy_noise_suppress[12]={
+  -20,-20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
};

-static int _psy_noise_suppress[11]={
-  -20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
-};
-// low-mode added
-static int _psy_noise_suppress_low[3]={
- -20,-20,-20
-};
-
static vorbis_info_psy _psy_info_template={
-  // blockflag
+  /* blockflag */
-1,
-  // ath_adjatt, ath_maxatt
+  /* ath_adjatt, ath_maxatt */
-140.,-140.,
/* tonemask att boost/decay,suppr,curves */
{0.f,0.f,0.f},     0.,0.,    -40.f, {0.},

/*noisemaskp,supp, low/high window, low/hi guard, minimum */
1,          -0.f,           .5f, .5f,         0,0,0,
-  // noiseoffset*3, noisecompand, max_curve_dB
+  /* noiseoffset*3, noisecompand, max_curve_dB */
{{-1},{-1},{-1}},{-1},105.f,
-  // noise normalization - channel_p, point_p, start, partition, thresh.
+  /* noise normalization - channel_p, point_p, start, partition, thresh. */
0,0,-1,-1,0.,
};

/* ath ****************/

-static int _psy_ath_floater[11]={
-  -100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
+static int _psy_ath_floater[12]={
+  -100,-100,-100,-100,-100,-100,-105,-105,-105,-105,-110,-120,
};
-static int _psy_ath_abs[11]={
-  -130,-130,-130,-140,-140,-140,-140,-140,-140,-140,-150,
+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
@@ -572,50 +503,17 @@
/* various stereo possibilities */

/* stereo mode by base quality level */
-// q-2 added
-static adj_stereo _psy_stereo_modes_44_low[3]={
-    /*  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,  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(-2) OLD  */
-//  {{  4,  4,  4,  4,  4,  4,  4,  4,  3,  2,  1,  0,  0,  0,  0},
-//   {  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  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         0(-2)  */
+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         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,  5,  5,  6,  6,  6,  6,  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         1(-1)  */
-  {{  4,  4,  4,  4,  4,  4,  4,  3,  2,  2,  1,  0,  0,  0,  0},
-   {  8,  8,  8,  8,  6,  6,  5,  5,  5,  5,  5,  5,  5,  4,  3},
-   {  1,  2,  3,  4,  4,  4,  4,  4,  4,  5,  6,  7,  8,  8,  8},
-   { 11,11.5, 12,12.5, 13,13.5, 14, 99, 99, 99, 99, 99, 99, 99, 99}},
-  /*  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14         2(<-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,  5,  5,  6,  6,  6,  6,  6,  7,  8,  8,  8},
-//   { 12,12.5, 13,13.5, 14,14.5, 15, 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,  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}},
-};
-
-static adj_stereo _psy_stereo_modes_44[11]={
/*  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},
-//   { 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,  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},
+      { 12,12.5, 13,13.5, 14,14.5, 15, 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,  5,  5,  5,  5,  5,  5,  4,  3},
{  1,  2,  3,  4,  4,  5,  6,  6,  6,  6,  6,  8,  8,  8,  8},
@@ -626,10 +524,10 @@
{  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,  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},
@@ -645,37 +543,37 @@
{  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,  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},
{  7,  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,  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,  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, 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},
@@ -693,19 +591,12 @@
};

/* tone master attenuation by base quality mode and bitrate tweak */
-// q-2 added
-static att3 _psy_tone_masteratt_44_low[3]={
-//  {{ 34,  20,   8},  0, 1.25}, /* 0 */
-//  {{ 34,  20,   8}, -2, 1.25}, /* 1 */
-  {{ 35,  21,   9},  0, 1.25}, /* 0 */
-  {{ 34,  20,   8},  0, 1.25}, /* 1 */
-  {{ 34,  20,   8}, -2, 1.25}, /* 2 */
-};
-static att3 _psy_tone_masteratt_44[11]={
+static att3 _psy_tone_masteratt_44[12]={
+  {{ 35,  21,   9},  0, 1.25}, /* -1 */
{{ 30,  20,   8}, -2, 1.25}, /* 0 */
-//  {{ 25,  14,   4},  0,    0}, /* 1 */
+  /*  {{ 25,  14,   4},  0,    0}, *//* 1 */
{{ 23,  12,   2},  0,    0}, /* 1 */
-//  {{ 20,  10,  -2},  0,    0}, /* 2 */
+  /*  {{ 20,  10,  -2},  0,    0}, *//* 2 */
{{ 20,   9,  -3},  0,    0}, /* 2 */
{{ 20,   9,  -4},  0,    0}, /* 3 */
{{ 20,   9,  -4},  0,    0}, /* 4 */
@@ -718,51 +609,34 @@
};

/* lowpass by mode **************/
-// q-2 added
-static double _psy_lowpass_44_low[3]={
-//  15.1,15.1,
-  13.9, 15.1, 15.1
+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.
};
-static double _psy_lowpass_44[11]={
-//  15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999.
-  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[10]={
-//  16,16,16,16,32,32,9999,9999,9999,9999
-  16,16,16,32,9999,9999,9999,9999,9999,9999
+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[10]={
-//  128,128,128,256,512,512,9999,9999,9999,9999
-  128,128,256,512,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[10]={
-    8,8,8,8,8,8,8,8,8,8
+static int _noise_part_short_44[11]={
+    8,8,8,8,8,8,8,8,8,8,8
};
-static int _noise_part_long_44[10]={
-    32,32,32,32,32,32,32,32,32,32
+static int _noise_part_long_44[11]={
+    32,32,32,32,32,32,32,32,32,32,32
};

-static double _noise_thresh_44[10]={
-//  .2,.2,.3,.4,.5,.5,9999.,9999.,9999.,9999.,
-   .2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999.,
+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.,
};
-// 2 >> 3
-static double _noise_thresh_44_2[3]={
- .5,.5,.5,
-};
-// low-mode added
-static double _noise_thresh_44_low[3]={
- .2,.2,.2,
-};

-// q-2 added
-static int _noise_start_short_44_low[3]={
-  32,32,32
+static double _noise_thresh_5only[3]={
+ .5,.5,
};
-static int _noise_start_long_44_low[3]={
-  256,256,256
-};

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/residue_44.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/residue_44.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/residue_44.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -148,7 +148,6 @@
}
};

-
static vorbis_residue_template _res_44s_0[]={
{2,0,  &_residue_44_mid,
&_huff_book__44c0_s_short,&_huff_book__44c0_sm_short,
@@ -241,6 +240,7 @@
};

static vorbis_mapping_template _mapres_template_44_stereo[]={
+  { _map_nominal, _res_44s_0 }, /* -1 */
{ _map_nominal, _res_44s_0 }, /* 0 */
{ _map_nominal, _res_44s_1 }, /* 1 */
{ _map_nominal, _res_44s_2 }, /* 2 */
@@ -253,8 +253,3 @@
{ _map_nominal, _res_44s_9 }, /* 9 */
};

-// low-mode added
-static vorbis_mapping_template _mapres_template_44_stereo_low[]={
-  { _map_nominal, _res_44s_0 }, /* 0(-2) */
-  { _map_nominal, _res_44s_0 }, /* 1(-1) */
-};

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/residue_44u.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/residue_44u.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/residue_44u.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -283,6 +283,7 @@
};

static vorbis_mapping_template _mapres_template_44_uncoupled[]={
+  { _map_nominal_u, _res_44u_0 }, /* -1 */
{ _map_nominal_u, _res_44u_0 }, /* 0 */
{ _map_nominal_u, _res_44u_1 }, /* 1 */
{ _map_nominal_u, _res_44u_2 }, /* 2 */
@@ -294,9 +295,3 @@
{ _map_nominal_u, _res_44u_8 }, /* 8 */
{ _map_nominal_u, _res_44u_9 }, /* 9 */
};
-
-// low-mode added
-static vorbis_mapping_template _mapres_template_44_uncoupled_low[]={
-  { _map_nominal_u, _res_44u_0 }, /* 0(-2) */
-  { _map_nominal_u, _res_44u_0 }, /* 1(-1) */
-};

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_32.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_32.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_32.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -15,36 +15,22 @@

********************************************************************/

-static double rate_mapping_32[11]={
-  28000.,35000.,45000.,56000.,60000.,
+static double rate_mapping_32[12]={
+  18000.,28000.,35000.,45000.,56000.,60000.,
75000.,90000.,100000.,115000.,150000.,190000.,
};

-static double rate_mapping_32_un[11]={
-  42000.,52000.,64000.,72000.,78000.,
+static double rate_mapping_32_un[12]={
+  30000.,42000.,52000.,64000.,72000.,78000.,
86000.,92000.,110000.,120000.,140000.,190000.,
};

-static double rate_mapping_32_low[3]={
-//  20000.,28000.
-  18000.,22000.,28000.
+static double _psy_lowpass_32[12]={
+  12.3,13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
};

-static double rate_mapping_32_un_low[3]={
-//  24000.,42000.,
-  30000.,32000.,42000.
-};
-
-static double _psy_lowpass_32_low[3]={
-//  13.,13.,
-  12.3,13.,13.
-};
-static double _psy_lowpass_32[11]={
-  13.,13.,14.,15.,99.,99.,99.,99.,99.,99.,99.
-};
-
ve_setup_data_template ve_setup_32_stereo={
-  10,
+  11,
rate_mapping_32,
quality_mapping_44,
2,
@@ -95,7 +81,7 @@
};

ve_setup_data_template ve_setup_32_uncoupled={
-  10,
+  11,
rate_mapping_32_un,
quality_mapping_44,
-1,
@@ -126,7 +112,7 @@

{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
-  _noise_thresh_44_2,
+  _noise_thresh_44,

_psy_ath_floater,
_psy_ath_abs,
@@ -144,127 +130,3 @@

_mapres_template_44_uncoupled
};
-
-ve_setup_data_template ve_setup_32_stereo_low={
-//  1,
-  2,
-  rate_mapping_32_low,
-  quality_mapping_44_stereo_low,
-  2,
-  26000,
-  40000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-//  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_longblock,
-//  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_otherblock_low,
-  _vp_tonemask_adj_longblock_low,
-  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-//  _noise_thresh_44,
-   _noise_thresh_44_low,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_32_low,
-
-  _psy_global_44,
-  _global_mapping_44,
-  _psy_stereo_modes_44_low,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_stereo
-  _mapres_template_44_stereo_low
-};
-
-
-ve_setup_data_template ve_setup_32_uncoupled_low={
-//  1,
-  2,
-  rate_mapping_32_un_low,
-  quality_mapping_44_stereo_low,
-  -1,
-  26000,
-  40000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-//  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_longblock,
-//  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_otherblock_low,
-  _vp_tonemask_adj_longblock_low,
-  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-  _noise_thresh_44_2,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_32_low,
-
-  _psy_global_44,
-  _global_mapping_44,
-  NULL,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_uncoupled
-  _mapres_template_44_uncoupled_low
-};

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_44.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_44.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_44.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -19,87 +19,43 @@
#include "modes/residue_44.h"
#include "modes/psych_44.h"

-// nominal bitrate (per ch.)
- // q-2 , q-1 , q-0
-static double rate_mapping_44_stereo_low[3]={
-//  22500.,32000.
-  20000.,24000.,32000.
-};
- // q0`q10
-static double rate_mapping_44_stereo[11]={
-  32000.,40000.,48000.,56000.,64000.,
+static double rate_mapping_44_stereo[12]={
+  20000,32000.,40000.,48000.,56000.,64000.,
80000.,96000.,112000.,128000.,160000.,250001.
};

-
-static double quality_mapping_44_stereo_low[3]={
-//  -.1,.0,
-  -.2,-.1,.0,
+static double quality_mapping_44[12]={
+  -.1,.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
};
-static double quality_mapping_44[11]={
-  .0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
-};

-
-// q-2 added
-static int blocksize_short_44_low[2]={
-  512,512
+static int blocksize_short_44[11]={
+  512,256,256,256,256,256,256,256,256,256,256
};
-static int blocksize_long_44_low[2]={
-  4096,4096
+static int blocksize_long_44[11]={
+  4096,2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
};

-static int blocksize_short_44[10]={
-  256,256,256,256,256,256,256,256,256,256
+static double _psy_compand_short_mapping[12]={
+  0.5, 1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
};
-static int blocksize_long_44[10]={
-  2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
+static double _psy_compand_long_mapping[12]={
+  3.5, 4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
};

-// noise compand level
-static double _psy_compand_short_mapping[11]={
-  1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.
+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 double _psy_compand_long_mapping[11]={
-  4., 4., 4.3, 4.6, 5., 5., 5., 5., 5., 5., 5.
-};
-// low-mode added
-static double _psy_compand_short_mapping_low[3]={
-  0.5, 1., 1.
-};
-static double _psy_compand_long_mapping_low[3]={
-  3.5, 4., 4.
-};

-// precho mapping (_psy_global)
-static double _global_mapping_44[11]={
-// 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.5, 4., 4.
- 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 double _global_mapping_44_low[3]={
-//  0., 1.,
-  0., 0., 1.,
+static int _floor_long_mapping_44[11]={
+  8,7,7,7,7,7,7,7,7,7,7
};

-// The floor number defined by floor_all.h
-// q-2 added
-static int _floor_short_mapping_44_low[2]={
-  1,1
-};
-static int _floor_long_mapping_44_low[2]={
-  8,8
-};
-
-static int _floor_short_mapping_44[10]={
-  0,0,2,2,4,5,5,5,5,5
-};
-static int _floor_long_mapping_44[10]={
-  7,7,7,7,7,7,7,7,7,7
-};
-
-// definition
ve_setup_data_template ve_setup_44_stereo={
-  10,
+  11,
rate_mapping_44_stereo,
quality_mapping_44,
2,
@@ -149,65 +105,3 @@
_mapres_template_44_stereo
};

-ve_setup_data_template ve_setup_44_stereo_low={
-//  1,
-  2,
-  rate_mapping_44_stereo_low,
-  quality_mapping_44_stereo_low,
-  2,
-  40000,
-  50000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-//  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_longblock,
-//  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_otherblock_low,
-  _vp_tonemask_adj_longblock_low,
-  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-//  _noise_thresh_44,
-   _noise_thresh_44_low,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_44_low,
-
-  _psy_global_44,
-  _global_mapping_44_low,
-  _psy_stereo_modes_44_low,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_stereo
-  _mapres_template_44_stereo_low
-};
-

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_44u.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_44u.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_44u.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -17,18 +17,13 @@

#include "modes/residue_44u.h"

-static double rate_mapping_44_un[11]={
-  48000.,60000.,70000.,80000.,86000.,
+static double rate_mapping_44_un[12]={
+  32000.,48000.,60000.,70000.,80000.,86000.,
96000.,110000.,120000.,140000.,160000.,240001.
};

-static double rate_mapping_44_un_low[3]={
-//  32000.,48000.
-  32000.,36000.,48000.
-};
-
ve_setup_data_template ve_setup_44_uncoupled={
-  10,
+  11,
rate_mapping_44_un,
quality_mapping_44,
-1,
@@ -59,7 +54,7 @@

{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
-  _noise_thresh_44_2,
+  _noise_thresh_44,

_psy_ath_floater,
_psy_ath_abs,
@@ -77,65 +72,3 @@

_mapres_template_44_uncoupled
};
-
-ve_setup_data_template ve_setup_44_uncoupled_low={
-//  1,
-  2,
-  rate_mapping_44_un_low,
-  quality_mapping_44_stereo_low,
-  -1,
-  40000,
-  50000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-//  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_longblock,
-//  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_otherblock_low,
-  _vp_tonemask_adj_longblock_low,
-  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-//  _noise_thresh_44,
-   _noise_thresh_44_low,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_44_low,
-
-  _psy_global_44,
-  _global_mapping_44_low,
-  NULL,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_uncoupled
-  _mapres_template_44_uncoupled_low
-};

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_8.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_8.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_8.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -74,7 +74,7 @@

{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
-  _noise_thresh_44_2,
+  _noise_thresh_5only,

_psy_ath_floater_8,
_psy_ath_abs_8,
@@ -125,7 +125,7 @@

{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
-  _noise_thresh_44_2,
+  _noise_thresh_5only,

_psy_ath_floater_8,
_psy_ath_abs_8,

Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -15,13 +15,13 @@

********************************************************************/

-static double rate_mapping_X[11]={
-  -1.,-1.,-1.,-1.,-1.,
+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={
-  10,
+  11,
rate_mapping_X,
quality_mapping_44,
2,
@@ -72,7 +72,7 @@
};

ve_setup_data_template ve_setup_X_uncoupled={
-  10,
+  11,
rate_mapping_X,
quality_mapping_44,
-1,
@@ -103,7 +103,7 @@

{_noise_start_short_44,_noise_start_long_44},
{_noise_part_short_44,_noise_part_long_44},
-  _noise_thresh_44_2,
+  _noise_thresh_44,

_psy_ath_floater,
_psy_ath_abs,
@@ -122,132 +122,6 @@
_mapres_template_44_uncoupled
};

-ve_setup_data_template ve_setup_X_stereo_low={
-//  1,
-  2,
-  rate_mapping_X,
-  quality_mapping_44_stereo_low,
-  2,
-  50000,
-  200000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_longblock,
-  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_otherblock_low,
-//  _vp_tonemask_adj_longblock_low,
-//  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-//  _noise_thresh_44,
-   _noise_thresh_44_low,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_44_low,
-
-  _psy_global_44,
-  _global_mapping_44,
-// (not _global_mapping_44_low)
-  _psy_stereo_modes_44_low,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_stereo
-  _mapres_template_44_stereo_low
-};
-
-
-ve_setup_data_template ve_setup_X_uncoupled_low={
-//  1,
-  2,
-  rate_mapping_X,
-  quality_mapping_44_stereo_low,
-  -1,
-  50000,
-  200000,
-
-  blocksize_short_44_low,
-  blocksize_long_44_low,
-
-  _psy_tone_masteratt_44_low,
-//  _psy_tone_0dB,
-  _psy_tone_0dB_low,
-//  _psy_tone_suppress,
-  _psy_tone_suppress_low,
-
-//  _vp_tonemask_adj_otherblock,
-//  _vp_tonemask_adj_longblock,
-//  _vp_tonemask_adj_otherblock,
-  _vp_tonemask_adj_otherblock_low,
-  _vp_tonemask_adj_longblock_low,
-  _vp_tonemask_adj_otherblock_low,
-
-  _psy_noiseguards_44,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_trans_low,
-  _psy_noisebias_long_low,
-//  _psy_noise_suppress,
-  _psy_noise_suppress_low,
-
-  _psy_compand_44,
-//  _psy_compand_short_mapping,
-  _psy_compand_short_mapping_low,
-//  _psy_compand_long_mapping,
-  _psy_compand_long_mapping_low,
-
-  {_noise_start_short_44_low,_noise_start_long_44_low},
-  {_noise_part_short_44,_noise_part_long_44},
-  _noise_thresh_44_2,
-
-  _psy_ath_floater,
-  _psy_ath_abs,
-
-  _psy_lowpass_44_low,
-
-  _psy_global_44,
-  _global_mapping_44,
-// (not _global_mapping_44_low)
-  NULL,
-
-  _floor_books,
-  _floor,
-  _floor_short_mapping_44_low,
-  _floor_long_mapping_44_low,
-
-//  _mapres_template_44_uncoupled
-  _mapres_template_44_uncoupled_low
-};
-
ve_setup_data_template ve_setup_XX_stereo={
2,
rate_mapping_X,
@@ -280,7 +154,7 @@

{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
-  _noise_thresh_44_2,
+  _noise_thresh_5only,

_psy_ath_floater_8,
_psy_ath_abs_8,
@@ -331,7 +205,7 @@

{_noise_start_8,_noise_start_8},
{_noise_part_8,_noise_part_8},
-  _noise_thresh_44_2,
+  _noise_thresh_5only,

_psy_ath_floater_8,
_psy_ath_abs_8,

Modified: branches/monty-vorbis-aotuv-branch/lib/psy.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/psy.c	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/psy.c	2004-07-05 21:22:49 UTC (rev 7001)
@@ -879,28 +879,29 @@
if(offset_select == 1) {
coeffi = -17.2;       /* coeffi is a -17.2dB threshold */
val = val - logmdct[i];  /* val == mdct line value relative to floor in dB */
-
+
if(val > coeffi){
/* mdct value is > -17.2 dB below floor */
-
+
de = 1.0-((val-coeffi)*0.005*cx);
/* pro-rated attenuation:
-0.00 dB boost if mdct value is -17.2dB (relative to floor)
-0.77 dB boost if mdct value is 0dB (relative to floor)
-1.64 dB boost if mdct value is +17.2dB (relative to floor)
etc... */
-
+
if(de < 0) de = 0.0001;
}else
/* mdct value is <= -17.2 dB below floor */
-
+
de = 1.0-((val-coeffi)*0.0003*cx);
-	/* pro-rated attenuation:
-	   +0.00 dB atten if mdct value is -17.2dB (relative to floor)
-	   +0.45 dB atten if mdct value is -34.4dB (relative to floor)
-	   etc... */
-
+      /* pro-rated attenuation:
+	 +0.00 dB atten if mdct value is -17.2dB (relative to floor)
+	 +0.45 dB atten if mdct value is -34.4dB (relative to floor)
+	 etc... */
+
mdct[i] *= de;
+
}
}
}

Modified: branches/monty-vorbis-aotuv-branch/lib/vorbisenc.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/vorbisenc.c	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/lib/vorbisenc.c	2004-07-05 21:22:49 UTC (rev 7001)
@@ -162,14 +162,10 @@

static ve_setup_data_template *setup_list[]={
&ve_setup_44_stereo,
-  &ve_setup_44_stereo_low,
&ve_setup_44_uncoupled,
-  &ve_setup_44_uncoupled_low,

&ve_setup_32_stereo,
-  &ve_setup_32_stereo_low,
&ve_setup_32_uncoupled,
-  &ve_setup_32_uncoupled_low,

&ve_setup_22_stereo,
&ve_setup_22_uncoupled,
@@ -183,8 +179,6 @@

&ve_setup_X_stereo,
&ve_setup_X_uncoupled,
-  &ve_setup_X_stereo_low,
-  &ve_setup_X_uncoupled_low,
&ve_setup_XX_stereo,
&ve_setup_XX_uncoupled,
0

Modified: branches/monty-vorbis-aotuv-branch/vq/44c0.vqs
===================================================================
--- branches/monty-vorbis-aotuv-branch/vq/44c0.vqs	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/vq/44c0.vqs	2004-07-05 21:22:49 UTC (rev 7001)
@@ -1,7 +1,5 @@
cp 44c0_s/resaux_0.vqd _44c0_s_short.vqd
cp 44c0_s/resaux_1.vqd _44c0_s_long.vqd
-cp 44c0_sm/resaux_0.vqd _44c0_sm_short.vqd
-cp 44c0_sm/resaux_1.vqd _44c0_sm_long.vqd

GO

@@ -37,38 +35,3 @@
:_p9_1 44c0_s/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
:_p9_2 44c0_s/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8

-
->_44c0s_sm noninterleaved
-haux _44c0_sm_short.vqd 0,16,2
-
->_44c0_sm noninterleaved
-haux _44c0_sm_long.vqd 0,64,2
-
-#     0   1   1   2   2   4   8  16  32   +
-#         0  99   0  99   4   8  16  32   +
-
-#     0   1   2   3   4   5   6   7   8   9
-# 1                               .   .   .
-# 2                               .   .   .
-# 4       .   .   .   .   .   .           .
-
-:_p1_0 44c0_sm/res_part1_pass2.vqd, 8, nonseq cull, 0 +- 1
-:_p2_0 44c0_sm/res_part2_pass2.vqd, 4, nonseq cull, 0 +- 1 2
-:_p3_0 44c0_sm/res_part3_pass2.vqd, 4, nonseq cull, 0 +- 1 2
-:_p4_0 44c0_sm/res_part4_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
-:_p5_0 44c0_sm/res_part5_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
-:_p6_0 44c0_sm/res_part6_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5 6 7 8
-
-
-:_p7_0 44c0_sm/res_part7_pass0.vqd, 4, nonseq cull, 0 +- 11
-:_p7_1 44c0_sm/res_part7_pass1.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5
-
-:_p8_0 44c0_sm/res_part8_pass0.vqd, 2, nonseq cull, 0 +- 5 10 15 20 25 30
-:_p8_1 44c0_sm/res_part8_pass1.vqd, 2, nonseq cull, 0 +- 1 2
-
-:_p9_0 44c0_sm/res_part9_pass0.vqd, 2, nonseq, 0 +- 221 442 663 884
-:_p9_1 44c0_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
-:_p9_2 44c0_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8
-
-
-

Added: branches/monty-vorbis-aotuv-branch/vq/44c0m.vqs
===================================================================
--- branches/monty-vorbis-aotuv-branch/vq/44c0m.vqs	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/vq/44c0m.vqs	2004-07-05 21:22:49 UTC (rev 7001)
@@ -0,0 +1,39 @@
+cp 44c0_sm/resaux_0.vqd _44c0_sm_short.vqd
+cp 44c0_sm/resaux_1.vqd _44c0_sm_long.vqd
+
+GO
+
+>_44c0s_sm noninterleaved
+haux _44c0_sm_short.vqd 0,16,2
+
+>_44c0_sm noninterleaved
+haux _44c0_sm_long.vqd 0,64,2
+
+#     0   1   1   2   2   4   8  16  32   +
+#         0  99   0  99   4   8  16  32   +
+
+#     0   1   2   3   4   5   6   7   8   9
+# 1                               .   .   .
+# 2                               .   .   .
+# 4       .   .   .   .   .   .           .
+
+:_p1_0 44c0_sm/res_part1_pass2.vqd, 8, nonseq cull, 0 +- 1
+:_p2_0 44c0_sm/res_part2_pass2.vqd, 4, nonseq cull, 0 +- 1 2
+:_p3_0 44c0_sm/res_part3_pass2.vqd, 4, nonseq cull, 0 +- 1 2
+:_p4_0 44c0_sm/res_part4_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
+:_p5_0 44c0_sm/res_part5_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
+:_p6_0 44c0_sm/res_part6_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5 6 7 8
+
+
+:_p7_0 44c0_sm/res_part7_pass0.vqd, 4, nonseq cull, 0 +- 11
+:_p7_1 44c0_sm/res_part7_pass1.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5
+
+:_p8_0 44c0_sm/res_part8_pass0.vqd, 2, nonseq cull, 0 +- 5 10 15 20 25 30
+:_p8_1 44c0_sm/res_part8_pass1.vqd, 2, nonseq cull, 0 +- 1 2
+
+:_p9_0 44c0_sm/res_part9_pass0.vqd, 2, nonseq, 0 +- 221 442 663 884
+:_p9_1 44c0_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
+:_p9_2 44c0_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8
+
+
+

Modified: branches/monty-vorbis-aotuv-branch/vq/44c1.vqs
===================================================================
--- branches/monty-vorbis-aotuv-branch/vq/44c1.vqs	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/vq/44c1.vqs	2004-07-05 21:22:49 UTC (rev 7001)
@@ -1,7 +1,5 @@
cp 44c1_s/resaux_0.vqd _44c1_s_short.vqd
cp 44c1_s/resaux_1.vqd _44c1_s_long.vqd
-cp 44c1_sm/resaux_0.vqd _44c1_sm_short.vqd
-cp 44c1_sm/resaux_1.vqd _44c1_sm_long.vqd

GO

@@ -40,36 +38,3 @@
:_p9_2 44c1_s/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8


->_44c1s_sm noninterleaved
-haux _44c1_sm_short.vqd 0,16,2
-
->_44c1_sm noninterleaved
-haux _44c1_sm_long.vqd 0,64,2
-
-#iter 0
-
-#     0   1   1   2   2   4   8  16  32   +
-#         0  99   0  99   4   8  16  32   +
-
-#     0   1   2   3   4   5   6   7   8   9
-# 1                               .   .   .
-# 2                               .   .   .
-# 4       .   .   .   .   .   .           .
-
-:_p1_0 44c1_sm/res_part1_pass2.vqd, 8, nonseq cull, 0 +- 1
-:_p2_0 44c1_sm/res_part2_pass2.vqd, 4, nonseq cull, 0 +- 1 2
-:_p3_0 44c1_sm/res_part3_pass2.vqd, 4, nonseq cull, 0 +- 1 2
-:_p4_0 44c1_sm/res_part4_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
-:_p5_0 44c1_sm/res_part5_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
-:_p6_0 44c1_sm/res_part6_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5 6 7 8
-
-
-:_p7_0 44c1_sm/res_part7_pass0.vqd, 4, nonseq cull, 0 +- 11
-:_p7_1 44c1_sm/res_part7_pass1.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5
-
-:_p8_0 44c1_sm/res_part8_pass0.vqd, 2, nonseq cull, 0 +- 5 10 15 20 25 30
-:_p8_1 44c1_sm/res_part8_pass1.vqd, 2, nonseq cull, 0 +- 1 2
-
-:_p9_0 44c1_sm/res_part9_pass0.vqd, 2, nonseq, 0 +- 221 442 663 884 1105 1326
-:_p9_1 44c1_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
-:_p9_2 44c1_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8

Added: branches/monty-vorbis-aotuv-branch/vq/44c1m.vqs
===================================================================
--- branches/monty-vorbis-aotuv-branch/vq/44c1m.vqs	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/vq/44c1m.vqs	2004-07-05 21:22:49 UTC (rev 7001)
@@ -0,0 +1,38 @@
+cp 44c1_sm/resaux_0.vqd _44c1_sm_short.vqd
+cp 44c1_sm/resaux_1.vqd _44c1_sm_long.vqd
+
+GO
+
+>_44c1s_sm noninterleaved
+haux _44c1_sm_short.vqd 0,16,2
+
+>_44c1_sm noninterleaved
+haux _44c1_sm_long.vqd 0,64,2
+
+#iter 0
+
+#     0   1   1   2   2   4   8  16  32   +
+#         0  99   0  99   4   8  16  32   +
+
+#     0   1   2   3   4   5   6   7   8   9
+# 1                               .   .   .
+# 2                               .   .   .
+# 4       .   .   .   .   .   .           .
+
+:_p1_0 44c1_sm/res_part1_pass2.vqd, 8, nonseq cull, 0 +- 1
+:_p2_0 44c1_sm/res_part2_pass2.vqd, 4, nonseq cull, 0 +- 1 2
+:_p3_0 44c1_sm/res_part3_pass2.vqd, 4, nonseq cull, 0 +- 1 2
+:_p4_0 44c1_sm/res_part4_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
+:_p5_0 44c1_sm/res_part5_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4
+:_p6_0 44c1_sm/res_part6_pass2.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5 6 7 8
+
+
+:_p7_0 44c1_sm/res_part7_pass0.vqd, 4, nonseq cull, 0 +- 11
+:_p7_1 44c1_sm/res_part7_pass1.vqd, 2, nonseq cull, 0 +- 1 2 3 4 5
+
+:_p8_0 44c1_sm/res_part8_pass0.vqd, 2, nonseq cull, 0 +- 5 10 15 20 25 30
+:_p8_1 44c1_sm/res_part8_pass1.vqd, 2, nonseq cull, 0 +- 1 2
+
+:_p9_0 44c1_sm/res_part9_pass0.vqd, 2, nonseq, 0 +- 221 442 663 884 1105 1326
+:_p9_1 44c1_sm/res_part9_pass1.vqd, 2, nonseq, 0 +- 17 34 51 68 85 102
+:_p9_2 44c1_sm/res_part9_pass2.vqd, 2, nonseq, 0 +- 1 2 3 4 5 6 7 8

Modified: branches/monty-vorbis-aotuv-branch/vq/bookutil.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/vq/bookutil.h	2004-07-05 21:00:12 UTC (rev 7000)
+++ branches/monty-vorbis-aotuv-branch/vq/bookutil.h	2004-07-05 21:22:49 UTC (rev 7001)
@@ -21,7 +21,7 @@
#include <stdio.h>
#include <sys/time.h>

-#include "codebook.h"
+#include "localcodebook.h"

extern char     *get_line(FILE *in);
extern char     *setup_line(FILE *in);



More information about the commits mailing list