[xiph-cvs] cvs commit: vorbis/lib/modes floor_44.h psych_44.h residue_44.h
Monty
xiphmont at xiph.org
Wed Dec 5 00:03:22 PST 2001
xiphmont 01/12/05 00:03:21
Modified: lib Tag: branch_monty_20011009 bitrate.c block.c
envelope.c mapping0.c masking.h psy.c registry.c
vorbisenc.c
lib/modes Tag: branch_monty_20011009 floor_44.h psych_44.h
residue_44.h
Log:
Incremental commit
Revision Changes Path
No revision
No revision
1.1.2.6 +4 -4 vorbis/lib/Attic/bitrate.c
Index: bitrate.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/Attic/bitrate.c,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- bitrate.c 2001/12/04 11:16:19 1.1.2.5
+++ bitrate.c 2001/12/05 08:03:16 1.1.2.6
@@ -11,7 +11,7 @@
********************************************************************
function: bitrate tracking and management
- last mod: $Id: bitrate.c,v 1.1.2.5 2001/12/04 11:16:19 xiphmont Exp $
+ last mod: $Id: bitrate.c,v 1.1.2.6 2001/12/05 08:03:16 xiphmont Exp $
********************************************************************/
@@ -85,7 +85,7 @@
void vorbis_bitrate_init(vorbis_info *vi,bitrate_manager_state *bm){
int i;
codec_setup_info *ci=vi->codec_setup;
- bitrate_manager_info *bi=ci->bi;
+ bitrate_manager_info *bi=&ci->bi;
long maxlatency;
memset(bm,0,sizeof(*bm));
@@ -199,7 +199,7 @@
bitrate_manager_state *bm=&b->bms;
vorbis_info *vi=vd->vi;
codec_setup_info *ci=vi->codec_setup;
- bitrate_manager_info *bi=ci->bi;
+ bitrate_manager_info *bi=&ci->bi;
int eofflag=vb->eofflag;
int head=bm->queue_head;
int next_head=head+1;
@@ -363,7 +363,7 @@
if(bm->avgnoise>bi->avgfloat_noise_maxval)
bm->avgnoise=bi->avgfloat_noise_maxval;
}
- fprintf(stderr,"noise:%f req:%d trigger:%d\n",bm->avgnoise,
+ fprintf(stderr,"noise:%f req:%ld trigger:%ld\n",bm->avgnoise,
bm->noisetrigger_request,bm->noisetrigger_postpone);
}
1.50.2.7 +2 -2 vorbis/lib/block.c
Index: block.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/block.c,v
retrieving revision 1.50.2.6
retrieving revision 1.50.2.7
diff -u -r1.50.2.6 -r1.50.2.7
--- block.c 2001/11/22 06:21:07 1.50.2.6
+++ block.c 2001/12/05 08:03:16 1.50.2.7
@@ -11,7 +11,7 @@
********************************************************************
function: PCM data vector blocking, windowing and dis/reassembly
- last mod: $Id: block.c,v 1.50.2.6 2001/11/22 06:21:07 xiphmont Exp $
+ last mod: $Id: block.c,v 1.50.2.7 2001/12/05 08:03:16 xiphmont Exp $
Handle windowing, overlap-add, etc of the PCM vectors. This is made
more amusing by Vorbis' current two allowed block sizes.
@@ -492,7 +492,7 @@
codec_setup_info *ci=vi->codec_setup;
backend_lookup_state *b=v->backend_state;
vorbis_look_psy_global *g=b->psy_g_look;
- vorbis_info_psy_global *gi=ci->psy_g_param;
+ vorbis_info_psy_global *gi=&ci->psy_g_param;
long beginW=v->centerW-ci->blocksizes[v->W]/2,centerNext;
/* check to see if we're started... */
1.38.2.1 +3 -3 vorbis/lib/envelope.c
Index: envelope.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/envelope.c,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- envelope.c 2001/10/02 00:14:30 1.38
+++ envelope.c 2001/12/05 08:03:17 1.38.2.1
@@ -11,7 +11,7 @@
********************************************************************
function: PCM data envelope analysis and manipulation
- last mod: $Id: envelope.c,v 1.38 2001/10/02 00:14:30 segher Exp $
+ last mod: $Id: envelope.c,v 1.38.2.1 2001/12/05 08:03:17 xiphmont Exp $
Preecho calculation.
@@ -82,7 +82,7 @@
void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi){
codec_setup_info *ci=vi->codec_setup;
- vorbis_info_psy_global *gi=ci->psy_g_param;
+ vorbis_info_psy_global *gi=&ci->psy_g_param;
int ch=vi->channels;
int window=gi->envelopesa;
int i;
@@ -151,7 +151,7 @@
long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint){
vorbis_info *vi=v->vi;
codec_setup_info *ci=vi->codec_setup;
- vorbis_info_psy_global *gi=ci->psy_g_param;
+ vorbis_info_psy_global *gi=&ci->psy_g_param;
envelope_lookup *ve=((backend_lookup_state *)(v->backend_state))->ve;
long i,j,k;
1.37.2.11 +4 -4 vorbis/lib/mapping0.c
Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/mapping0.c,v
retrieving revision 1.37.2.10
retrieving revision 1.37.2.11
diff -u -r1.37.2.10 -r1.37.2.11
--- mapping0.c 2001/11/24 07:16:38 1.37.2.10
+++ mapping0.c 2001/12/05 08:03:17 1.37.2.11
@@ -11,7 +11,7 @@
********************************************************************
function: channel mapping 0 implementation
- last mod: $Id: mapping0.c,v 1.37.2.10 2001/11/24 07:16:38 xiphmont Exp $
+ last mod: $Id: mapping0.c,v 1.37.2.11 2001/12/05 08:03:17 xiphmont Exp $
********************************************************************/
@@ -143,13 +143,13 @@
int psynum=info->psy[0];
look->psy_look[0]=_ogg_calloc(1,sizeof(*look->psy_look[0]));
_vp_psy_init(look->psy_look[0],ci->psy_param[psynum],
- ci->psy_g_param,
+ &ci->psy_g_param,
ci->blocksizes[vm->blockflag]/2,vi->rate);
psynum=info->psy[1];
look->psy_look[1]=_ogg_calloc(1,sizeof(*look->psy_look[1]));
_vp_psy_init(look->psy_look[1],ci->psy_param[psynum],
- ci->psy_g_param,
+ &ci->psy_g_param,
ci->blocksizes[vm->blockflag]/2,vi->rate);
}else{
@@ -157,7 +157,7 @@
look->psy_look[0]=_ogg_calloc(1,sizeof(*look->psy_look[0]));
look->psy_look[1]=look->psy_look[0];
_vp_psy_init(look->psy_look[0],ci->psy_param[psynum],
- ci->psy_g_param,
+ &ci->psy_g_param,
ci->blocksizes[vm->blockflag]/2,vi->rate);
}
1.18.4.1 +1 -11 vorbis/lib/masking.h
Index: masking.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/masking.h,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- masking.h 2001/08/13 02:01:15 1.18
+++ masking.h 2001/12/05 08:03:17 1.18.4.1
@@ -11,7 +11,7 @@
********************************************************************
function: masking curve data for psychoacoustics
- last mod: $Id: masking.h,v 1.18 2001/08/13 02:01:15 xiphmont Exp $
+ last mod: $Id: masking.h,v 1.18.4.1 2001/12/05 08:03:17 xiphmont Exp $
********************************************************************/
@@ -22,16 +22,6 @@
15, 15, 15, 15, 11, 10, 8, 7, 7, 7,
6, 2, 0, 0, -3, -5, -6, -6, -4.5f, 2.5f,
10, 15, 15, 15, 15, 15, 15};
-
-static float ATH_Bark_dB_lineconservative[]={
- 0, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -2, -5, -6, -6, -4, 0,
- 2, 6, 5, 5, 15, 25, 35};
-
-static float ATH_Bark_dB_lineaggressive[]={
- 0, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -2, -5, -6, -6, -4, 4,
- 14, 20, 19, 17, 30, 60, 60};
/* The below masking curves are straight from the R. Ehmer
(J. Acoustical Society of America) papers ca 1958-59. I modified
1.56.2.6 +11 -27 vorbis/lib/psy.c
Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.56.2.5
retrieving revision 1.56.2.6
diff -u -r1.56.2.5 -r1.56.2.6
--- psy.c 2001/12/04 11:16:19 1.56.2.5
+++ psy.c 2001/12/05 08:03:17 1.56.2.6
@@ -11,7 +11,7 @@
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.56.2.5 2001/12/04 11:16:19 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.56.2.6 2001/12/05 08:03:17 xiphmont Exp $
********************************************************************/
@@ -35,22 +35,10 @@
masking has a strong harmonic dependency */
vorbis_look_psy_global *_vp_global_look(vorbis_info *vi){
- int i,j;
codec_setup_info *ci=vi->codec_setup;
- vorbis_info_psy_global *gi=ci->psy_g_param;
+ vorbis_info_psy_global *gi=&ci->psy_g_param;
vorbis_look_psy_global *look=_ogg_calloc(1,sizeof(*look));
- int shiftoc=rint(log(gi->eighth_octave_lines*8)/log(2))-1;
- look->decaylines=toOC(96000.f)*(1<<(shiftoc+1))+.5f; /* max sample
- rate of
- 192000kHz
- for now */
- look->decay=_ogg_calloc(vi->channels,sizeof(*look->decay));
- for(i=0;i<vi->channels;i++){
- look->decay[i]=_ogg_calloc(look->decaylines,sizeof(*look->decay[i]));
- for(j=0;j<look->decaylines;j++)
- look->decay[i][j]=-9999.;
- }
look->channels=vi->channels;
look->ampmax=-9999.;
@@ -59,14 +47,10 @@
}
void _vp_global_free(vorbis_look_psy_global *look){
- int i;
- if(look->decay){
- for(i=0;i<look->channels;i++)
- _ogg_free(look->decay[i]);
- _ogg_free(look->decay);
+ if(look){
+ memset(look,0,sizeof(*look));
+ _ogg_free(look);
}
- memset(look,0,sizeof(*look));
- _ogg_free(look);
}
void _vi_gpsy_free(vorbis_info_psy_global *i){
@@ -334,7 +318,7 @@
/* set up the final curves */
for(i=0;i<P_BANDS;i++)
- setup_curve(p->tonecurves[i],i,vi->toneatt->block[i]);
+ setup_curve(p->tonecurves[i],i,vi->toneatt.block[i]);
for(i=0;i<P_LEVELS;i++)
_analysis_output("curve_63Hz",i,p->tonecurves[0][i]+2,EHMER_MAX,0,0);
@@ -378,8 +362,8 @@
for(i=0;i<P_BANDS;i++)
for(j=0;j<P_LEVELS;j++){
for(k=2;k<EHMER_OFFSET+2+vi->curvelimitp;k++)
- if(p->tonecurves[i][j][k]> vi->peakatt->block[i][j])
- p->tonecurves[i][j][k]= vi->peakatt->block[i][j];
+ if(p->tonecurves[i][j][k]> vi->peakatt.block[i][j])
+ p->tonecurves[i][j][k]= vi->peakatt.block[i][j];
else
break;
}
@@ -423,8 +407,8 @@
if(vi->peakattp) /* we limit maximum depth only optionally */
for(i=0;i<P_BANDS;i++)
for(j=0;j<P_LEVELS;j++)
- if(p->tonecurves[i][j][EHMER_OFFSET+2]< vi->peakatt->block[i][j])
- p->tonecurves[i][j][EHMER_OFFSET+2]= vi->peakatt->block[i][j];
+ if(p->tonecurves[i][j][EHMER_OFFSET+2]< vi->peakatt.block[i][j])
+ p->tonecurves[i][j][EHMER_OFFSET+2]= vi->peakatt.block[i][j];
for(i=0;i<P_LEVELS;i++)
_analysis_output("pcurve_63Hz",i,p->tonecurves[0][i]+2,EHMER_MAX,0,0);
@@ -898,7 +882,7 @@
float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd){
vorbis_info *vi=vd->vi;
codec_setup_info *ci=vi->codec_setup;
- vorbis_info_psy_global *gi=ci->psy_g_param;
+ vorbis_info_psy_global *gi=&ci->psy_g_param;
int n=ci->blocksizes[vd->W]/2;
float secs=(float)n/vi->rate;
1.10.2.2 +2 -2 vorbis/lib/registry.c
Index: registry.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/registry.c,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -u -r1.10.2.1 -r1.10.2.2
--- registry.c 2001/12/04 11:16:20 1.10.2.1
+++ registry.c 2001/12/05 08:03:18 1.10.2.2
@@ -11,14 +11,14 @@
********************************************************************
function: registry for time, floor, res backends and channel mappings
- last mod: $Id: registry.c,v 1.10.2.1 2001/12/04 11:16:20 xiphmont Exp $
+ last mod: $Id: registry.c,v 1.10.2.2 2001/12/05 08:03:18 xiphmont Exp $
********************************************************************/
#include "vorbis/codec.h"
#include "codec_internal.h"
#include "registry.h"
-#include "registry_api.h"
+#include "registry-api.h"
#include "misc.h"
1.17.2.2 +121 -100 vorbis/lib/vorbisenc.c
Index: vorbisenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisenc.c,v
retrieving revision 1.17.2.1
retrieving revision 1.17.2.2
diff -u -r1.17.2.1 -r1.17.2.2
--- vorbisenc.c 2001/12/04 11:16:20 1.17.2.1
+++ vorbisenc.c 2001/12/05 08:03:18 1.17.2.2
@@ -11,13 +11,14 @@
********************************************************************
function: simple programmatic interface for encoder mode setup
- last mod: $Id: vorbisenc.c,v 1.17.2.1 2001/12/04 11:16:20 xiphmont Exp $
+ last mod: $Id: vorbisenc.c,v 1.17.2.2 2001/12/05 08:03:18 xiphmont Exp $
********************************************************************/
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <stdarg.h>
#include "vorbis/codec.h"
#include "vorbis/vorbisenc.h"
@@ -40,6 +41,10 @@
static_codebook *books_residue_backfill[6][10][2];
} vorbis_residue_template;
+typedef struct vp_adjblock{
+ int block[P_BANDS][P_LEVELS];
+} vp_adjblock;
+
#include "modes/residue_44.h"
#include "modes/psych_44.h"
#include "modes/floor_44.h"
@@ -50,7 +55,7 @@
static vorbis_info_mode _mode_set_long={1,0,0,1};
/* mapping conventions:
- only one submap (this would change for efficient 5.1 support for example)
+ only one submap (this would change for efficient 5.1 support for example)*/
/* three psychoacoustic profiles are used: One for
short blocks, and two for long blocks (transition and regular) */
static vorbis_info_mapping0 _mapping_set_short={
@@ -60,7 +65,7 @@
static int vorbis_encode_toplevel_init(vorbis_info *vi,int small,int large,int ch,long rate){
if(vi && vi->codec_setup){
- codec_setup_info *ci=vi->ci;
+ codec_setup_info *ci=vi->codec_setup;
vi->version=0;
vi->channels=ch;
@@ -72,7 +77,7 @@
/* time mapping hooks are unused in vorbis I */
ci->times=1;
ci->time_type[0]=0;
- ci->time_param[0]=&time_dummy;
+ ci->time_param[0]=&_time_dummy;
/* by convention, two modes: one for short, one for long blocks.
short block mode uses mapping sero, long block uses mapping 1 */
@@ -94,12 +99,12 @@
}
static int vorbis_encode_floor_init(vorbis_info *vi,double q,int block,
- static_codebook **books,
- vorbis_info_floor1 **in,
+ static_codebook ***books,
+ vorbis_info_floor1 *in,
...){
int x[11],i,k,iq=rint(q*10);
vorbis_info_floor1 *f=calloc(1,sizeof(*f));
- codec_setup_info *ci=vi->ci;
+ codec_setup_info *ci=vi->codec_setup;
va_list ap;
va_start(ap,in);
@@ -107,7 +112,7 @@
x[i]=va_arg(ap,int);
va_end(ap);
- memcpy(f,in[x[iq]],sizoef(*f));
+ memcpy(f,in+x[iq],sizeof(*f));
/* fill in the lowpass field, even if it's temporary */
f->n=ci->blocksizes[block]>>1;
@@ -121,7 +126,7 @@
for(i=0;i<maxclass;i++){
if(f->class_book[i]>maxbook)maxbook=f->class_book[i];
f->class_book[i]+=ci->books;
- for(k=0;k<(1<<info->class_subs[i]);k++){
+ for(k=0;k<(1<<f->class_subs[i]);k++){
if(f->class_subbook[i][k]>maxbook)maxbook=f->class_subbook[i][k];
f->class_subbook[i][k]+=ci->books;
}
@@ -132,19 +137,19 @@
}
/* for now, we're only using floor 1 */
- vi->floor_type[vi->floors]=1;
- vi->floor_param[vi->floors]=f;
- vi->floors++;
+ ci->floor_type[ci->floors]=1;
+ ci->floor_param[ci->floors]=f;
+ ci->floors++;
return(0);
}
static int vorbis_encode_global_psych_init(vorbis_info *vi,double q,
- vorbis_info_psy_global **in, ...){
+ vorbis_info_psy_global *in, ...){
int i,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy_global *g=&ci->g;
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy_global *g=&ci->psy_g_param;
va_list ap;
va_start(ap,in);
@@ -159,23 +164,23 @@
dq=q*10.-iq;
}
- memcpy(g,in[(int)x[iq]],sizeof(*g));
+ memcpy(g,in+(int)x[iq],sizeof(*g));
/* interpolate the trigger threshholds */
for(i=0;i<4;i++){
- g->preecho_thresh[i]=in[iq]->preecho_thresh[i]*(1.-dq)+in[iq+1]->preecho_thresh[i]*dq;
- g->preecho_thresh[i]=in[iq]->postecho_thresh[i]*(1.-dq)+in[iq+1]->postecho_thresh[i]*dq;
+ g->preecho_thresh[i]=in[iq].preecho_thresh[i]*(1.-dq)+in[iq+1].preecho_thresh[i]*dq;
+ g->preecho_thresh[i]=in[iq].postecho_thresh[i]*(1.-dq)+in[iq+1].postecho_thresh[i]*dq;
}
- g->ampmax_att_per_sec=in[iq]->ampmax_att_per_sec*(1.-dq)+in[iq+1]->ampmax_att_per_sec*dq;
+ g->ampmax_att_per_sec=in[iq].ampmax_att_per_sec*(1.-dq)+in[iq+1].ampmax_att_per_sec*dq;
return(0);
}
static int vorbis_encode_psyset_init(vorbis_info *vi,double q,int block,
vorbis_info_psy *in, ...){
- int i,j,iq=q*10;
+ int i,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -194,28 +199,28 @@
ci->psys=block+1;
if(!p){
p=calloc(1,sizeof(*p));
- ci->psy_params[block]=p;
+ ci->psy_param[block]=p;
}
- memcpy(p,in[(int)(q*10.)],sizeof(*p));
+ memcpy(p,in+(int)(q*10.),sizeof(*p));
- p->ath_adjatt=in[iq]->ath_adjatt*(1.-dq)+in[iq+1]->ath_adjatt*dq;
- p->ath_maxatt=in[iq]->ath_maxatt*(1.-dq)+in[iq+1]->ath_maxatt*dq;
+ p->ath_adjatt=in[iq].ath_adjatt*(1.-dq)+in[iq+1].ath_adjatt*dq;
+ p->ath_maxatt=in[iq].ath_maxatt*(1.-dq)+in[iq+1].ath_maxatt*dq;
- p->tone_masteratt=in[iq]->tone_masteratt*(1.-dq)+in[iq+1]->tone_masteratt*dq;
- p->tone_guard=in[iq]->tone_guard*(1.-dq)+in[iq+1]->tone_guard*dq;
- p->tone_abs_limit=in[iq]->tone_abs_limit*(1.-dq)+in[iq+1]->tone_abs_limit*dq;
+ p->tone_masteratt=in[iq].tone_masteratt*(1.-dq)+in[iq+1].tone_masteratt*dq;
+ p->tone_guard=in[iq].tone_guard*(1.-dq)+in[iq+1].tone_guard*dq;
+ p->tone_abs_limit=in[iq].tone_abs_limit*(1.-dq)+in[iq+1].tone_abs_limit*dq;
- p->noisemaxsupp=in[iq]->noisemaxsupp*(1.-dq)+in[iq+1]->noisemaxsupp*dq;
-
+ p->noisemaxsupp=in[iq].noisemaxsupp*(1.-dq)+in[iq+1].noisemaxsupp*dq;
+ return(0);
}
static int vorbis_encode_compand_init(vorbis_info *vi,double q,int block,
- float **in, ...){
+ float in[][NOISE_COMPAND_LEVELS], ...){
int i,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -233,14 +238,15 @@
/* interpolate the compander settings */
for(i=0;i<NOISE_COMPAND_LEVELS;i++)
p->noisecompand[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq;
+ return(0);
}
static int vorbis_encode_tonemask_init(vorbis_info *vi,double q,int block,
- int ***in, ...){
+ vp_adjblock *in, ...){
int i,j,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -257,16 +263,17 @@
for(i=0;i<P_BANDS;i++)
for(j=0;j<P_LEVELS;j++)
- p->toneatt[i][j]=(j<4?4:j)*-10.+
- in[iq][i][j]*(1.-dq)+in[iq+1][i][j]*dq;
+ p->toneatt.block[i][j]=(j<4?4:j)*-10.+
+ in[iq].block[i][j]*(1.-dq)+in[iq+1].block[i][j]*dq;
+ return(0);
}
static int vorbis_encode_peak_init(vorbis_info *vi,double q,int block,
- int ***in, ...){
+ vp_adjblock *in, ...){
int i,j,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -283,16 +290,17 @@
for(i=0;i<P_BANDS;i++)
for(j=0;j<P_LEVELS;j++)
- p->peakatt[i][j]=(j<4?4:j)*-10.+
- in[iq][i][j]*(1.-dq)+in[iq+1][i][j]*dq;
+ p->peakatt.block[i][j]=(j<4?4:j)*-10.+
+ in[iq].block[i][j]*(1.-dq)+in[iq+1].block[i][j]*dq;
+ return(0);
}
static int vorbis_encode_noisebias_init(vorbis_info *vi,double q,int block,
- int **in, ...){
+ int in[][17], ...){
int i,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -309,14 +317,15 @@
for(i=0;i<P_BANDS;i++)
p->noiseoff[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq;
+ return(0);
}
static int vorbis_encode_ath_init(vorbis_info *vi,double q,int block,
- float **in, ...){
+ float in[][27], ...){
int i,iq=q*10;
double x[11],dq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_psy *p=&ci->psy_param[block];
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_psy *p=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -333,6 +342,7 @@
for(i=0;i<P_BANDS;i++)
p->ath[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq;
+ return(0);
}
static double stereo_threshholds[]={0.0, 2.5, 4.5, 7.5, 12.5, 22.5};
@@ -343,21 +353,18 @@
int t[11];
int a[11];
double c[11];
- double dq;
int coupled_p;
int stereo_backfill_p;
int residue_backfill_p;
- int type;
int n;
int partition_position;
int res_position;
int iterations=1;
- double amplitude;
int amplitude_select;
- codec_setup_info *ci=vi->ci;
- vorbis_info_residue *r;
- vorbis_info_psy *psy=ci->psys+block;
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_residue0 *r;
+ vorbis_info_psy *psy=ci->psy_param[block];
va_list ap;
va_start(ap,in);
@@ -378,7 +385,7 @@
residue_free_info(ci->residue_param[block],ci->residue_type[block]);
r=ci->residue_param[block]=malloc(sizeof(*r));
- memcpy(r,in[t[iq]],sizeof(*r));
+ memcpy(r,in+t[iq],sizeof(*r));
n=r->end=ci->blocksizes[block?1:0]>>1; /* to be adjusted by lowpass later */
@@ -395,52 +402,65 @@
/* for uncoupled, we use type 1, else type 2 */
if(coupled_p){
- ci->map_param[block].coupling_steps=1;
- ci->map_param[block].coupling_mag[0]=0;
- ci->map_param[block].coupling_ang[0]=1;
+ vorbis_info_mapping0 *map=ci->map_param[block];
+
+ map->coupling_steps=1;
+ map->coupling_mag[0]=0;
+ map->coupling_ang[0]=1;
ci->residue_type[block]=2;
+
+ psy->couple_pass[0].granulem=1.;
+ psy->couple_pass[0].igranulem=1.;
- psy->couple_pass[0]={1.,1., {{-1, 1,9e10, 0},{9999, 1,9e10, -1}}};
psy->couple_pass[0].couple_pass[0].limit=res_position;
+ psy->couple_pass[0].couple_pass[0].outofphase_redundant_flip_p=1;
+ psy->couple_pass[0].couple_pass[0].outofphase_requant_limit=9e10;
+ psy->couple_pass[0].couple_pass[0].amppost_point=0;
+ psy->couple_pass[0].couple_pass[0].limit=9999;
+ psy->couple_pass[0].couple_pass[1].outofphase_redundant_flip_p=1;
+ psy->couple_pass[0].couple_pass[1].outofphase_requant_limit=9e10;
+ psy->couple_pass[0].couple_pass[1].amppost_point=stereo_threshholds[a[iq]];
+ amplitude_select=a[iq];
ci->passlimit[0]=3;
- amplitude_select=a[qi];
- amplitude=psy->couple_pass[0].couple_pass[1].limit=stereo_threshholds[a[qi]];
- if(stereo_backfill_p && a[qi]){
- psy->couple_pass[1]={1.,1., {{-1, 1,9e10, 0},{9999, 1,9e10, -1}}};
- psy->couple_pass[1].couple_pass[0].limit=res_position;
- amplitude_select=a[qi]-1;
- amplitude=psy->couple_pass[1].couple_pass[1].limit=stereo_threshholds[a[qi]-1];
- psy->passlimit[1]=4;
+ if(stereo_backfill_p && a[iq]){
+ memcpy(psy->couple_pass+iterations,psy->couple_pass+iterations-1,
+ sizeof(*psy->couple_pass));
+ amplitude_select=a[iq]-1;
+ psy->couple_pass[1].couple_pass[1].limit=stereo_threshholds[a[iq]-1];
+ ci->passlimit[1]=4;
for(i=0;i<r->partitions;i++)
- if(in[qi].books_stereo_backfill[a[qi]-1][i])
+ if(in[iq].books_stereo_backfill[a[iq]-1][i])
r->secondstages[i]|=8;
iterations++;
}
if(residue_backfill_p){
- psy->couple_pass[iterations]={.33333333,3., {{-1, 1,1., 0},{9999, 1,9e10, -1}}};
- psy->couple_pass[iterations].couple_pass[0].limit=res_position;
- psy->couple_pass[iterations].couple_pass[1].limit=amplitude;
- ci->passlimit[iterations]=ci->passlimit[iterations-1]+1;
+ memcpy(psy->couple_pass+iterations,psy->couple_pass+iterations-1,
+ sizeof(*psy->couple_pass));
+ psy->couple_pass[iterations].granulem=.333333333;
+ psy->couple_pass[iterations].igranulem=3.;
for(i=0;i<r->partitions;i++)
- if(in[qi].books_residue_backfill[amplitude_select][i][0])
+ if(in[iq].books_residue_backfill[amplitude_select][i][0])
r->secondstages[i]|=(1<<(iterations+2));
+ ci->passlimit[iterations]=ci->passlimit[iterations-1]+1;
iterations++;
- psy->couple_pass[iterations]={.11111111,9., {{-1, 1,.3, 0},{9999, 1,9e10, -1}}};
- psy->couple_pass[iterations].couple_pass[0].limit=res_position;
- psy->couple_pass[iterations].couple_pass[1].limit=amplitude;
- ci->passlimit[iterations]=r->passlimit[iterations-1]+1;
+
+ memcpy(psy->couple_pass+iterations,psy->couple_pass+iterations-1,
+ sizeof(*psy->couple_pass));
+ psy->couple_pass[iterations].granulem=.1111111111;
+ psy->couple_pass[iterations].igranulem=9.;
for(i=0;i<r->partitions;i++)
- if(in[qi].books_residue_backfill[amplitude_select][i][1])
+ if(in[iq].books_residue_backfill[amplitude_select][i][1])
r->secondstages[i]|=(1<<(iterations+2));
+ ci->passlimit[iterations]=ci->passlimit[iterations-1]+1;
iterations++;
}
ci->coupling_passes=iterations;
if(block)
- memcpy(ci->psys+block+1,psy,sizeof(*psy));
+ memcpy(ci->psy_param[block+1],psy,sizeof(*psy));
}else{
ci->residue_type[block]=1;
@@ -449,9 +469,9 @@
if(residue_backfill_p){
for(i=0;i<r->partitions;i++){
- if(in[qi].books_residue_backfill[amplitude_select][i][0])
+ if(in[iq].books_residue_backfill[amplitude_select][i][0])
r->secondstages[i]|=8;
- if(in[qi].books_residue_backfill[amplitude_select][i][1])
+ if(in[iq].books_residue_backfill[amplitude_select][i][1])
r->secondstages[i]|=16;
}
ci->passlimit[1]=4;
@@ -463,27 +483,28 @@
/* fill in all the books */
{
- int booklist=0;
+ int booklist=0,k;
r->groupbook=ci->books;
- ci->book_param[ci->books++]=in[qi].book_aux[block];
+ ci->book_param[ci->books++]=in[iq].book_aux[block];
for(i=0;i<r->partitions;i++){
for(k=0;k<3;k++){
- if(in[qi].books_base[a[qi]][i][k]){
+ if(in[iq].books_base[a[iq]][i][k]){
r->booklist[booklist++]=ci->books;
- ci->book_param[ci->books++]=in[qi].books_base[a[qi]][i][k]);
+ ci->book_param[ci->books++]=in[iq].books_base[a[iq]][i][k];
}
- if(coupled_p && stereo_backfill_p && a[qi] &&
- in[qi].books_stereo_backfill[a[qi]][i]){
+ if(coupled_p && stereo_backfill_p && a[iq] &&
+ in[iq].books_stereo_backfill[a[iq]][i]){
r->booklist[booklist++]=ci->books;
- ci->book_param[ci->books++]=in[qi].books_stereo_backfill[a[qi]][i];
+ ci->book_param[ci->books++]=in[iq].books_stereo_backfill[a[iq]][i];
}
if(residue_backfill_p)
for(k=0;k<2;k++){
- if(in[qi].books_residue_backfill[amplitude_select][i][k]){
+ if(in[iq].books_residue_backfill[amplitude_select][i][k]){
r->booklist[booklist++]=ci->books;
- ci->book_param[ci->books++]=in[qi].books_residue_backfill[amplitude_select][i][k];
+ ci->book_param[ci->books++]=in[iq].books_residue_backfill[amplitude_select][i][k];
}
}
+ }
}
}
@@ -494,9 +515,9 @@
int i,iq=q*10;
double x[11],dq;
double freq;
- codec_setup_info *ci=vi->ci;
- vorbis_info_floor1 *f=ci->floor_param+block;
- vorbis_info_residue0 *r=ci->residue_param+block;
+ codec_setup_info *ci=vi->codec_setup;
+ vorbis_info_floor1 *f=ci->floor_param[block];
+ vorbis_info_residue0 *r=ci->residue_param[block];
int blocksize=ci->blocksizes[block]>>1;
double nyq=vi->rate/2.;
va_list ap;
@@ -584,11 +605,11 @@
ret|=vorbis_encode_peak_init(vi,base_quality,2,_vp_peakguard,
0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
- ret|=vorbis_encode_noisebias_init(vi,base_quality,0,_vp_noisebias_other,
+ ret|=vorbis_encode_noisebias_init(vi,base_quality,0,_psy_noisebias_other,
0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
- ret|=vorbis_encode_noisebias_init(vi,base_quality,1,_vp_noisebias_other,
+ ret|=vorbis_encode_noisebias_init(vi,base_quality,1,_psy_noisebias_other,
0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
- ret|=vorbis_encode_noisebias_init(vi,base_quality,2,_vp_noisebias_long,
+ ret|=vorbis_encode_noisebias_init(vi,base_quality,2,_psy_noisebias_long,
0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
ret|=vorbis_encode_ath_init(vi,base_quality,0,ATH_Bark_dB,
@@ -623,10 +644,10 @@
4., 6., 6., 10., 10., 4., 4., 4., 4., 4., 4.);
ret|=vorbis_encode_lowpass_init(vi,base_quality,0,
- 15.1,15.9,16.9,17.9.,19.9.,
+ 15.1,15.9,16.9,17.9,19.9,
999.,999.,999.,999.,999.,999.);
ret|=vorbis_encode_lowpass_init(vi,base_quality,1,
- 15.1,15.9,16.9,17.9.,19.9.,
+ 15.1,15.9,16.9,17.9,19.9,
999.,999.,999.,999.,999.,999.);
return(ret);
No revision
No revision
1.1.2.2 +35 -30 vorbis/lib/modes/Attic/floor_44.h
Index: floor_44.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/Attic/floor_44.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- floor_44.h 2001/12/04 11:17:24 1.1.2.1
+++ floor_44.h 2001/12/05 08:03:20 1.1.2.2
@@ -11,7 +11,7 @@
********************************************************************
function: key floor settings for 44.1/48kHz
- last mod: $Id: floor_44.h,v 1.1.2.1 2001/12/04 11:17:24 xiphmont Exp $
+ last mod: $Id: floor_44.h,v 1.1.2.2 2001/12/05 08:03:20 xiphmont Exp $
********************************************************************/
@@ -56,35 +56,37 @@
#include "books/line_1024x31_3sub2.vqh"
#include "books/line_1024x31_3sub3.vqh"
-static static_codebook _floor_44_128_books[2][9]={
- {
- &_huff_book_line_128x7_class1,
- &_huff_book_line_128x7_class2,
-
- &_huff_book_line_128x7_0sub0,
- &_huff_book_line_128x7_1sub1,
- &_huff_book_line_128x7_1sub2,
- &_huff_book_line_128x7_1sub3,
- &_huff_book_line_128x7_2sub1,
- &_huff_book_line_128x7_2sub2,
- &_huff_book_line_128x7_2sub3,
- },
- {
- &_huff_book_line_128x19_class1,
- &_huff_book_line_128x19_class2,
-
- &_huff_book_line_128x19_0sub0,
- &_huff_book_line_128x19_1sub1,
- &_huff_book_line_128x19_1sub2,
- &_huff_book_line_128x19_1sub3,
- &_huff_book_line_128x19_2sub1,
- &_huff_book_line_128x19_2sub2,
- &_huff_book_line_128x19_2sub3,
- }
+static static_codebook *_floor_44_128x7_books[]={
+ &_huff_book_line_128x7_class1,
+ &_huff_book_line_128x7_class2,
+
+ &_huff_book_line_128x7_0sub0,
+ &_huff_book_line_128x7_1sub1,
+ &_huff_book_line_128x7_1sub2,
+ &_huff_book_line_128x7_1sub3,
+ &_huff_book_line_128x7_2sub1,
+ &_huff_book_line_128x7_2sub2,
+ &_huff_book_line_128x7_2sub3,
+};
+static static_codebook *_floor_44_128x19_books[]={
+ &_huff_book_line_128x19_class1,
+ &_huff_book_line_128x19_class2,
+
+ &_huff_book_line_128x19_0sub0,
+ &_huff_book_line_128x19_1sub1,
+ &_huff_book_line_128x19_1sub2,
+ &_huff_book_line_128x19_1sub3,
+ &_huff_book_line_128x19_2sub1,
+ &_huff_book_line_128x19_2sub2,
+ &_huff_book_line_128x19_2sub3,
+};
+
+static static_codebook **_floor_44_128_books[2]={
+ _floor_44_128x7_books,
+ _floor_44_128x19_books,
};
-static static_codebook _floor_44_1024_books[1][14]={
- {
+static static_codebook *_floor_44_1024x31_books[]={
&_huff_book_line_1024x31_class0,
&_huff_book_line_1024x31_class1,
&_huff_book_line_1024x31_class2,
@@ -100,8 +102,11 @@
&_huff_book_line_1024x31_3sub1,
&_huff_book_line_1024x31_3sub2,
&_huff_book_line_1024x31_3sub3,
- }
-}
+};
+
+static static_codebook **_floor_44_1024_books[1]={
+ _floor_44_1024x31_books
+};
static vorbis_info_floor1 _floor_44_128[2]={
{
1.1.2.2 +86 -88 vorbis/lib/modes/Attic/psych_44.h
Index: psych_44.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/Attic/psych_44.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- psych_44.h 2001/12/04 11:17:24 1.1.2.1
+++ psych_44.h 2001/12/05 08:03:20 1.1.2.2
@@ -11,12 +11,10 @@
********************************************************************
function: key psychoacoustic settings for 44.1/48kHz
- last mod: $Id: psych_44.h,v 1.1.2.1 2001/12/04 11:17:24 xiphmont Exp $
+ last mod: $Id: psych_44.h,v 1.1.2.2 2001/12/05 08:03:20 xiphmont Exp $
********************************************************************/
-#include "vorbis/codec.h"
-#include "backends.h"
/* preecho trigger settings *****************************************/
@@ -62,9 +60,9 @@
};
/* tonal masking curve level adjustments *************************/
-static int _vp_tonemask_adj_longblock[6][17][11]={
+static vp_adjblock _vp_tonemask_adj_longblock[6]={
/* adjust for mode zero */
- {
+ {{
{ 10, 10, 5, }, /*63*/
{ 10, 10, 5, },
{ 10, 10, 5, }, /* 125 */
@@ -83,10 +81,10 @@
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, /* 8000 */
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
{ 16, 16, 14, 12, 12, 15, 15, 15, 15, 15, 10}, /* 16000 */
- },
+ }},
/* adjust for mode two */
- {
+ {{
{ 10, 10, 5, }, /*63*/
{ 10, 10, 5, },
{ 10, 10, 5, }, /* 125 */
@@ -105,10 +103,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 7, 5, 5, 10, 10, 10, 5, },
{ 16, 16, 14, 8, 8, 8, 10, 10, 10, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode four */
- {
+ {{
{ 10, 5, 5, }, /*63*/
{ 10, 5, 5, },
{ 10, 5, 5, }, /* 125 */
@@ -127,10 +125,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 5, 5, 5, 10, 10, 10, 5, },
{ 16, 16, 14, 8, 8, 8, 10, 10, 10, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode six */
- {
+ {{
{ 10, 5, 5, }, /*63*/
{ 10, 5, 5, },
{ 10, 5, 5, }, /* 125 */
@@ -149,10 +147,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 5, 5, 5, 5, 5, 5, },
{ 12, 10, 10, 5, 5, 5, 5, 5, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode eight */
- {
+ {{
{ 0, }, /*63*/
{ 0, },
{ 0, }, /* 125 */
@@ -171,10 +169,10 @@
{ 0, }, /* 8000 */
{ 0, },
{ 5, 5, 5, 5, 5, 5, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode ten */
- {
+ {{
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*63*/
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15},
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*125*/
@@ -192,12 +190,12 @@
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*8000*/
{ 0, 0, 0, -5,-10,-10,-10,-15,-15,-15,-15},
{ 0, 0, 0, 0, 0, -5, -5,-10,-15,-15,-15}, /*16000*/
- },
+ }},
};
-static int _vp_tonemask_adj_otherblock[6][17][11]={
+static vp_adjblock _vp_tonemask_adj_otherblock[6]={
/* adjust for mode zero */
- {
+ {{
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10}, /*63*/
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10},
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10}, /*125*/
@@ -217,10 +215,10 @@
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}, /*8000*/
{ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10},
{ 16, 16, 14, 12, 12, 15, 15, 15, 15, 15, 10}, /*16000*/
- },
+ }},
/* adjust for mode two */
- {
+ {{
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10}, /*63*/
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10},
{ 0, 0, 0, 0,-10,-10,-10,-10,-10,-10,-10}, /*125*/
@@ -240,10 +238,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 7, 5, 5, 10, 10, 10, 5, },
{ 16, 16, 14, 8, 8, 8, 10, 10, 10, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode four */
- {
+ {{
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*63*/
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15},
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*125*/
@@ -263,10 +261,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 5, 5, 5, 10, 10, 10, 5, },
{ 16, 16, 14, 8, 8, 8, 10, 10, 10, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode six */
- {
+ {{
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*63*/
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15},
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*125*/
@@ -286,10 +284,10 @@
{ 10, 10, 7, 5, }, /* 8000 */
{ 10, 10, 7, 5, 5, 5, 5, 5, 5, },
{ 12, 10, 10, 5, 5, 5, 5, 5, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode eight */
- {
+ {{
{-10,-10,-10,-15,-15,-15,-15,-20,-20,-20,-20}, /*63*/
{-10,-10,-10,-15,-15,-15,-15,-20,-20,-20,-20},
{-10,-10,-10,-15,-15,-15,-15,-20,-20,-20,-20}, /*125*/
@@ -309,10 +307,10 @@
{ 0, }, /* 8000 */
{ 0, },
{ 5, 5, 5, 5, 5, 5, 5, }, /* 16000 */
- },
+ }},
/* adjust for mode ten */
- {
+ {{
{ 0, 0, 0, -5,-15,-20,-20,-20,-20,-20,-20}, /*63*/
{ 0, 0, 0, -5,-15,-20,-20,-20,-20,-20,-20},
{ 0, 0, 0, -5,-15,-20,-20,-20,-20,-20,-20}, /*125*/
@@ -330,12 +328,12 @@
{ 0, 0, 0, -5,-15,-15,-15,-15,-15,-15,-15}, /*8000*/
{ 0, 0, 0, -5,-10,-10,-10,-15,-15,-15,-15},
{ 0, 0, 0, 0, 0, -5, -5,-10,-15,-15,-15}, /*16000*/
- },
+ }},
};
-static int _vp_peakguard_[6][17][11]={
+static vp_adjblock _vp_peakguard[6]={
/* zero */
- {
+ {{
{-14,-16,-18,-19,-24,-24,-24,-24,-24,-24,-24},/*63*/
{-14,-16,-18,-19,-24,-24,-24,-24,-24,-24,-24},
{-14,-16,-18,-19,-24,-24,-24,-24,-24,-24,-24},/*125*/
@@ -353,9 +351,9 @@
{-10,-10,-10,-10,-10,-14,-16,-18,-22,-24,-24},/*8000*/
{-10,-10,-10,-10,-10,-14,-16,-18,-22,-24,-24},
{-10,-10,-10,-10,-10,-12,-16,-18,-22,-24,-24},/*16000*/
- },
+ }},
/* two */
- {
+ {{
{-14,-20,-20,-20,-26,-30,-30,-30,-30,-30,-30},/*63*/
{-14,-20,-20,-20,-26,-30,-30,-30,-30,-30,-30},
{-14,-20,-20,-20,-26,-30,-30,-30,-30,-30,-30},/*125*/
@@ -373,9 +371,9 @@
{-10,-10,-10,-10,-10,-11,-12,-13,-22,-30,-30},/*8000*/
{-10,-10,-10,-10,-10,-10,-10,-11,-22,-30,-30},
{-10,-10,-10,-10,-10,-10,-10,-10,-20,-30,-30},/*16000*/
- },
+ }},
/* four */
- {
+ {{
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},/*63*/
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},/*125*/
@@ -393,9 +391,9 @@
{-10,-10,-10,-10,-10,-11,-12,-13,-22,-32,-40},/*8000*/
{-10,-10,-10,-10,-10,-10,-10,-11,-22,-32,-40},
{-10,-10,-10,-10,-10,-10,-10,-10,-20,-32,-40},/*16000*/
- },
+ }},
/* six */
- {
+ {{
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},/*63*/
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},
{-14,-20,-20,-20,-26,-32,-32,-32,-32,-32,-40},/*125*/
@@ -413,9 +411,9 @@
{-14,-14,-14,-18,-20,-20,-24,-24,-24,-32,-40},/*8000*/
{-14,-14,-14,-18,-20,-20,-24,-24,-24,-32,-40},
{-14,-14,-14,-18,-20,-20,-22,-24,-24,-32,-40},/*16000*/
- },
+ }},
/* eight */
- {
+ {{
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*63*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*88*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*125*/
@@ -433,9 +431,9 @@
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*8000*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*11500*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-40,-40},/*16600*/
- },
+ }},
/* ten */
- {
+ {{
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*63*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*88*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*125*/
@@ -453,7 +451,7 @@
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*8000*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*11500*/
{-14,-20,-24,-26,-32,-34,-36,-38,-40,-44,-46},/*16600*/
- }
+ }}
};
static int _psy_noisebias_long[11][17]={
@@ -469,7 +467,7 @@
{-24,-24,-24,-24,-24,-24,-24,-18,-14, -8, -8, -8, -4, -3, -3, -2, -2},
{-28,-28,-28,-28,-28,-26,-24,-18,-14,-10,-10,-10, -8, -7, -7, -6, -6},
{-50,-50,-50,-50,-50,-50,-50,-48,-44,-40,-40,-40,-40,-40,-40,-40,-40},
-}
+};
static int _psy_noisebias_other[11][17]={
/*63 125 250 500 1k 2k 4k 8k 16k*/
@@ -489,103 +487,103 @@
static vorbis_info_psy _psy_settings[11]={
/* zero */
{ /* ATH style ,float,min */
- ATH_Bark_dB_lineaggressive,-100.,-110.,
+ {-1},-100.,-110.,
/* tonemask att,guard,suppr,curves peakattp,curvelimitp,peaksettings*/
- 3.f, -18.f,-10.f, NULL, 1, 0, NULL,
+ 3.f, -18.f,-10.f, {{{0.}}}, 1, 0, {{{0.}}},
/*noisemaskp,supp, low/high window, low/hi guard, minimum */
1, -0.f, .5f, .5f, 0,0,0,
- {0},NULL,95.f,NULL
+ {-1},{-1},95.f,{{-1}}
},
/* one */
{
- ATH_Bark_dB_lineaggressive,-100.,-110.,
- 0.f,-24.f,-20.f, NULL, 1,0,NULL,
+ {-1},-100.,-110.,
+ 0.f,-24.f,-20.f, {{{0.}}}, 1,0,{{{0.}}},
1,-24.f,.5f,.5f,0,0,0,
- {0},NULL,95.f,NULL
+ {-1},{-1},95.f,{{-1}}
},
/* two */
{
- ATH_Bark_dB_lineaggressive,-100.,-120.,
- 0.f,-24.f,-20.f, NULL, 1,0,NULL,
+ {-1},-100.,-120.,
+ 0.f,-24.f,-20.f, {{{0.}}}, 1,0,{{{0.}}},
1,-24.f,.5f,.5f,0,0,0,
- {0},NULL,95.f,NULL
+ {-1},{-1},95.f,{{-1}}
},
/* three */
{
- ATH_Bark_dB_lineaggressive,-100.,-140.,
- 0.f,-24.f,-20.f, NULL, 1,0,NULL,
+ {-1},-100.,-140.,
+ 0.f,-24.f,-20.f, {{{0.}}}, 1,0,{{{0.}}},
1,-24.f,.5f,.5f,0,0,0,
- {0},NULL,95.f,NULL
+ {-1},{-1},95.f,{{-1}}
},
/* four */
{
- ATH_Bark_dB_lineaggressive,-100.,-140.,
- 0.f,-26.f,-30.f, NULL, 1,4,NULL,
+ {-1},-100.,-140.,
+ 0.f,-26.f,-30.f, {{{0.}}}, 1,4,{{{0.}}},
1,-24.f,.5f,.5f,0,0,0,
- {0},NULL,95.f,NULL
+ {-1},{-1},95.f,{{-1}}
},
/* five */
{
- ATH_Bark_dB_lineaggressive,-100.,-140.,
- 0.f,-40.f,-30.f, NULL, 1,4,NULL,
+ {-1},-100.,-140.,
+ 0.f,-40.f,-30.f, {{{0.}}}, 1,4,{{{0.}}},
1,-30.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
},
/* six */
{
- ATH_Bark_dB_lineaggressive,-100.,-140.,
- 0.f,-40.f,-40.f, NULL, 1,30,NULL,
+ {-1},-100.,-140.,
+ 0.f,-40.f,-40.f, {{{0.}}}, 1,30,{{{0.}}},
1,-40.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
},
/* seven */
{
- ATH_Bark_dB_lineconservative,-100.,-140.,
- 0.f,-40.f,-40.f, NULL, 1,30,NULL,
+ {-1},-100.,-140.,
+ 0.f,-40.f,-40.f, {{{0.}}}, 1,30,{{{0.}}},
1,-40.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
},
/* eight */
{
- ATH_Bark_dB_lineconservative,-100.,-140.,
- 0.f,-45.f,-45.f, NULL, 1,30,NULL,
+ {-1},-100.,-140.,
+ 0.f,-45.f,-45.f, {{{0.}}}, 1,30,{{{0.}}},
1,-45.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
},
/* nine */
{
- ATH_Bark_dB_lineconservative,-110.,-140.,
- 0.f,-45.f,-45.f, NULL, 1,30,NULL,
+ {-1},-110.,-140.,
+ 0.f,-45.f,-45.f, {{{0.}}}, 1,30,{{{0.}}},
1,-45.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
},
/* ten */
{
- ATH_Bark_dB_lineconservative,-120.,-150.,
- 0.f,-45.f,-45.f, NULL, 1,30,NULL,
+ {-1},-120.,-150.,
+ 0.f,-45.f,-45.f, {{{0.}}}, 1,30,{{{0.}}},
1,-45.f,.5f,.5f,0,0,0,
- {0},NULL,105.f,NULL
+ {-1},{-1},105.f,{{-1}}
}
};
-/* noise compander lookups * low, mid, high quality ****************/
+/* ath ****************/
static float ATH_Bark_dB[][27]={
- {
- 0, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -2, -5, -6, -6, -4, 4,
- 14, 20, 19, 17, 30, 60, 60,
- }
{
- 0, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -2, -5, -6, -6, -4, 0,
- 2, 6, 5, 5, 15, 25, 35
+ 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,
},
{
- 0, 15, 15, 15, 11, 10, 8, 7, 7, 7,
- 6, 2, 0, 0, -3, -5, -6, -6,-4.5f, 0f,
- 2, 6, 5, 5, 15, 15, 15
+ 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,
},
+ {
+ 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,
+ }
};
1.1.2.2 +26 -26 vorbis/lib/modes/Attic/residue_44.h
Index: residue_44.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/Attic/residue_44.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- residue_44.h 2001/12/04 11:17:25 1.1.2.1
+++ residue_44.h 2001/12/05 08:03:20 1.1.2.2
@@ -11,7 +11,7 @@
********************************************************************
function: toplevel residue templates for 32/44.1/48kHz
- last mod: $Id: residue_44.h,v 1.1.2.1 2001/12/04 11:17:25 xiphmont Exp $
+ last mod: $Id: residue_44.h,v 1.1.2.2 2001/12/05 08:03:20 xiphmont Exp $
********************************************************************/
@@ -102,10 +102,10 @@
/* residue backfill is entered in the template array as if stereo
backfill is not in use. It's up to vorbisenc to make the
appropriate index adjustment */
-#ifdef 0
+#if 0
static vorbis_residue_template _residue_template_44_stereo[11]={
/* mode 0; 64-ish */
- {&residue_44_low, {&44c0_short,&44c0_long},
+ {&_residue_44_low, {&44c0_short,&44c0_long},
{ {{-1}}, /* lossless stereo */
{{-1}}, /* 6dB (2.5) stereo */
{{-1}}, /* 12dB (4.5) stereo */
@@ -137,7 +137,7 @@
/* mode 1; 80-ish */
-}
+};
#endif
#include "books/res_44c_Z_128aux.vqh"
@@ -145,31 +145,31 @@
static vorbis_residue_template _residue_template_44_stereo_temp[11]={
/* mode 0; 64-ish */
- {&residue_44_low, {&_huff_book_res_44c_Z_128aux,
+ {&_residue_44_low, {&_huff_book_res_44c_Z_128aux,
&_huff_book_res_44c_Z_1024aux},
- { {{-1}}, /* lossless stereo */
- {{-1}}, /* 6dB (2.5) stereo */
- {{-1}}, /* 12dB (4.5) stereo */
- {{-1}}, /* 17dB (7.5) stereo */
- {{-1}},
- {{-1}}, /* 27dB (22.5) stereo */
+ { {{0}}, /* lossless stereo */
+ {{0}}, /* 6dB (2.5) stereo */
+ {{0}}, /* 12dB (4.5) stereo */
+ {{0}}, /* 17dB (7.5) stereo */
+ {{0}},
+ {{0}}, /* 27dB (22.5) stereo */
+ },
+ { {0}, /* lossless stereo */
+ {0}, /* 6dB (2.5) stereo */
+ {0}, /* 12dB (4.5) stereo */
+ {0}, /* 17dB (7.5) stereo */
+ {0},
+ {0}, /* 27dB (22.5) stereo */
+ },
+ { {{0}}, /* lossless stereo */
+ {{0}}, /* 6dB (2.5) stereo */
+ {{0}}, /* 12dB (4.5) stereo */
+ {{0}},
+ {{0}}, /* 22dB (12.5) stereo */
+ {{0}}, /* 27dB (22.5) stereo */
},
- { {-1}, /* lossless stereo */
- {-1}, /* 6dB (2.5) stereo */
- {-1}, /* 12dB (4.5) stereo */
- {-1}, /* 17dB (7.5) stereo */
- {-1},
- {-1}, /* 27dB (22.5) stereo */
- },
- { {{-1}}, /* lossless stereo */
- {{-1}}, /* 6dB (2.5) stereo */
- {{-1}}, /* 12dB (4.5) stereo */
- {{-1}},
- {{-1}}, /* 22dB (12.5) stereo */
- {{-1}}, /* 27dB (22.5) stereo */
- },
}
/* mode 1; 80-ish */
-}
+};
--- >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