doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
backends.h
Go to the documentation of this file.
1 /********************************************************************
2  * *
3  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7  * *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
9  * by the XIPHOPHORUS Company http://www.xiph.org/ *
10  * *
11  ********************************************************************
12 
13  function: libvorbis backend and mapping structures; needed for
14  static mode headers
15  last mod: $Id: backends.h,v 1.14 2002/07/11 06:40:48 xiphmont Exp $
16 
17  ********************************************************************/
18 
19 /* this is exposed up here because we need it for static modes.
20  Lookups for each backend aren't exposed because there's no reason
21  to do so */
22 
23 #ifndef _vorbis_backend_h_
24 #define _vorbis_backend_h_
25 
26 #include "codec_internal.h"
27 
28 /* this would all be simpler/shorter with templates, but.... */
29 /* Floor backend generic *****************************************/
30 typedef struct{
34  void (*free_info) (vorbis_info_floor *);
35  void (*free_look) (vorbis_look_floor *);
36  void *(*inverse1) (struct vorbis_block *,vorbis_look_floor *);
37  int (*inverse2) (struct vorbis_block *,vorbis_look_floor *,
38  void *buffer,float *);
40 
41 typedef struct{
42  int order;
43  long rate;
44  long barkmap;
45 
46  int ampbits;
47  int ampdB;
48 
49  int numbooks; /* <= 16 */
50  int books[16];
51 
52  float lessthan; /* encode-only config setting hacks for libvorbis */
53  float greaterthan; /* encode-only config setting hacks for libvorbis */
54 
56 
57 
58 #define VIF_POSIT 63
59 #define VIF_CLASS 16
60 #define VIF_PARTS 31
61 typedef struct{
62  int partitions; /* 0 to 31 */
63  int partitionclass[VIF_PARTS]; /* 0 to 15 */
64 
65  int class_dim[VIF_CLASS]; /* 1 to 8 */
66  int class_subs[VIF_CLASS]; /* 0,1,2,3 (bits: 1<<n poss) */
67  int class_book[VIF_CLASS]; /* subs ^ dim entries */
68  int class_subbook[VIF_CLASS][8]; /* [VIF_CLASS][subs] */
69 
70 
71  int mult; /* 1 2 3 or 4 */
72  int postlist[VIF_POSIT+2]; /* first two implicit */
73 
74 
75  /* encode side analysis parameters */
76  float maxover;
77  float maxunder;
78  float maxerr;
79 
80  float twofitweight;
81  float twofitatten;
82 
83  int n;
84 
86 
87 /* Residue backend generic *****************************************/
88 typedef struct{
93  void (*free_info) (vorbis_info_residue *);
94  void (*free_look) (vorbis_look_residue *);
95  long **(*class) (struct vorbis_block *,vorbis_look_residue *,
96  float **,int *,int);
97  int (*forward) (struct vorbis_block *,vorbis_look_residue *,
98  float **,float **,int *,int,long **);
99  int (*inverse) (struct vorbis_block *,vorbis_look_residue *,
100  float **,int *,int);
102 
103 typedef struct vorbis_info_residue0{
104 /* block-partitioned VQ coded straight residue */
105  long begin;
106  long end;
107 
108  /* first stage (lossless partitioning) */
109  int grouping; /* group n vectors per partition */
110  int partitions; /* possible codebooks for a partition */
111  int groupbook; /* huffbook for partitioning */
112  int secondstages[64]; /* expanded out to pointers in lookup */
113  int booklist[256]; /* list of second stage books */
114 
115  float classmetric1[64];
116  float classmetric2[64];
117 
119 
120 /* Mapping backend generic *****************************************/
121 typedef struct{
123  oggpack_buffer *);
124  vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
125  void (*free_info) (vorbis_info_mapping *);
126  int (*forward) (struct vorbis_block *vb);
127  int (*inverse) (struct vorbis_block *vb,vorbis_info_mapping *);
129 
130 typedef struct vorbis_info_mapping0{
131  int submaps; /* <= 16 */
132  int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
133 
134  int floorsubmap[16]; /* [mux] submap to floors */
135  int residuesubmap[16]; /* [mux] submap to residue */
136 
138  int coupling_mag[256];
139  int coupling_ang[256];
140 
142 
143 #endif
144 
145 
#define VIF_POSIT
Definition: backends.h:58
int secondstages[64]
Definition: backends.h:112
void vorbis_info_floor
case const int
Definition: Callbacks.cpp:52
void vorbis_look_residue
float twofitweight
Definition: backends.h:80
#define VIF_CLASS
Definition: backends.h:59
void vorbis_look_floor
GLuint buffer
Definition: glext.h:3108
float classmetric1[64]
Definition: backends.h:115
int residuesubmap[16]
Definition: backends.h:135
int coupling_mag[256]
Definition: backends.h:138
struct vorbis_info_mapping0 vorbis_info_mapping0
void vorbis_info_residue
#define VIF_PARTS
Definition: backends.h:60
int coupling_ang[256]
Definition: backends.h:139
struct vorbis_info_residue0 vorbis_info_residue0
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
int chmuxlist[256]
Definition: backends.h:132
void vorbis_info_mapping
float classmetric2[64]
Definition: backends.h:116