[xiph-cvs] cvs commit: vorbis/lib/modes Makefile.am mode_44c_A.h

Monty xiphmont at xiph.org
Tue Dec 4 03:16:24 PST 2001



xiphmont    01/12/04 03:16:23

  Modified:    lib      Tag: branch_monty_20011009 Makefile.am bitrate.c
                        codec_internal.h psy.c psy.h registry.c vorbisenc.c
               lib/modes Tag: branch_monty_20011009 Makefile.am
                        mode_44c_A.h
  Added:       lib      Tag: branch_monty_20011009 registry-api.h
  Log:
  Continued incremental work

Revision  Changes    Path
No                   revision

No                   revision

1.12.6.2  +2 -2      vorbis/lib/Makefile.am

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/Makefile.am,v
retrieving revision 1.12.6.1
retrieving revision 1.12.6.2
diff -u -r1.12.6.1 -r1.12.6.2
--- Makefile.am	2001/11/22 06:21:07	1.12.6.1
+++ Makefile.am	2001/12/04 11:16:19	1.12.6.2
@@ -16,13 +16,13 @@
                         envelope.h lpc.h lsp.h codebook.h misc.h psy.h\
                         masking.h iir.h os.h mdct.h smallft.h\
                         registry.h scales.h window.h lookup.h lookup_data.h\
-			codec_internal.h backends.h bitrate.h
+			codec_internal.h backends.h bitrate.h 
 libvorbis_la_LDFLAGS = -version-info @V_LIB_CURRENT@:@V_LIB_REVISION@:@V_LIB_AGE@
 
 libvorbisfile_la_SOURCES = vorbisfile.c
 libvorbisfile_la_LDFLAGS = -version-info @VF_LIB_CURRENT@:@VF_LIB_REVISION@:@VF_LIB_AGE@
 
-libvorbisenc_la_SOURCES = vorbisenc.c
+libvorbisenc_la_SOURCES = vorbisenc.c registry-api.h
 libvorbisenc_la_LDFLAGS = -version-info @VE_LIB_CURRENT@:@VE_LIB_REVISION@:@VE_LIB_AGE@
 
 EXTRA_PROGRAMS = barkmel tone psytune

1.1.2.5   +62 -56    vorbis/lib/Attic/bitrate.c

Index: bitrate.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/Attic/bitrate.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- bitrate.c	2001/11/24 05:26:10	1.1.2.4
+++ bitrate.c	2001/12/04 11:16:19	1.1.2.5
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: bitrate tracking and management
- last mod: $Id: bitrate.c,v 1.1.2.4 2001/11/24 05:26:10 xiphmont Exp $
+ last mod: $Id: bitrate.c,v 1.1.2.5 2001/12/04 11:16:19 xiphmont Exp $
 
  ********************************************************************/
 
@@ -87,67 +87,70 @@
   codec_setup_info *ci=vi->codec_setup;
   bitrate_manager_info *bi=ci->bi;
   long maxlatency;
-  
+
   memset(bm,0,sizeof(*bm));
-  
-  bm->avg_sampledesired=bi->queue_avg_time*vi->rate;
-  bm->avg_centerdesired=bi->queue_avg_time*vi->rate*bi->queue_avg_center;
-  bm->minmax_sampledesired=bi->queue_minmax_time*vi->rate;
-  
-  if(bm->avg_sampledesired<0)bm->avg_sampledesired=0;
-  if(bm->avg_centerdesired<0)bm->avg_centerdesired=0;
-  if(bm->minmax_sampledesired<0)bm->minmax_sampledesired=0;
   
-  /* first find the max possible needed queue size */
-  maxlatency=max(bm->avg_sampledesired-bm->avg_centerdesired,
-		 bm->minmax_sampledesired)+bm->avg_centerdesired;
-  
-  if(maxlatency>0 &&
-     (bi->queue_avgmin>0 || bi->queue_avgmax>0 || bi->queue_hardmax>0 ||
-      bi->queue_hardmin>0)){
-    long maxpackets=maxlatency/(ci->blocksizes[0]>>1)+3;
-    long bins=BITTRACK_DIVISOR*ci->passlimit[ci->coupling_passes-1];
+  if(bi){
+    
+    bm->avg_sampledesired=bi->queue_avg_time*vi->rate;
+    bm->avg_centerdesired=bi->queue_avg_time*vi->rate*bi->queue_avg_center;
+    bm->minmax_sampledesired=bi->queue_minmax_time*vi->rate;
+    
+    if(bm->avg_sampledesired<0)bm->avg_sampledesired=0;
+    if(bm->avg_centerdesired<0)bm->avg_centerdesired=0;
+    if(bm->minmax_sampledesired<0)bm->minmax_sampledesired=0;
     
-    bm->queue_size=maxpackets;
-    bm->queue_bins=bins;
-    bm->queue_binned=_ogg_malloc(maxpackets*bins*sizeof(*bm->queue_binned));
-    bm->queue_actual=_ogg_malloc(maxpackets*sizeof(*bm->queue_actual));
+    /* first find the max possible needed queue size */
+    maxlatency=max(bm->avg_sampledesired-bm->avg_centerdesired,
+		   bm->minmax_sampledesired)+bm->avg_centerdesired;
     
-    if((bi->queue_avgmin>0 || bi->queue_avgmax>0) &&
-       bi->queue_avg_time>0){
+    if(maxlatency>0 &&
+       (bi->queue_avgmin>0 || bi->queue_avgmax>0 || bi->queue_hardmax>0 ||
+	bi->queue_hardmin>0)){
+      long maxpackets=maxlatency/(ci->blocksizes[0]>>1)+3;
+      long bins=BITTRACK_DIVISOR*ci->passlimit[ci->coupling_passes-1];
       
-      bm->avg_binacc=_ogg_malloc(bins*sizeof(*bm->avg_binacc));
-      bm->avgfloat=bi->avgfloat_initial;
+      bm->queue_size=maxpackets;
+      bm->queue_bins=bins;
+      bm->queue_binned=_ogg_malloc(maxpackets*bins*sizeof(*bm->queue_binned));
+      bm->queue_actual=_ogg_malloc(maxpackets*sizeof(*bm->queue_actual));
       
+      if((bi->queue_avgmin>0 || bi->queue_avgmax>0) &&
+	 bi->queue_avg_time>0){
+	
+	bm->avg_binacc=_ogg_malloc(bins*sizeof(*bm->avg_binacc));
+	bm->avgfloat=bi->avgfloat_initial;
+	
+	
+      }else{
+	bm->avg_tail= -1;
+      }
       
-    }else{
-      bm->avg_tail= -1;
-    }
-    
-    if((bi->queue_hardmin>0 || bi->queue_hardmax>0) &&
+      if((bi->queue_hardmin>0 || bi->queue_hardmax>0) &&
          bi->queue_minmax_time>0){
-      
-      bm->minmax_binstack=_ogg_malloc((bins+1)*bins*2*
-				      sizeof(bm->minmax_binstack));
-      bm->minmax_posstack=_ogg_malloc((bins+1)*
+	
+	bm->minmax_binstack=_ogg_malloc((bins+1)*bins*2*
+					sizeof(bm->minmax_binstack));
+	bm->minmax_posstack=_ogg_malloc((bins+1)*
                                       sizeof(bm->minmax_posstack));
-      bm->minmax_limitstack=_ogg_malloc((bins+1)*
-					sizeof(bm->minmax_limitstack));
+	bm->minmax_limitstack=_ogg_malloc((bins+1)*
+					  sizeof(bm->minmax_limitstack));
+      }else{
+	bm->minmax_tail= -1;
+      }
+      
+      /* space for the packet queueing */
+      bm->queue_packet_buffers=calloc(maxpackets,sizeof(*bm->queue_packet_buffers));
+      bm->queue_packets=calloc(maxpackets,sizeof(*bm->queue_packets));
+      for(i=0;i<maxpackets;i++)
+	oggpack_writeinit(bm->queue_packet_buffers+i);
+      
     }else{
-      bm->minmax_tail= -1;
-    }
-    
-    /* space for the packet queueing */
-    bm->queue_packet_buffers=calloc(maxpackets,sizeof(*bm->queue_packet_buffers));
-    bm->queue_packets=calloc(maxpackets,sizeof(*bm->queue_packets));
-    for(i=0;i<maxpackets;i++)
-      oggpack_writeinit(bm->queue_packet_buffers+i);
-    
-  }else{
-    bm->queue_packet_buffers=calloc(1,sizeof(*bm->queue_packet_buffers));
-    bm->queue_packets=calloc(1,sizeof(*bm->queue_packets));
-    oggpack_writeinit(bm->queue_packet_buffers);
-  }      
+      bm->queue_packet_buffers=calloc(1,sizeof(*bm->queue_packet_buffers));
+      bm->queue_packets=calloc(1,sizeof(*bm->queue_packets));
+      oggpack_writeinit(bm->queue_packet_buffers);
+    }      
+  }
 }
 
 void vorbis_bitrate_clear(bitrate_manager_state *bm){
@@ -322,7 +325,7 @@
         
         bm->avg_centeracc-=samples;
         bm->avg_center++;
-	if(bm->noisetrigger_postpone)bm->noisetrigger_postpone--;
+	if(bm->noisetrigger_postpone)bm->noisetrigger_postpone-=samples;
         if(bm->avg_center>=bm->queue_size)bm->avg_center=0;
       }
       new_minmax_head=bm->avg_center;
@@ -334,18 +337,18 @@
       if(bm->avgfloat>bi->avgfloat_noise_hightrigger)
         bm->noisetrigger_request-=1.f;
       
-      if(bm->noisetrigger_postpone==0){
+      if(bm->noisetrigger_postpone<=0){
         if(bm->noisetrigger_request<0.){
           bm->avgnoise-=1.f;
           if(bm->noisetrigger_request<bm->avg_sampleacc/2)
             bm->avgnoise-=1.f;
-	  bm->noisetrigger_postpone=bm->avg_sampleacc;
+	  bm->noisetrigger_postpone=bm->avg_sampleacc/2;
         }
         if(bm->noisetrigger_request>0.){
           bm->avgnoise+=1.f;
           if(bm->noisetrigger_request>bm->avg_sampleacc/2)
             bm->avgnoise+=1.f;
-	  bm->noisetrigger_postpone=bm->avg_sampleacc;
+	  bm->noisetrigger_postpone=bm->avg_sampleacc/2;
         }
 
         /* we generally want the noise bias to drift back to zero */
@@ -360,6 +363,9 @@
         if(bm->avgnoise>bi->avgfloat_noise_maxval)
           bm->avgnoise=bi->avgfloat_noise_maxval;
       }
+      fprintf(stderr,"noise:%f req:%d trigger:%d\n",bm->avgnoise,
+	      bm->noisetrigger_request,bm->noisetrigger_postpone);
+
     }
   }else{
     /* if we're not using an average tracker, the 'float' is nailed to

1.9.4.7   +3 -3      vorbis/lib/codec_internal.h

Index: codec_internal.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/codec_internal.h,v
retrieving revision 1.9.4.6
retrieving revision 1.9.4.7
diff -u -r1.9.4.6 -r1.9.4.7
--- codec_internal.h	2001/11/22 06:21:07	1.9.4.6
+++ codec_internal.h	2001/12/04 11:16:19	1.9.4.7
@@ -10,7 +10,7 @@
  ********************************************************************
 
  function: libvorbis codec headers
- last mod: $Id: codec_internal.h,v 1.9.4.6 2001/11/22 06:21:07 xiphmont Exp $
+ last mod: $Id: codec_internal.h,v 1.9.4.7 2001/12/04 11:16:19 xiphmont Exp $
 
  ********************************************************************/
 
@@ -111,8 +111,8 @@
   static_codebook        *book_param[256];
 
   vorbis_info_psy        *psy_param[64]; /* encode only */
-  vorbis_info_psy_global *psy_g_param;
-  bitrate_manager_info   *bi;
+  vorbis_info_psy_global psy_g_param;
+  bitrate_manager_info   bi;
 
   int    passlimit[32];     /* iteration limit per couple/quant pass */
   int    coupling_passes;

1.56.2.5  +8 -1      vorbis/lib/psy.c

Index: psy.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.c,v
retrieving revision 1.56.2.4
retrieving revision 1.56.2.5
diff -u -r1.56.2.4 -r1.56.2.5
--- psy.c	2001/11/16 08:17:05	1.56.2.4
+++ psy.c	2001/12/04 11:16:19	1.56.2.5
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.56.2.4 2001/11/16 08:17:05 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.56.2.5 2001/12/04 11:16:19 xiphmont Exp $
 
  ********************************************************************/
 
@@ -67,6 +67,13 @@
   }
   memset(look,0,sizeof(*look));
   _ogg_free(look);
+}
+
+void _vi_gpsy_free(vorbis_info_psy_global *i){
+  if(i){
+    memset(i,0,sizeof(*i));
+    _ogg_free(i);
+  }
 }
 
 void _vi_psy_free(vorbis_info_psy *i){

1.24.2.5  +6 -9      vorbis/lib/psy.h

Index: psy.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/psy.h,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -u -r1.24.2.4 -r1.24.2.5
--- psy.h	2001/11/16 08:17:07	1.24.2.4
+++ psy.h	2001/12/04 11:16:19	1.24.2.5
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: random psychoacoustics (not including preecho)
- last mod: $Id: psy.h,v 1.24.2.4 2001/11/16 08:17:07 xiphmont Exp $
+ last mod: $Id: psy.h,v 1.24.2.5 2001/12/04 11:16:19 xiphmont Exp $
 
  ********************************************************************/
 
@@ -59,7 +59,7 @@
 
 #define NOISE_COMPAND_LEVELS 40
 typedef struct vorbis_info_psy{
-  float  *ath;
+  float  ath[27];
 
   float  ath_adjatt;
   float  ath_maxatt;
@@ -67,11 +67,11 @@
   float tone_masteratt;
   float tone_guard;
   float tone_abs_limit;
-  vp_attenblock *toneatt;
+  vp_attenblock toneatt;
 
   int peakattp;
   int curvelimitp;
-  vp_attenblock *peakatt;
+  vp_attenblock peakatt;
 
   int noisemaskp;
   float noisemaxsupp;
@@ -81,16 +81,15 @@
   int   noisewindowhimin;
   int   noisewindowfixed;
   float noiseoff[P_BANDS];
-  float *noisecompand;
+  float noisecompand[NOISE_COMPAND_LEVELS];
 
   float max_curve_dB;
 
-  vp_couple_pass *couple_pass;
+  vp_couple_pass couple_pass[8];
 
 } vorbis_info_psy;
 
 typedef struct{
-  float     decaydBpms;
   int       eighth_octave_lines;
 
   /* for block long/short tuning; encode only */
@@ -108,8 +107,6 @@
 
 typedef struct {
   float   ampmax;
-  float **decay;
-  int     decaylines;
   int     channels;
 
   vorbis_info_psy_global *gi;

1.10.2.1  +7 -9      vorbis/lib/registry.c

Index: registry.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/registry.c,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- registry.c	2001/09/07 08:42:30	1.10
+++ registry.c	2001/12/04 11:16:20	1.10.2.1
@@ -11,13 +11,14 @@
  ********************************************************************
 
  function: registry for time, floor, res backends and channel mappings
- last mod: $Id: registry.c,v 1.10 2001/09/07 08:42:30 cwolf Exp $
+ last mod: $Id: registry.c,v 1.10.2.1 2001/12/04 11:16:20 xiphmont Exp $
 
  ********************************************************************/
 
 #include "vorbis/codec.h"
 #include "codec_internal.h"
 #include "registry.h"
+#include "registry_api.h"
 #include "misc.h"
 
 
@@ -51,11 +52,8 @@
   &mapping0_exportbundle,
 };
 
-  /*
-   * For win32 only, the following code needs to be appended to this file 
-   * because the "sizeof" operator can only evaluate the sizes
-   * of statically initialized arrays in the same compilation unit.
-   */ 
-#if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
-# include "shmmap_c.h"
-#endif
+/* make Windows happy; can't access the registry directly outside of
+   libvorbis, and vorbisenc needs a few functions */
+void residue_free_info(vorbis_info_residue *r,int type){
+  _residue_P[type]->free_info(r);
+}

1.17.2.1  +583 -142  vorbis/lib/vorbisenc.c

Index: vorbisenc.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/vorbisenc.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- vorbisenc.c	2001/10/02 00:14:32	1.17
+++ vorbisenc.c	2001/12/04 11:16:20	1.17.2.1
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: simple programmatic interface for encoder mode setup
- last mod: $Id: vorbisenc.c,v 1.17 2001/10/02 00:14:32 segher Exp $
+ last mod: $Id: vorbisenc.c,v 1.17.2.1 2001/12/04 11:16:20 xiphmont Exp $
 
  ********************************************************************/
 
@@ -23,86 +23,516 @@
 #include "vorbis/vorbisenc.h"
 
 #include "codec_internal.h"
-#include "registry.h"
-#include "modes/modes.h"
+#include "registry-api.h"
 
 #include "os.h"
 #include "misc.h"
 
-/*
- * If this module gets built into a separate shared library 
- * on win32 (DLL), then the backend mappings from registry.c
- * need to be referenced from a file-mapped shared memory segment.
- */
-#if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
-# include "shmmap.h"
+/* careful with this; it's using static array sizing to make managing
+   all the modes a little less annoying.  If we use a residue backend
+   with > 10 partition types, or a different division of iteration,
+   this needs to be updated. */
+typedef struct {
+  vorbis_info_residue0 *res;
+  static_codebook *book_aux[2];
+  static_codebook *books_base[6][10][3];
+  static_codebook *books_stereo_backfill[6][10];
+  static_codebook *books_residue_backfill[6][10][2];
+} vorbis_residue_template;
+
+#include "modes/residue_44.h"
+#include "modes/psych_44.h"
+#include "modes/floor_44.h"
+
+/* a few static coder conventions */
+static vorbis_info_time0 _time_dummy={0};
+static vorbis_info_mode _mode_set_short={0,0,0,0};
+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)
+/* three psychoacoustic profiles are used: One for
+   short blocks, and two for long blocks (transition and regular) */
+static vorbis_info_mapping0 _mapping_set_short={
+  1, {0,0}, {0}, {0}, {0}, {0,0}, 0,{0},{0}};
+static vorbis_info_mapping0 _mapping_set_long={
+  1, {0,0}, {0}, {1}, {1}, {1,2}, 0,{0},{0}};
+
+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;
+
+    vi->version=0;
+    vi->channels=ch;
+    vi->rate=rate;
+    
+    ci->blocksizes[0]=small;
+    ci->blocksizes[1]=large;
+
+    /* time mapping hooks are unused in vorbis I */
+    ci->times=1;
+    ci->time_type[0]=0;
+    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 */
+    ci->modes=2;
+    ci->mode_param[0]=&_mode_set_short;
+    ci->mode_param[1]=&_mode_set_long;
+
+    /* by convention two mappings, both mapping type zero (polyphonic
+       PCM), first for short, second for long blocks */
+    ci->maps=2;
+    ci->map_type[0]=0;
+    ci->map_param[0]=&_mapping_set_short;
+    ci->map_type[1]=0;
+    ci->map_param[1]=&_mapping_set_short;
 
-  SHARED_MAP *g_shared_map;
+    return(0);
+  }
+  return(OV_EINVAL);
+}
 
-# define _time_P    g_shared_map->p_time_P
-# define _floor_P   g_shared_map->p_floor_P
-# define _residue_P g_shared_map->p_residue_P
-# define _mapping_P g_shared_map->p_mapping_P
-#endif
+static int vorbis_encode_floor_init(vorbis_info *vi,double q,int block,
+				    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;
+  va_list ap;
+
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,int);
+  va_end(ap);
+
+  memcpy(f,in[x[iq]],sizoef(*f));
+  /* fill in the lowpass field, even if it's temporary */
+  f->n=ci->blocksizes[block]>>1;
+
+  /* books */
+  {
+    int partitions=f->partitions;
+    int maxclass=-1;
+    int maxbook=-1;
+    for(i=0;i<partitions;i++)
+      if(f->partitionclass[i]>maxclass)maxclass=f->partitionclass[i];
+    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++){
+	if(f->class_subbook[i][k]>maxbook)maxbook=f->class_subbook[i][k];
+	f->class_subbook[i][k]+=ci->books;
+      }
+    }
 
-/* deepcopy all but the codebooks; in this usage, they're static
-   (don't copy as they could be big) */
-static void codec_setup_partialcopy(codec_setup_info *ci,
-				 codec_setup_info *cs){
-  int i;
+    for(i=0;i<=maxbook;i++)
+      ci->book_param[ci->books++]=books[x[iq]][i];
+  }
 
-#if defined(_MSC_VER) && defined(STANDALONE_VORBISENC_DLL)
-  int maplen;
+  /* for now, we're only using floor 1 */
+  vi->floor_type[vi->floors]=1;
+  vi->floor_param[vi->floors]=f;
+  vi->floors++;
 
-  if ((g_shared_map = table_map2mem(&maplen)) == (SHARED_MAP*)0)
-  ; /* some error handling for memory exhaustion */
-#endif
+  return(0);
+}
+
+static int vorbis_encode_global_psych_init(vorbis_info *vi,double q,
+					   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;
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
+  }
+
+  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->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;
+  double x[11],dq;
+  codec_setup_info *ci=vi->ci;
+  vorbis_info_psy *p=&ci->psy_param[block];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
+  }
+
+  if(block>=ci->psys)
+    ci->psys=block+1;
+  if(!p){
+    p=calloc(1,sizeof(*p));
+    ci->psy_params[block]=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->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;
+
+}
+
+static int vorbis_encode_compand_init(vorbis_info *vi,double q,int block,
+					   float **in, ...){
+  int i,iq=q*10;
+  double x[11],dq;
+  codec_setup_info *ci=vi->ci;
+  vorbis_info_psy *p=&ci->psy_param[block];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q+10.-iq;
+  }
+
+  /* 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;
+}
+
+static int vorbis_encode_tonemask_init(vorbis_info *vi,double q,int block,
+				       int ***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];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
+  }
 
-  memcpy(ci,cs,sizeof(*ci)); /* to get the flat numbers */
+  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;
+}
 
-  /* codebooks */
-  for(i=0;i<ci->books;i++){
-    ci->book_param[i]=cs->book_param[i];
+static int vorbis_encode_peak_init(vorbis_info *vi,double q,int block,
+				   int ***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];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
   }
 
-  /* time backend settings */
-  for(i=0;i<ci->times;i++){
-    ci->time_param[i]=_time_P[ci->time_type[i]]->
-      copy_info(cs->time_param[i]);
+  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;
+}
+
+static int vorbis_encode_noisebias_init(vorbis_info *vi,double q,int block,
+					int **in, ...){
+  int i,iq=q*10;
+  double x[11],dq;
+  codec_setup_info *ci=vi->ci;
+  vorbis_info_psy *p=&ci->psy_param[block];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
   }
 
-  /* floor backend settings */
-  for(i=0;i<ci->floors;i++){
-    ci->floor_param[i]=_floor_P[ci->floor_type[i]]->
-      copy_info(cs->floor_param[i]);
+  for(i=0;i<P_BANDS;i++)
+    p->noiseoff[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq;
+}
+
+static int vorbis_encode_ath_init(vorbis_info *vi,double q,int block,
+				  float **in, ...){
+  int i,iq=q*10;
+  double x[11],dq;
+  codec_setup_info *ci=vi->ci;
+  vorbis_info_psy *p=&ci->psy_param[block];
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
   }
 
-  /* residue backend settings */
-  for(i=0;i<ci->residues;i++){
-    ci->residue_param[i]=_residue_P[ci->residue_type[i]]->
-      copy_info(cs->residue_param[i]);
+  for(i=0;i<P_BANDS;i++)
+    p->ath[i]=in[iq][i]*(1.-dq)+in[iq+1][i]*dq;
+}
+
+static double stereo_threshholds[]={0.0, 2.5, 4.5, 7.5, 12.5, 22.5};
+static int vorbis_encode_residue_init(vorbis_info *vi,double q,int block,
+				      vorbis_residue_template *in, ...){
+
+  int i,iq=q*10;
+  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;
+  va_list ap;
+  
+  va_start(ap,in);
+  for(i=0;i<11;i++)
+    t[i]=va_arg(ap,int);
+  coupled_p=va_arg(ap,int);
+  stereo_backfill_p=va_arg(ap,int);
+  residue_backfill_p=va_arg(ap,int);
+  for(i=0;i<11;i++)
+    a[i]=va_arg(ap,int);
+  for(i=0;i<11;i++)
+    c[i]=va_arg(ap,double);
+  va_end(ap);
+  
+  /* may be re-called due to ctl */
+  if(ci->residue_param[block])
+    /* free preexisting instance */
+    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));
+
+  n=r->end=ci->blocksizes[block?1:0]>>1; /* to be adjusted by lowpass later */
+
+  if(block){
+    r->grouping=32;
+  }else{
+    r->grouping=16;
   }
+
+  res_position=rint((double)c[iq]*1000/vi->rate*n);
+  partition_position=res_position/r->grouping;
+  for(i=0;i<r->partitions;i++)
+    if(r->blimit[i]<0)r->blimit[i]=partition_position;
+
+  /* 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;
+
+    ci->residue_type[block]=2;
+
+    psy->couple_pass[0]={1.,1., {{-1,  1,9e10,  0},{9999, 1,9e10, -1}}};
+    psy->couple_pass[0].couple_pass[0].limit=res_position;
+    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;
+      for(i=0;i<r->partitions;i++)
+	if(in[qi].books_stereo_backfill[a[qi]-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;
+      for(i=0;i<r->partitions;i++)
+	if(in[qi].books_residue_backfill[amplitude_select][i][0])
+	  r->secondstages[i]|=(1<<(iterations+2));
+      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;
+      for(i=0;i<r->partitions;i++)
+	if(in[qi].books_residue_backfill[amplitude_select][i][1])
+	  r->secondstages[i]|=(1<<(iterations+2));
+      iterations++;
+    }
+    ci->coupling_passes=iterations;
+
+    if(block)
+      memcpy(ci->psys+block+1,psy,sizeof(*psy));
 
-  /* map backend settings */
-  for(i=0;i<ci->maps;i++){
-    ci->map_param[i]=_mapping_P[ci->map_type[i]]->
-      copy_info(cs->map_param[i]);
+  }else{
+    ci->residue_type[block]=1;
+
+    ci->passlimit[0]=3;
+
+    if(residue_backfill_p){
+      for(i=0;i<r->partitions;i++){
+	if(in[qi].books_residue_backfill[amplitude_select][i][0])
+	  r->secondstages[i]|=8;
+	if(in[qi].books_residue_backfill[amplitude_select][i][1])
+	  r->secondstages[i]|=16;
+      }
+      ci->passlimit[1]=4;
+      ci->passlimit[2]=5;
+      ci->coupling_passes=3;
+    }else
+      ci->coupling_passes=1;
   }
   
-  /* mode settings */
-  for(i=0;i<ci->modes;i++){
-    ci->mode_param[i]=_ogg_calloc(1,sizeof(*ci->mode_param[i]));
-    ci->mode_param[i]->blockflag=cs->mode_param[i]->blockflag;
-    ci->mode_param[i]->windowtype=cs->mode_param[i]->windowtype;
-    ci->mode_param[i]->transformtype=cs->mode_param[i]->transformtype;
-    ci->mode_param[i]->mapping=cs->mode_param[i]->mapping;
+  /* fill in all the books */
+  {
+    int booklist=0;
+    r->groupbook=ci->books;
+    ci->book_param[ci->books++]=in[qi].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]){
+	  r->booklist[booklist++]=ci->books;
+	  ci->book_param[ci->books++]=in[qi].books_base[a[qi]][i][k]);
+      }
+      if(coupled_p && stereo_backfill_p && a[qi] &&
+	 in[qi].books_stereo_backfill[a[qi]][i]){
+	  r->booklist[booklist++]=ci->books;
+	  ci->book_param[ci->books++]=in[qi].books_stereo_backfill[a[qi]][i];
+      }
+      if(residue_backfill_p)
+	for(k=0;k<2;k++){
+	  if(in[qi].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];
+	  }
+	}
+    }
   }
+      
+  return(0);
+}      
 
-  /* psy settings */
-  for(i=0;i<ci->psys;i++){
-    ci->psy_param[i]=_vi_psy_copy(cs->psy_param[i]);
+static int vorbis_encode_lowpass_init(vorbis_info *vi,double q,int block,...){
+  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;
+  int blocksize=ci->blocksizes[block]>>1;
+  double nyq=vi->rate/2.;
+  va_list ap;
+  
+  va_start(ap,block);
+  for(i=0;i<11;i++)
+    x[i]=va_arg(ap,double);
+  va_end(ap);
+
+  if(iq==10){
+    iq=9;
+    dq=1.;
+  }else{
+    dq=q*10.-iq;
   }
+  
+  freq=x[iq]*(1.-dq)+x[iq+1]*dq;
+
+  /* lowpass needs to be set in the floor and the residue. */
 
+  /* in the floor, the granularity can be very fine; it doesn't alter
+     the encoding structure, only the samples used to fit the floor
+     approximation */
+  f->n=freq/nyq*blocksize;
+
+  /* in the residue, we're constrained, physically, by partition
+     boundaries.  We still lowpass 'wherever', but we have to round up
+     here to next boundary, or the vorbis spec will round it *down* to
+     previous boundary in encode/decode */
+  if(ci->residue_type[block]==2)
+    r->end=((freq/nyq*blocksize*2)/r->grouping+.9)* /* round up only if we're well past */
+      r->grouping;
+  else
+    r->end=((freq/nyq*blocksize)/r->grouping+.9)* /* round up only if we're well past */
+      r->grouping;
+  return(0);
 }
 
 /* encoders will need to use vorbis_info_init beforehand and call
@@ -114,18 +544,106 @@
                            
                            float base_quality /* 0. to 1. */
                            ){
-
-  switch(channels){
-  case 2:
-    return(OV_EIMPL);
+  int ret=0;
 
+  if(rate>40000){
+    ret|=vorbis_encode_toplevel_init(vi,256,2048,channels,rate);
+    ret|=vorbis_encode_floor_init(vi,base_quality,0,_floor_44_128_books,_floor_44_128,
+				  0,0,0,1,1,1,1,1,1,1,1);
+    ret|=vorbis_encode_floor_init(vi,base_quality,1,_floor_44_1024_books,_floor_44_1024,
+				  0,0,0,0,0,0,0,0,0,0,0);
+    
+    ret|=vorbis_encode_global_psych_init(vi,base_quality,_psy_global_44,
+					 0., 0., .5, 1., 1., 1., 1., 1., 1., 1., 1.);
+    
+    ret|=vorbis_encode_psyset_init(vi,base_quality,0,_psy_settings,
+				   0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
+    ret|=vorbis_encode_psyset_init(vi,base_quality,1,_psy_settings,
+				   0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
+    ret|=vorbis_encode_psyset_init(vi,base_quality,2,_psy_settings,
+				   0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
+
+    ret|=vorbis_encode_tonemask_init(vi,base_quality,0,_vp_tonemask_adj_otherblock,
+				     0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
+    ret|=vorbis_encode_tonemask_init(vi,base_quality,1,_vp_tonemask_adj_otherblock,
+				     0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
+    ret|=vorbis_encode_tonemask_init(vi,base_quality,2,_vp_tonemask_adj_longblock,
+				     0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
+
+    ret|=vorbis_encode_compand_init(vi,base_quality,0,_psy_compand_44,
+				    1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.);
+    ret|=vorbis_encode_compand_init(vi,base_quality,1,_psy_compand_44,
+				    1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.);
+    ret|=vorbis_encode_compand_init(vi,base_quality,2,_psy_compand_44,
+				    1., 1., 1.3, 1.6, 2., 2., 2., 2., 2., 2., 2.);
+    
+    ret|=vorbis_encode_peak_init(vi,base_quality,0,_vp_peakguard,
+				 0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
+    ret|=vorbis_encode_peak_init(vi,base_quality,1,_vp_peakguard,
+				 0., .5, 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5.);
+    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,
+				      0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
+    ret|=vorbis_encode_noisebias_init(vi,base_quality,1,_vp_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,
+				      0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.);
+
+    ret|=vorbis_encode_ath_init(vi,base_quality,0,ATH_Bark_dB,
+				0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.);
+    ret|=vorbis_encode_ath_init(vi,base_quality,1,ATH_Bark_dB,
+				0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.);
+    ret|=vorbis_encode_ath_init(vi,base_quality,2,ATH_Bark_dB,
+				0., 0., 0., 0., 0., .5, 1., 1., 1.5, 2., 2.);
+    
+    if(ret){
+      vorbis_info_clear(vi);
+      return ret; 
+    }
 
-    break;
-  default:
+    switch(channels){
+    case 2:
+      /* setup specific to stereo coupling */
+
+      /* unmanaged, one iteration residue setup */
+      ret|=vorbis_encode_residue_init(vi,base_quality,0,_residue_template_44_stereo_temp,
+				      1, /* coupled */
+				      0, /* no mid stereo backfill */
+				      0, /* no residue backfill */
+				      4,  3,  3,  2,   1,  0,  0,  0,  0,  0,  0,
+				      4., 4., 6., 6., 10., 4., 4., 4., 4., 4., 4.);
+      
+      ret|=vorbis_encode_residue_init(vi,base_quality,1,_residue_template_44_stereo_temp,
+				      1, /* coupled */
+				      0, /* no mid stereo backfill */
+				      0, /* no residue backfill */
+				      4,  3,  3,   2,   1,  0,  0,  0,  0,  0,  0,
+				      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.,
+				      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.,
+				      999.,999.,999.,999.,999.,999.);
+      
+      return(ret);
+
+      break;
+    default:
+      return(OV_EIMPL);
+      
+      break;
+    }
+    return(0);
+  }else
     return(OV_EIMPL);
 
-    break;
-  }
+  if(ret)
+    vorbis_info_clear(vi);
+  return(ret);
 }
 
 
@@ -136,84 +654,7 @@
                        long max_bitrate,
                        long nominal_bitrate,
                        long min_bitrate){
-
-  long bpch;
-  int i,j;
-  codec_setup_info *ci=vi->codec_setup;
-  codec_setup_info *mode=NULL;
-  if(!ci)return(OV_EFAULT);
-
-  vi->version=0;
-  vi->channels=channels;
-  vi->rate=rate;
-  
-  vi->bitrate_upper=max_bitrate;
-  vi->bitrate_nominal=nominal_bitrate;
-  vi->bitrate_lower=min_bitrate;
-  vi->bitrate_window=2;
-
-  /* copy a mode into our allocated storage */
-  bpch=nominal_bitrate/channels;
-
-#if 0
-  switch(channels){
-  case 2:
-/*	if(rate>40000){	*/
-
-    if(bpch<35000){
-      mode=&info_44c_Z;
-    }else if(bpch<45000){
-      mode=&info_44c_Y;
-    }else if(bpch<55000){
-      mode=&info_44c_X;
-    }else if(bpch<75000){
-      mode=&info_44c_A;
-    }else if(bpch<90000){
-      mode=&info_44c_B;
-    }else if(bpch<110000){
-      mode=&info_44c_C;
-    }else if(bpch<160000){
-      mode=&info_44c_D;
-    }else{
-      mode=&info_44c_E;
-    }
-/*	}	*/
-
-    break;
-  default:
-
-    if(bpch<40000){
-      mode=&info_44_Z;
-    }else if(bpch<50000){
-      mode=&info_44_Y;
-    }else if(bpch<70000){
-      mode=&info_44_X;
-    }else if(bpch<90000){
-      mode=&info_44_A;
-    }else if(bpch<120000){
-      mode=&info_44_B;
-    }else{
-      mode=&info_44_C;
-    }
-    break;
-  }
-#endif
-
-  mode=&info_44c_A;
-
-  /* now we have to deepcopy */
-  codec_setup_partialcopy(ci,mode);
-
-  /* adjust for sample rate */
-  /* we don't have any floor 0 modes anymore 
-  for(i=0;i<ci->floors;i++)
-    if(ci->floor_type[i]==0)
-    ((vorbis_info_floor0 *)(ci->floor_param[i]))->rate=rate; */
-
-  /* adjust for channels */
-  /* but all our mappings use submap zero now! */
-
-  return(0);
+  return(OV_EIMPL);
 }
 
 int vorbis_encode_ctl(vorbis_info *vi,int number,void *arg){

No                   revision

No                   revision

1.1.2.1   +23 -0     vorbis/lib/Attic/registry-api.h

No                   revision

No                   revision

1.6.2.1   +1 -2      vorbis/lib/modes/Makefile.am

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -u -r1.6 -r1.6.2.1
--- Makefile.am	2001/08/13 11:38:34	1.6
+++ Makefile.am	2001/12/04 11:16:22	1.6.2.1
@@ -2,5 +2,4 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-EXTRA_DIST = maskadj_A.h maskadj_X.h maskadj_Z.h mode_22c_Z.h mode_32c_Z.h mode_44_A.h mode_44_B.h mode_44c_A.h mode_44c_B.h mode_44c_C.h mode_44c_D.h mode_44c_E.h mode_44_C.h mode_44c_X.h mode_44c_Y.h mode_44c_Z.h mode_44_X.h mode_44_Y.h mode_44_Z.h modes.h
-
+EXTRA_DIST = floor_44.h psych_44.h residue_44.h

1.4.2.12  +3 -38     vorbis/lib/modes/mode_44c_A.h

Index: mode_44c_A.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/modes/mode_44c_A.h,v
retrieving revision 1.4.2.11
retrieving revision 1.4.2.12
diff -u -r1.4.2.11 -r1.4.2.12
--- mode_44c_A.h	2001/11/24 05:26:11	1.4.2.11
+++ mode_44c_A.h	2001/12/04 11:16:23	1.4.2.12
@@ -11,7 +11,7 @@
  ********************************************************************
 
  function: predefined encoding modes; 44kHz stereo ~64kbps true VBR
- last mod: $Id: mode_44c_A.h,v 1.4.2.11 2001/11/24 05:26:11 xiphmont Exp $
+ last mod: $Id: mode_44c_A.h,v 1.4.2.12 2001/12/04 11:16:23 xiphmont Exp $
 
  ********************************************************************/
 
@@ -81,18 +81,7 @@
 #include "maskadj_A.h"
 
 static bitrate_manager_info _bm_set_44c_A={
-  /* progressive coding and bitrate controls */
-  2.,.5,
-  //2.,       128000,           128000,  
-  //          128000,           128000,
-
-  2.,       0,           0,  
-            0,           0,
-           
-  4.0, 0.,  -1.,              .05, 
-            -.05,             .05,
-  3.0,5.0,
-  -10.f,+4.f
+  0
 };
 
 static vorbis_info_psy_global _psy_set_44c_AG={
@@ -100,7 +89,7 @@
   8,   /* lines per eighth octave */
   
   /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
-  256, {26.f,26.f,26.f,30.f}, {-30.f,-30.f,-30.f,-34.f}, -90.f,
+  256, {26.f,26.f,26.f,30.f}, {-26.f,-26.f,-26.f,-30.f}, -90.f,
   -6.f, 
   
   0,
@@ -108,18 +97,6 @@
 
 static struct vp_couple_pass _psy_pass_44c_A0[]={
   {1.f,1.f,
-   {{  24,       0, 9e10,      0},
-    {9999,       0, 9e10,    4.5}}
-  },
-  {1.f,1.f,
-   {{  64,       0, 9e10,      0},
-    {9999,       0, 9e10,    2.5}}
-  },
-  {.333333f,3.f,
-   {{  64,       0, 9e10,      0},
-    {9999,       0, 9e10,    2.5}}
-  },
-  {.111111f,9.f,
    {{  64,       0, 9e10,      0},
     {9999,       0, 9e10,    2.5}}
   },
@@ -127,18 +104,6 @@
 
 static vp_couple_pass _psy_pass_44c_A[]={
   {1.f,1.f,
-   {{ 288,       0, 9e10,      0},
-    {9999,       0, 9e10,    4.5}}
-  },
-  {1.f,1.f,
-   {{ 512,       0, 9e10,      0},
-    {9999,       0, 9e10,    2.5}}
-  },
-  {.333333f,3.f,
-   {{ 512,       0, 9e10,      0},
-    {9999,       0, 9e10,    2.5}}
-  },
-  {.111111f,9.f,
    {{ 512,       0, 9e10,      0},
     {9999,       0, 9e10,    2.5}}
   },

--- >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