00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 #ifndef _vorbis_backend_h_
00024 #define _vorbis_backend_h_
00025 
00026 #include "codec_internal.h"
00027 
00028 
00029 
00030 typedef struct{
00031   void                   (*pack)  (vorbis_info_floor *,oggpack_buffer *);
00032   vorbis_info_floor     *(*unpack)(vorbis_info *,oggpack_buffer *);
00033   vorbis_look_floor     *(*look)  (vorbis_dsp_state *,vorbis_info_floor *);
00034   void (*free_info) (vorbis_info_floor *);
00035   void (*free_look) (vorbis_look_floor *);
00036   void *(*inverse1)  (struct vorbis_block *,vorbis_look_floor *);
00037   int   (*inverse2)  (struct vorbis_block *,vorbis_look_floor *,
00038                      void *buffer,float *);
00039 } vorbis_func_floor;
00040 
00041 typedef struct{
00042   int   order;
00043   long  rate;
00044   long  barkmap;
00045 
00046   int   ampbits;
00047   int   ampdB;
00048 
00049   int   numbooks; 
00050   int   books[16];
00051 
00052   float lessthan;     
00053   float greaterthan;  
00054 
00055 } vorbis_info_floor0;
00056 
00057 
00058 #define VIF_POSIT 63
00059 #define VIF_CLASS 16
00060 #define VIF_PARTS 31
00061 typedef struct{
00062   int   partitions;                
00063   int   partitionclass[VIF_PARTS]; 
00064 
00065   int   class_dim[VIF_CLASS];        
00066   int   class_subs[VIF_CLASS];       
00067   int   class_book[VIF_CLASS];       
00068   int   class_subbook[VIF_CLASS][8]; 
00069 
00070 
00071   int   mult;                       
00072   int   postlist[VIF_POSIT+2];     
00073 
00074 
00075   
00076   float maxover;     
00077   float maxunder;  
00078   float maxerr;    
00079 
00080   float twofitweight;  
00081   float twofitatten;
00082 
00083   int   n;
00084 
00085 } vorbis_info_floor1;
00086 
00087 
00088 typedef struct{
00089   void                 (*pack)  (vorbis_info_residue *,oggpack_buffer *);
00090   vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *);
00091   vorbis_look_residue *(*look)  (vorbis_dsp_state *,
00092                                  vorbis_info_residue *);
00093   void (*free_info)    (vorbis_info_residue *);
00094   void (*free_look)    (vorbis_look_residue *);
00095   long **(*fpclass)      (struct vorbis_block *,vorbis_look_residue *,
00096                         float **,int *,int);
00097   int  (*forward)      (oggpack_buffer *,struct vorbis_block *,
00098                         vorbis_look_residue *,
00099                         float **,float **,int *,int,long **);
00100   int  (*inverse)      (struct vorbis_block *,vorbis_look_residue *,
00101                         float **,int *,int);
00102 } vorbis_func_residue;
00103 
00104 typedef struct vorbis_info_residue0{
00105 
00106   long  begin;
00107   long  end;
00108 
00109   
00110   int    grouping;         
00111   int    partitions;       
00112   int    groupbook;        
00113   int    secondstages[64]; 
00114   int    booklist[256];    
00115 
00116   float  classmetric1[64];  
00117   float  classmetric2[64];  
00118 
00119 } vorbis_info_residue0;
00120 
00121 
00122 typedef struct{
00123   void                 (*pack)  (vorbis_info *,vorbis_info_mapping *,
00124                                  oggpack_buffer *);
00125   vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
00126   void (*free_info)    (vorbis_info_mapping *);
00127   int  (*forward)      (struct vorbis_block *vb);
00128   int  (*inverse)      (struct vorbis_block *vb,vorbis_info_mapping *);
00129 } vorbis_func_mapping;
00130 
00131 typedef struct vorbis_info_mapping0{
00132   int   submaps;  
00133   int   chmuxlist[256];   
00134   
00135   int   floorsubmap[16];   
00136   int   residuesubmap[16]; 
00137 
00138   int   coupling_steps;
00139   int   coupling_mag[256];
00140   int   coupling_ang[256];
00141 
00142 } vorbis_info_mapping0;
00143 
00144 #endif
00145 
00146