[xiph-cvs] cvs commit: vorbis/lib/modes psych_44.h
Monty
xiphmont at xiph.org
Sat Dec 22 01:40:41 PST 2001
xiphmont 01/12/22 01:40:41
Modified: lib masking.h psy.c vorbisenc.c
lib/modes psych_44.h
Log:
Tuned out Dibrom's tone/noise masking bug. The problem was the
long-suspect 8kHz data from Fielder's paper; now we have proof it's
wrong.
Monty
Revision Changes Path
1.21 +29 -53 vorbis/lib/masking.h
Index: masking.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/masking.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- masking.h 2001/12/20 01:00:28 1.20
+++ masking.h 2001/12/22 09:40:39 1.21
@@ -11,7 +11,7 @@
********************************************************************
function: masking curve data for psychoacoustics
- last mod: $Id: masking.h,v 1.20 2001/12/20 01:00:28 segher Exp $
+ last mod: $Id: masking.h,v 1.21 2001/12/22 09:40:39 xiphmont Exp $
********************************************************************/
@@ -166,77 +166,53 @@
-900,-900,-900,-900,-900,-900,-900,-900};
+/* here the data collected by ehmer is clearly suspect as I have
+ several samples that provide counterexamples. the data below is
+ derated from Ehmers original numbers */
+
static float tone_8000_40dB_SL[EHMER_MAX]={
-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900, -10, 3, 10, 18,
- 26, 21, 14, 5, 0, 0, 5, 10, 20, 35, 55, 45, 70, 70, 70, 70,
+ 26, 21, 14, 5, 0, 0, 0, 0, 20, 35, 55, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, -900,-900,-900,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
static float tone_8000_60dB_SL[EHMER_MAX]={
-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900, -10, 5, 12, 30,
- 43, 40, 36, 35, 36, 38, 41, 43, 45, 60, 70, 70, 70, 70, 70, 70,
+ 43, 34, 22, 15, 10, 5, 0, 0, 20, 55, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, -900,-900,-900,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
static float tone_8000_80dB_SL[EHMER_MAX]={
-900,-900,-900,-900,-900,-900,-900, -10, -1, 2, 6, 10, 13, 19, 25, 35,
- 63, 59, 57, 56, 57, 59, 61, 62, 63, 65, 70, 70, 70, 70, 70, 70,
- 70, 70, 70, 70,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
+ 63, 50, 35, 35, 36, 36, 36, 31, 40, 55, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, -900,-900,-900,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
static float tone_8000_100dB_SL[EHMER_MAX]={
-18, -12, -7, -3, 0, 2, 5, 8, 10, 14, 18, 20, 20, 22, 40, 40,
- 70, 50, 30, 30, 30, 30, 30, 30, 30, 40, 70, 70, 70, 70, 70, 70,
+ 70, 50, 30, 30, 30, 30, 30, 32, 43, 55, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, -900,-900,-900,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
-
-#if 0 /* not used for the time being */
-static float noise_500_60dB_SL[EHMER_MAX]={
--900,-900,-900,-900,-900, -20, -11, -2, 7, 16, 25, 34, 43, 52, 61, 66,
- 69, 68, 58, 50, 44, 38, 32, 28, 25, 24, 20, 18, 17, 12, 10, 8,
- 5, 0, -5, -8, -12, -15, -18, -22, -900,-900,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
-static float noise_500_80dB_SL[EHMER_MAX]={
--900,-900,-900, -20, -10, -1, 8, 17, 26, 35, 44, 53, 62, 70, 79, 83,
- 85, 85, 81, 77, 74, 71, 68, 63, 61, 59, 56, 55, 54, 52, 48, 47,
- 45, 46, 45, 43, 40, 37, 33, 32, 35, 32, 30, 29, 20, 10, 0, -10,
- -20, -30,-900,-900,-900,-900,-900,-900};
-
-static float noise_1000_60dB_SL[EHMER_MAX]={
--900,-900,-900,-900, -24, -15, -6, 3, 12, 21, 28, 34, 40, 48, 57, 60,
- 61, 56, 54, 45, 36, 27, 21, 19, 17, 13, 10, 0, -10, -20, -20,-900,
--900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
+/* a complete guess, but reasonably conservative and borne out by some
+ empirical testing */
-static float noise_1000_80dB_SL[EHMER_MAX]={
--900, -26, -17, -8, 1, 10, 19, 28, 37, 41, 46, 51, 58, 68, 74, 81,
- 80, 81, 70, 66, 58, 61, 59, 55, 54, 53, 52, 49, 48, 42, 38, 38,
- 39, 34, 30, 27, 20, 10, 0, -10, -20, -30,-900,-900,-900,-900,-900,-900,
+static float tone_16000_40dB_SL[EHMER_MAX]={
+-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900, -10, 3, 10, 18,
+ 26, 35, 55, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
-
-static float noise_2000_60dB_SL[EHMER_MAX]={
--900,-900,-900, -34, -25, -16, -7, 2, 11, 18, 23, 30, 35, 42, 51, 58,
- 58, 57, 50, 40,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
+static float tone_16000_60dB_SL[EHMER_MAX]={
+-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900, -10, 5, 12, 30,
+ 43, 55, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
-
-static float noise_2000_80dB_SL[EHMER_MAX]={
--900, -26, -17, -8, 1, 10, 19, 28, 33, 38, 43, 48, 53, 62, 70, 77,
- 77, 75, 70, 67, 68, 66, 62, 61, 60, 59, 52, 47, 39, 35, 34, 35,
- 35, 33, 30, 27, 20, 10, 0, -10, -20, -30,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
-
-static float noise_4000_60dB_SL[EHMER_MAX]={
--900,-900,-900, -34, -25, -16, -7, 2, 11, 20, 25, 31, 37, 45, 56, 62,
- 64, 61,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
+ -900,-900,-900,-900,-900,-900,-900,-900};
+static float tone_16000_80dB_SL[EHMER_MAX]={
+-900,-900,-900,-900,-900,-900,-900, -10, -1, 2, 6, 10, 13, 19, 25, 35,
+ 63, 55, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
-
-static float noise_4000_80dB_SL[EHMER_MAX]={
--900, -26, -17, -8, 1, 10, 19, 26, 33, 39, 45, 50, 55, 65, 75, 82,
- 84, 81, 78, 72, 70, 69, 66, 61, 50, 48, 46, 40, 35, 30, 25, 20,
- 15, 10, 5, 0, -10, -20, -30,-900, -900,-900,-900,-900,-900,-900,-900,-900,
--900,-900,-900,-900,-900,-900,-900,-900};
+ -900,-900,-900,-900,-900,-900,-900,-900};
+static float tone_16000_100dB_SL[EHMER_MAX]={
+ -18, -12, -7, -3, 0, 2, 5, 8, 10, 14, 18, 20, 20, 22, 40, 40,
+ 70, 55, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+-900,-900,-900,-900,-900,-900,-900,-900, -900,-900,-900,-900,-900,-900,-900,-900,
+ -900,-900,-900,-900,-900,-900,-900,-900};
#endif
-#endif
-
-
1.64 +5 -5 vorbis/lib/psy.c
Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- psy.c 2001/12/21 15:24:43 1.63
+++ psy.c 2001/12/22 09:40:39 1.64
@@ -11,7 +11,7 @@
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.63 2001/12/21 15:24:43 segher Exp $
+ last mod: $Id: psy.c,v 1.64 2001/12/22 09:40:39 xiphmont Exp $
********************************************************************/
@@ -296,10 +296,10 @@
memcpy(p->tonecurves[14][8]+2,tone_8000_80dB_SL,sizeof(*p->tonecurves[14][8])*EHMER_MAX);
memcpy(p->tonecurves[14][10]+2,tone_8000_100dB_SL,sizeof(*p->tonecurves[14][10])*EHMER_MAX);
- memcpy(p->tonecurves[16][4]+2,tone_8000_40dB_SL,sizeof(*p->tonecurves[16][4])*EHMER_MAX);
- memcpy(p->tonecurves[16][6]+2,tone_8000_60dB_SL,sizeof(*p->tonecurves[16][6])*EHMER_MAX);
- memcpy(p->tonecurves[16][8]+2,tone_8000_80dB_SL,sizeof(*p->tonecurves[16][8])*EHMER_MAX);
- memcpy(p->tonecurves[16][10]+2,tone_8000_100dB_SL,sizeof(*p->tonecurves[16][10])*EHMER_MAX);
+ memcpy(p->tonecurves[16][4]+2,tone_16000_40dB_SL,sizeof(*p->tonecurves[16][4])*EHMER_MAX);
+ memcpy(p->tonecurves[16][6]+2,tone_16000_60dB_SL,sizeof(*p->tonecurves[16][6])*EHMER_MAX);
+ memcpy(p->tonecurves[16][8]+2,tone_16000_80dB_SL,sizeof(*p->tonecurves[16][8])*EHMER_MAX);
+ memcpy(p->tonecurves[16][10]+2,tone_16000_100dB_SL,sizeof(*p->tonecurves[16][10])*EHMER_MAX);
for(i=0;i<P_BANDS;i+=2)
for(j=4;j<P_LEVELS;j+=2)
1.31 +2 -2 vorbis/lib/vorbisenc.c
Index: vorbisenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisenc.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- vorbisenc.c 2001/12/21 14:52:36 1.30
+++ vorbisenc.c 2001/12/22 09:40:39 1.31
@@ -11,7 +11,7 @@
********************************************************************
function: simple programmatic interface for encoder mode setup
- last mod: $Id: vorbisenc.c,v 1.30 2001/12/21 14:52:36 segher Exp $
+ last mod: $Id: vorbisenc.c,v 1.31 2001/12/22 09:40:39 xiphmont Exp $
********************************************************************/
@@ -224,7 +224,7 @@
}
p->tone_masteratt=att[iq]*(1.-dq)+att[iq+1]*dq;
- p->max_curve_dB=max[iq];
+ p->max_curve_dB=max[iq]*(1.-dq)+max[iq+1]*dq;
p->curvelimitp=peaklimit_bands[iq];
iq=q*5.;
1.7 +5 -5 vorbis/lib/modes/psych_44.h
Index: psych_44.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/psych_44.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- psych_44.h 2001/12/20 01:00:37 1.6
+++ psych_44.h 2001/12/22 09:40:40 1.7
@@ -11,7 +11,7 @@
********************************************************************
function: key psychoacoustic settings for 44.1/48kHz
- last mod: $Id: psych_44.h,v 1.6 2001/12/20 01:00:37 segher Exp $
+ last mod: $Id: psych_44.h,v 1.7 2001/12/22 09:40:40 xiphmont Exp $
********************************************************************/
@@ -614,17 +614,17 @@
{
0.f, 15.f, 15.f, 15.f, 11.f, 10.f, 8.f, 7.f, 7.f, 7.f,
6.f, 2.f, 0.f, 0.f, -2.f, -5.f, -6.f, -6.f, -4.f, 4.f,
- 14.f, 20.f, 19.f, 17.f, 30.f, 60.f, 60.f,
+ 14.f, 20.f, 19.f, 17.f, 30.f, 60.f, 70.f,
},
{
0.f, 15.f, 15.f, 15.f, 11.f, 10.f, 8.f, 7.f, 7.f, 7.f,
6.f, 2.f, 0.f, 0.f, -2.f, -5.f, -6.f, -6.f, -4.f, 0.f,
- 2.f, 6.f, 5.f, 5.f, 15.f, 25.f, 35.f,
+ 2.f, 6.f, 5.f, 5.f, 15.f, 30.f, 50.f,
},
{
0.f, 15.f, 15.f, 15.f, 11.f, 10.f, 8.f, 7.f, 7.f, 7.f,
- 6.f, 2.f, 0.f, 0.f, -3.f, -5.f, -6.f, -6.f,-4.5f, 0.f,
- 2.f, 6.f, 5.f, 5.f, 15.f, 15.f, 15.f,
+ 6.f, 2.f, 0.f, 0.f, -3.f, -5.f, -6.f, -6.f, -4.5f, -4.f,
+ 2.f, 6.f, 5.f, 5.f, 15.f, 20.f, 40.f,
}
};
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list