[xiph-commits] r6929 - in branches/monty-vorbis-aotuv-branch/lib: .
xiphmont at dactyl.lonelymoon.com
xiphmont
Tue Jun 29 18:18:14 PDT 2004
modes
Message-ID: <20040630011814.CA8C59AAAD at dactyl.lonelymoon.com>
Author: xiphmont
Date: Tue Jun 29 18:18:14 2004
New Revision: 6929
Modified:
branches/monty-vorbis-aotuv-branch/lib/info.c
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_X.h
branches/monty-vorbis-aotuv-branch/lib/psy.c
branches/monty-vorbis-aotuv-branch/lib/psy.h
Log:
Stright mindless code merge of AoTuV tunings (based on 1.0.1) and the
1.0.2 codebase. Some of the things AoTuV is doing look mildly broken
at first glance, I need to check more carefully. Do not expect this
code to work yet.
Modified: branches/monty-vorbis-aotuv-branch/lib/info.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/info.c 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/info.c 2004-06-30 01:18:10 UTC (rev 6929)
@@ -416,7 +416,7 @@
}
static int _vorbis_pack_comment(oggpack_buffer *opb,vorbis_comment *vc){
- char temp[]="Xiph.Org libVorbis I 20031230";
+ char temp[]="Xiph.Org libVorbis I 20040629";
int bytes = strlen(temp);
/* preamble */
Modified: branches/monty-vorbis-aotuv-branch/lib/mapping0.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/mapping0.c 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/mapping0.c 2004-06-30 01:18:10 UTC (rev 6929)
@@ -405,7 +405,9 @@
noise,
tone,
1,
- logmask);
+ logmask,
+ mdct,
+ logmdct);
#if 0
if(vi->channels==2){
@@ -435,7 +437,9 @@
noise,
tone,
2,
- logmask);
+ logmask,
+ mdct,
+ logmdct);
#if 0
if(vi->channels==2){
@@ -456,7 +460,9 @@
noise,
tone,
0,
- logmask);
+ logmask,
+ mdct,
+ logmdct);
#if 0
if(vi->channels==2)
@@ -523,6 +529,11 @@
psy_look,
info,
mag_memo);
+
+ hf_reduction(&ci->psy_g_param,
+ psy_look,
+ info,
+ mag_memo);
}
memset(sortindex,0,sizeof(*sortindex)*vi->channels);
Modified: branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/psych_44.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -105,138 +105,273 @@
};
/* 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[11]={
/* adjust for mode zero */
/* 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 */
- {{-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, 0, 0, 0, 0, 0, 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}}, /* 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}}, /* 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}}, /* 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}}, /* 10 */
+ /* 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 */
+ {{ -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[11]={
/* adjust for mode zero */
/* 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 */
- {{-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, 0, 0, 0, 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}}, /* 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}}, /* 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}}, /* 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}}, /* 10 */
+ /* 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 */
+ {{ -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 */
};
-static noise3 _psy_noisebias_trans_low[2]={
+// noise bias low-bitrate (impulse,padding,trans)
+ // q-2 added
+static noise3 _psy_noisebias_trans_low[3]={
/* 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) */
{{{-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,-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, 4, 10},
+ {-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}}},
};
-static noise3 _psy_noisebias_long_low[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, 4, 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}}},
{{{-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, -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, 2, 8},
- {-30,-30,-30,-30,-26,-22,-20,-14,-10, -8, -8, -8, -8, -6, -6, -6, -4}}},
+ {-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, -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, -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},
+ {-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}}},
+ {-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}}},
/* 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},
{-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}}},
/* 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, -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, -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, -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}}},
+ {-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}}},
+ {-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}}},
+ {-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},
@@ -255,11 +390,15 @@
{-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]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
/* 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,-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},
@@ -282,20 +421,32 @@
{-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},
+ {-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},
@@ -303,7 +454,7 @@
{-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]={
/* 63 125 250 500 1k 2k 4k 8k 16k*/
/* 0 */
@@ -315,8 +466,11 @@
{-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, -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},
@@ -352,6 +506,7 @@
{-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40}}},
};
+
static noiseguard _psy_noiseguards_44[4]={
{3,3,15},
{3,3,15},
@@ -359,28 +514,43 @@
{10,10,100},
};
+
static int _psy_tone_suppress[11]={
-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,
};
+// low-mode added
+static int _psy_tone_0dB_low[3]={
+ 90,90,90
+};
static int _psy_noise_suppress[11]={
- -20,-24,-24,-24,-24,-30,-40,-40,-45,-45,-45,
+ -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
-1,
+ // 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,
+ 1, -0.f, .5f, .5f, 0,0,0,
+ // noiseoffset*3, noisecompand, max_curve_dB
{{-1},{-1},{-1}},{-1},105.f,
-
+ // noise normalization - channel_p, point_p, start, partition, thresh.
0,0,-1,-1,0.,
};
@@ -389,7 +559,6 @@
static int _psy_ath_floater[11]={
-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,
};
@@ -403,24 +572,53 @@
/* various stereo possibilities */
/* stereo mode by base quality level */
-static adj_stereo _psy_stereo_modes_44_low[2]={
- /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 */
+// 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) */
{{ 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 */
+ /* 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, 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},
+ { 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},
+// {{ 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}},
/* 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},
@@ -428,9 +626,13 @@
{ 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},
+// {{ 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},
@@ -443,24 +645,40 @@
{ 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},
+ { 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},
+ { 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},
+ { 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},
+ { 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},
@@ -475,15 +693,20 @@
};
/* tone master attenuation by base quality mode and bitrate tweak */
-
-static att3 _psy_tone_masteratt_44_low[2]={
- {{ 34, 20, 8}, 0, 1.25}, /* 0 */
- {{ 34, 20, 8}, -2, 1.25}, /* 1 */
+// 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]={
{{ 30, 20, 8}, -2, 1.25}, /* 0 */
- {{ 25, 14, 4}, 0, 0}, /* 1 */
- {{ 20, 10, -2}, 0, 0}, /* 2 */
+// {{ 25, 14, 4}, 0, 0}, /* 1 */
+ {{ 23, 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 */
@@ -495,38 +718,51 @@
};
/* lowpass by mode **************/
-static double _psy_lowpass_44_low[2]={
- 15.1,15.1,
+// 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[11]={
- 15.1,15.8,16.5,17.9,20.5,48.,999.,999.,999.,999.,999.
+// 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,16,32,32,9999,9999,9999,9999
+ 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,128,256,512,512,9999,9999,9999,9999
+ 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
+ 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
+ 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,.3,.4,.5,.5,9999.,9999.,9999.,9999.,
+ .2,.2,.4,.6,9999.,9999.,9999.,9999.,9999.,9999.,
};
-static double _noise_thresh_44_2[2]={
- .5,.5,
+// 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,
+};
-
-static int _noise_start_short_44_low[2]={
- 32,32
+// q-2 added
+static int _noise_start_short_44_low[3]={
+ 32,32,32
};
-static int _noise_start_long_44_low[2]={
- 256,256
+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-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/residue_44.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -252,3 +252,9 @@
{ _map_nominal, _res_44s_8 }, /* 8 */
{ _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-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/residue_44u.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -294,3 +294,9 @@
{ _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-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_32.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -25,16 +25,19 @@
86000.,92000.,110000.,120000.,140000.,190000.,
};
-static double rate_mapping_32_low[2]={
- 20000.,28000.
+static double rate_mapping_32_low[3]={
+// 20000.,28000.
+ 18000.,22000.,28000.
};
-static double rate_mapping_32_un_low[2]={
- 24000.,42000.,
+static double rate_mapping_32_un_low[3]={
+// 24000.,42000.,
+ 30000.,32000.,42000.
};
-static double _psy_lowpass_32_low[2]={
- 13.,13.,
+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.
@@ -143,7 +146,8 @@
};
ve_setup_data_template ve_setup_32_stereo_low={
- 1,
+// 1,
+ 2,
rate_mapping_32_low,
quality_mapping_44_stereo_low,
2,
@@ -154,27 +158,36 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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,
+ _noise_thresh_44_low,
_psy_ath_floater,
_psy_ath_abs,
@@ -190,12 +203,14 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_stereo
+// _mapres_template_44_stereo
+ _mapres_template_44_stereo_low
};
ve_setup_data_template ve_setup_32_uncoupled_low={
- 1,
+// 1,
+ 2,
rate_mapping_32_un_low,
quality_mapping_44_stereo_low,
-1,
@@ -206,23 +221,31 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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},
@@ -242,5 +265,6 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_uncoupled
+// _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-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_44.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -19,26 +19,34 @@
#include "modes/residue_44.h"
#include "modes/psych_44.h"
-static double rate_mapping_44_stereo_low[2]={
- 22500.,32000.
+// 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.,
80000.,96000.,112000.,128000.,160000.,250001.
};
-static double quality_mapping_44_stereo_low[2]={
- -.1,.0,
+
+
+static double quality_mapping_44_stereo_low[3]={
+// -.1,.0,
+ -.2,-.1,.0,
};
static double quality_mapping_44[11]={
.0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1.0
};
-static int blocksize_short_44_low[1]={
- 512
+
+// q-2 added
+static int blocksize_short_44_low[2]={
+ 512,512
};
-static int blocksize_long_44_low[1]={
- 4096
+static int blocksize_long_44_low[2]={
+ 4096,4096
};
static int blocksize_short_44[10]={
@@ -47,24 +55,41 @@
static int blocksize_long_44[10]={
2048,2048,2048,2048,2048,2048,2048,2048,2048,2048
};
+
+// 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 _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.5, 4., 4.
+ 1., 1., 1.5, 2., 2., 2.5, 2.7, 3.0, 3.7, 4., 4.
};
-static double _global_mapping_44_low[2]={
- 0., 1.,
+static double _global_mapping_44_low[3]={
+// 0., 1.,
+ 0., 0., 1.,
};
-static int _floor_short_mapping_44_low[1]={
- 1,
+
+// 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[1]={
- 8
+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
};
@@ -72,6 +97,7 @@
7,7,7,7,7,7,7,7,7,7
};
+// definition
ve_setup_data_template ve_setup_44_stereo={
10,
rate_mapping_44_stereo,
@@ -124,7 +150,8 @@
};
ve_setup_data_template ve_setup_44_stereo_low={
- 1,
+// 1,
+ 2,
rate_mapping_44_stereo_low,
quality_mapping_44_stereo_low,
2,
@@ -135,27 +162,36 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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,
+ _noise_thresh_44_low,
_psy_ath_floater,
_psy_ath_abs,
@@ -171,6 +207,7 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_stereo
+// _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-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_44u.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -22,8 +22,9 @@
96000.,110000.,120000.,140000.,160000.,240001.
};
-static double rate_mapping_44_un_low[2]={
- 32000.,48000.
+static double rate_mapping_44_un_low[3]={
+// 32000.,48000.
+ 32000.,36000.,48000.
};
ve_setup_data_template ve_setup_44_uncoupled={
@@ -78,7 +79,8 @@
};
ve_setup_data_template ve_setup_44_uncoupled_low={
- 1,
+// 1,
+ 2,
rate_mapping_44_un_low,
quality_mapping_44_stereo_low,
-1,
@@ -89,27 +91,36 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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,
+// _noise_thresh_44,
+ _noise_thresh_44_low,
_psy_ath_floater,
_psy_ath_abs,
@@ -125,5 +136,6 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_uncoupled
+// _mapres_template_44_uncoupled
+ _mapres_template_44_uncoupled_low
};
Modified: branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/modes/setup_X.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -123,7 +123,8 @@
};
ve_setup_data_template ve_setup_X_stereo_low={
- 1,
+// 1,
+ 2,
rate_mapping_X,
quality_mapping_44_stereo_low,
2,
@@ -134,27 +135,36 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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,
+ _noise_thresh_44_low,
_psy_ath_floater,
_psy_ath_abs,
@@ -163,6 +173,7 @@
_psy_global_44,
_global_mapping_44,
+// (not _global_mapping_44_low)
_psy_stereo_modes_44_low,
_floor_books,
@@ -170,12 +181,14 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_stereo
+// _mapres_template_44_stereo
+ _mapres_template_44_stereo_low
};
ve_setup_data_template ve_setup_X_uncoupled_low={
- 1,
+// 1,
+ 2,
rate_mapping_X,
quality_mapping_44_stereo_low,
-1,
@@ -186,23 +199,31 @@
blocksize_long_44_low,
_psy_tone_masteratt_44_low,
- _psy_tone_0dB,
- _psy_tone_suppress,
+// _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,
+// _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,
+ _psy_noise_suppress_low,
_psy_compand_44,
- _psy_compand_short_mapping,
- _psy_compand_long_mapping,
+// _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},
@@ -215,6 +236,7 @@
_psy_global_44,
_global_mapping_44,
+// (not _global_mapping_44_low)
NULL,
_floor_books,
@@ -222,7 +244,8 @@
_floor_short_mapping_44_low,
_floor_long_mapping_44_low,
- _mapres_template_44_uncoupled
+// _mapres_template_44_uncoupled
+ _mapres_template_44_uncoupled_low
};
ve_setup_data_template ve_setup_XX_stereo={
Modified: branches/monty-vorbis-aotuv-branch/lib/psy.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/psy.c 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/psy.c 2004-06-30 01:18:10 UTC (rev 6929)
@@ -31,6 +31,7 @@
#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;
@@ -283,6 +284,12 @@
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;i<MAX_ATH-1;i++){
@@ -845,14 +852,54 @@
float *noise,
float *tone,
int offset_select,
- float *logmask){
+ float *logmask,
+ float *mdct,
+ float *logmdct){
int i,n=p->n;
+ float de, coeffi, cx=1.0, cy=1.0; /* AoTuV */
float toneatt=p->vi->tone_masteratt[offset_select];
+
+ cx = p->m_val;
+ if(offset_select != 1) cx = 0; // XXX
for(i=0;i<n;i++){
float val= noise[i]+p->noiseoffset[offset_select][i];
if(val>p->vi->noisemaxsupp)val=p->vi->noisemaxsupp;
logmask[i]=max(val,tone[i]+toneatt);
+
+
+ /* AoTuV */
+ /** @ M1 **
+ The following codes improve a noise problem.
+ A fundamental idea uses the value of masking and carries out
+ the relative compensation of the MDCT.
+ However, this code is not perfect and all noise problems cannot be solved.
+ by Aoyumi @ 2004/04/18
+ */
+ if(logmask[i] != (tone[i]+toneatt)){
+ // partial masking value is used here.
+ coeffi = -17.2*cy;
+ val = val - logmdct[i];
+ if(val > coeffi){
+ de = 1.0-((val-coeffi)*0.005*cx);
+ if(de < 0) de = 0.0001;
+ }else
+ de = 1.0-((val-coeffi)*0.0003*cx);
+
+ mdct[i] *= de;
+ }else{
+ // A masking value is used here.
+ coeffi = -57*cy;
+ val = logmask[i];
+ if(val > coeffi){
+ de = 1.0-((val-coeffi)*0.005*cx);
+ if(de < 0) de = 0.0001;
+ }else
+ de = 1.0-((val-coeffi)*0.0003*cx);
+
+ mdct[i] *= de;
+ }
+
}
}
@@ -1107,6 +1154,10 @@
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]]; // XXXX
+
for(j=0;j<p->n;j+=partition){
float acc=0.f;
@@ -1146,3 +1197,25 @@
}
}
+/* 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; i<vi->coupling_steps; i++){
+ for(j=start; j<limit; j++){} // ???
+ for(; j<n; j++)
+ mdct[i][j] *= (1.0 - de*((float)(j-limit) / (float)(n-limit)));
+ }
+}
Modified: branches/monty-vorbis-aotuv-branch/lib/psy.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/psy.h 2004-06-29 21:43:47 UTC (rev 6928)
+++ branches/monty-vorbis-aotuv-branch/lib/psy.h 2004-06-30 01:18:10 UTC (rev 6929)
@@ -109,6 +109,9 @@
int eighth_octave_lines; /* power of two, please */
int total_octave_lines;
long rate; /* cache it */
+
+ float m_val; /* Masking compensation value */
+
} vorbis_look_psy;
extern void _vp_psy_init(vorbis_look_psy *p,vorbis_info_psy *vi,
@@ -139,7 +142,9 @@
float *noise,
float *tone,
int offset_select,
- float *logmask);
+ float *logmask,
+ float *mdct,
+ float *logmdct);
extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);
@@ -171,5 +176,11 @@
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
More information about the commits
mailing list