Commit af331b92 authored by Monty's avatar Monty

OK, time to take this branch live before we tweak more.

Monty

svn path=/branches/monty_branch_20000524/vorbis/; revision=444
parent ac8339e4
......@@ -20,59 +20,67 @@
#include "vorbis/codebook.h"
static long _huff_lengthlist_resaux0b_long[] = {
12,17,18,18,18,17,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,14,13,15,14,
16,15,16,18,18,17,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,16,13,16,15,14,16,16,17,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,17,12,15,13,12,13,14,14,14,15,16,17,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,12,12,11, 9,11,10,12,12,13,16,17,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,17,12,14,12,
11,12,12,12,13,13,15,16,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,13,11,10, 7, 9, 7, 9,
9,10,14,15,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,13,13,11,10,10,11,10,11,10,14,13,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,13,12,10, 7, 8, 7, 8, 8, 9,13,13,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,13,13,10,
9, 8, 8, 7, 9, 7,12, 9,18,14,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,14,14,11, 9, 9, 8, 8,
8, 7, 8, 9,18,12,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,13,13,11,10,10, 9, 8, 8, 7, 7, 7,
18,11,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,17,18,14,16,10,14, 7,11, 4, 5,18,11,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,16,17,15,
15,14,13,13,10,11, 7, 8,18,13,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18, 3, 9,15,12,17,13,17,14,18,15,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18, 5, 5, 7, 7,10, 8,12, 9,13,10,15,14,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18, 8, 6,
5, 6, 8, 9,11,10,12,12,16,16,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18, 5, 6, 6, 5, 7, 7,
9, 8,11,10,14,13,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,11, 8, 6, 6, 5, 7, 6, 9, 8,11,
13,16,17,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18, 8, 7, 8, 6, 7, 6, 8, 7, 9, 9,14,14,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,14,11,
10, 8, 6, 8, 6, 9, 8,11,13,16,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,10, 8, 9, 7, 8, 6,
8, 7, 9, 8,13,13,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,15,12,11, 9, 8, 9, 8, 9, 8,11,
14,16,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,12, 9,11, 8,10, 8,10, 8,11, 8,15,12,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,17,14,
15,14,13,13,13,14,13,15,15,16,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,14,12,16,12,16,13,
17,12,18,11,18,14,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,
18,18,18,18,18,17,18,17,18,17,18,15,18,17,18,18,
12,15,20,17,20,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,16,16,
16,15,17,17,16,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,15,15,15,17,17,
16,17,17,17,19,18,18,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,18,19,19,17,19,
18,19,18,19,19,19,19,18,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,19,18,19,19,19,19,19,19,19,19,
19,18,19,18,18,17,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,15,14,16,15,16,16,15,17,15,15,15,16,
16,17,19,15,19,19,19,19,19,19,19,19,19,19,19,19,
19,19,19,16,19,16,18,19,16,19,16,16,15,18,16,17,
17,15,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
14,13,16,14,15,16,14,15,14,15,14,16,16,16,15,14,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,15,
18,15,16,16,14,15,13,13,13,13,13,13,14,12,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,14,13,16,14,
14,16,13,13,12,11,11,11,12,12,12,11,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,14,14,17,15,14,15,
13,12,12,10,10,10,10,11,11,11,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,14,13,16,14,15,14,13,12,
12, 9, 9, 9, 9,10,10,11,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,16,13,17,13,14,14,12,11,11, 9,
8, 8, 8, 9, 9,10,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,16,14,17,14,14,14,12,11,12, 8, 8, 7,
7, 8, 2, 7,12,10,13,14,10,15,10,16,10,12,13,14,
16,18,15,12,16,12,14,14,11,11,11, 8, 7, 7, 7, 7,
5, 5, 7, 6, 8,10, 8,11, 9,12,11,12,14,15,16,18,
19,19,19,19,19,19,19,19,19,19,19,19,19,19, 8, 6,
6, 7, 7, 9, 9,11,10,12,12,15,16,18,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,19,19, 6, 6, 7, 6,
7, 8, 7,10, 9,10,10,12,14,16,16,17,19,19,19,19,
19,19,19,19,19,19,19,19,19,19, 8, 7, 7, 6, 6, 7,
7, 8, 9, 9,11,13,15,17,18,17,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,11, 8, 8, 8, 7, 7, 8, 8,
10, 9,11,13,16,17,16,19,19,19,19,19,19,19,19,19,
19,19,19,19,19,19, 8, 7, 8, 7, 7, 8, 7, 8, 8, 8,
9,11,13,14,16,17,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,12,10, 9, 8, 7, 8, 7, 8, 9, 8,10,12,
14,16,17,19,19,19,19,19,19,19,19,19,19,19,19,19,
19,19, 9, 8, 9, 7, 8, 9, 7, 9, 8, 8, 8,11,12,14,
16,17,19,19,19,19,19,19,19,19,19,19,19,19,19,19,
12,10,10, 8, 8, 8, 7, 7, 8, 7, 8,10,12,15,16,17,
19,19,19,19,19,19,19,19,19,19,19,19,19,19,11, 9,
10, 8, 9, 9, 7, 8, 7, 8, 7, 9,10,12,14,15,19,19,
19,19,19,19,19,19,19,19,19,19,19,19,12,11,13,10,
10,11, 8,10, 8, 9, 8, 9,10,11,13,14,19,19,19,19,
19,19,19,19,19,19,19,19,19,19,12,12,13,11,11,12,
9,11, 9,10, 8, 9,10,12,13,14,19,19,19,19,19,19,
19,19,19,19,19,19,19,19,12,13,15,12,13,14,11,12,
10,11,10,10,11,12,14,14,19,19,19,19,19,19,19,19,
19,19,19,19,19,19,13,14,15,14,14,14,12,14,11,12,
11,11,12,13,14,15,19,19,19,19,19,19,19,19,19,19,
19,19,19,19,12,13,14,14,14,14,13,14,12,13,12,12,
12,13,13,13,
};
static static_codebook _huff_book_resaux0b_long = {
2, 784,
2, 900,
_huff_lengthlist_resaux0b_long,
0, 0, 0, 0, 0,
NULL,
......
......@@ -12,7 +12,7 @@
********************************************************************
function: predefined encoding modes
last mod: $Id: modes.h,v 1.10.2.7 2000/06/12 00:31:15 xiphmont Exp $
last mod: $Id: modes.h,v 1.10.2.8 2000/06/14 01:24:18 xiphmont Exp $
********************************************************************/
......@@ -77,12 +77,12 @@ static vorbis_info_psy _psy_set0={
{-35.,-40.,-60.,-80.,-100.},
1,/* peakattp */
{-12.,-12.,-12.,-16.,-18.},
{-12.,-12.,-12.,-16.,-18.},
{-12.,-12.,-12.,-16.,-18.},
{-12.,-12.,-12.,-16.,-18.},
{-12.,-12.,-12.,-16.,-18.},
{-10.,-10.,-12.,-16.,-18.},
{-12.,-12.,-12.,-16.,-16.},
{-12.,-12.,-12.,-16.,-16.},
{-12.,-12.,-12.,-16.,-16.},
{-12.,-12.,-12.,-16.,-16.},
{-12.,-12.,-12.,-16.,-16.},
{-10.,-10.,-12.,-16.,-16.},
{-6.,-8.,-10.,-12.,-12.},
1,/*noisemaskp */
......@@ -92,7 +92,7 @@ static vorbis_info_psy _psy_set0={
{-60.,-60.,-60.,-80.,-80.},
{-60.,-60.,-60.,-80.,-80.},
{-60.,-60.,-60.,-80.,-80.},
{-55.,-55.,-60.,-80.,-80.},
{-52.,-55.,-60.,-80.,-80.},
100.,
......@@ -123,7 +123,7 @@ static vorbis_info_residue0 _residue_set1={0,768, 64,28,3,
{0,16,9999,30,9999,41,9999,47,9999,60,9999,128,9999},
{1.5,1.5,1.5,2.5,2.5,3.5,3.5,5,5,9,9,18,18},
{6,6,6,6,6,6,6,6,6,6,6,6,6},/*6==64*/
4,-1};
2,-1};
static vorbis_info_mapping0 _mapping_set0={1, {0,0}, {0}, {0}, {0}, {0}};
static vorbis_info_mapping0 _mapping_set1={1, {0,0}, {0}, {1}, {1}, {0}};
......
......@@ -12,7 +12,7 @@
********************************************************************
function: masking curve data for psychoacoustics
last mod: $Id: masking.h,v 1.2.2.1 2000/05/24 21:17:01 xiphmont Exp $
last mod: $Id: masking.h,v 1.2.2.2 2000/06/14 01:24:18 xiphmont Exp $
********************************************************************/
......@@ -190,7 +190,7 @@ double noise_1000_80dB_SL[EHMER_MAX]={
double 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, 30, 21, 15, 10, 0, -10, -20, -30,-900,-900,-900,-900,
58, 57, 50, 40,-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,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
......@@ -202,7 +202,7 @@ double noise_2000_80dB_SL[EHMER_MAX]={
double noise_4000_60dB_SL[EHMER_MAX]={
-900,-900,-900, -34, -25, -16, -7, 2, 11, 20, 25, 31, 37, 45, 56, 62,
64, 61, 50, 35, 25, 15, 5, -5, -15 -25, -35,-900,-900,-900,-900,-900,
64, 61,-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,-900,-900,-900,-900,-900,
-900,-900,-900,-900,-900,-900,-900,-900};
......
......@@ -12,7 +12,7 @@
********************************************************************
function: psychoacoustics not including preecho
last mod: $Id: psy.c,v 1.20.2.3 2000/06/09 01:07:34 xiphmont Exp $
last mod: $Id: psy.c,v 1.20.2.4 2000/06/14 01:24:18 xiphmont Exp $
********************************************************************/
......@@ -530,26 +530,6 @@ static void quarter_octave_noise(vorbis_look_psy *p,double *f,double *noise){
}
}
static void eighth_octave_noise(vorbis_look_psy *p,double *f,double *noise){
long i,n=p->n;
long lo=0,hi=0;
double acc=0.;
for(i=0;i<n;i++){
/* not exactly correct, (the center frequency should be centered
on a *log* scale), but not worth quibbling */
long newhi=i*_eights[17]+noiseBIAS;
long newlo=i*_eights[16]-noiseBIAS;
if(newhi>n)newhi=n;
for(;lo<newlo;lo++)
acc-=todB(f[lo]); /* yeah, this ain't RMS */
for(;hi<newhi;hi++)
acc+=todB(f[hi]);
noise[i]=fromdB(acc/(hi-lo));
}
}
/* stability doesn't matter */
static int comp(const void *a,const void *b){
if(fabs(**(double **)a)<fabs(**(double **)b))
......@@ -582,7 +562,7 @@ void _vp_compute_mask(vorbis_look_psy *p,double *f,
/* don't use the smoothed data for noise */
if(p->vi->noisemaskp){
eighth_octave_noise(p,f,work2);
quarter_octave_noise(p,f,work2);
seed_generic(p,p->noisecurves,work2,flr,specmax);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment