zenilib: zenilib/jni/external/libvorbis/lib/backends.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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-2009 *
9 * by the Xiph.Org Foundation 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 16962 2010-03-11 07:30:34Z xiphmont $
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{
31 void (*pack) (vorbis_info_floor *,oggpack_buffer *);
32 vorbis_info_floor *(*unpack)(vorbis_info *,oggpack_buffer *);
33 vorbis_look_floor *(*look) (vorbis_dsp_state *,vorbis_info_floor *);
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 *);
39 } vorbis_func_floor;
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
55 } vorbis_info_floor0;
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
85 } vorbis_info_floor1;
86
87 /* Residue backend generic *****************************************/
88 typedef struct{
89 void (*pack) (vorbis_info_residue *,oggpack_buffer *);
90 vorbis_info_residue *(*unpack)(vorbis_info *,oggpack_buffer *);
91 vorbis_look_residue *(*look) (vorbis_dsp_state *,
92 vorbis_info_residue *);
93 void (*free_info) (vorbis_info_residue *);
94 void (*free_look) (vorbis_look_residue *);
95 long **(*class) (struct vorbis_block *,vorbis_look_residue *,
96 int **,int *,int);
97 int (*forward) (oggpack_buffer *,struct vorbis_block *,
98 vorbis_look_residue *,
99 int **,int *,int,long **,int);
100 int (*inverse) (struct vorbis_block *,vorbis_look_residue *,
101 float **,int *,int);
102 } vorbis_func_residue;
103
104 typedef struct vorbis_info_residue0{
105 /* block-partitioned VQ coded straight residue */
106 long begin;
107 long end;
108
109 /* first stage (lossless partitioning) */
110 int grouping; /* group n vectors per partition */
111 int partitions; /* possible codebooks for a partition */
112 int partvals; /* partitions ^ groupbook dim */
113 int groupbook; /* huffbook for partitioning */
114 int secondstages[64]; /* expanded out to pointers in lookup */
115 int booklist[512]; /* list of second stage books */
116
117 const int classmetric1[64];
118 const int classmetric2[64];
119 } vorbis_info_residue0;
120
121 /* Mapping backend generic *****************************************/
122 typedef struct{
123 void (*pack) (vorbis_info *,vorbis_info_mapping *,
124 oggpack_buffer *);
125 vorbis_info_mapping *(*unpack)(vorbis_info *,oggpack_buffer *);
126 void (*free_info) (vorbis_info_mapping *);
127 int (*forward) (struct vorbis_block *vb);
128 int (*inverse) (struct vorbis_block *vb,vorbis_info_mapping *);
129 } vorbis_func_mapping;
130
131 typedef struct vorbis_info_mapping0{
132 int submaps; /* <= 16 */
133 int chmuxlist[256]; /* up to 256 channels in a Vorbis stream */
134
135 int floorsubmap[16]; /* [mux] submap to floors */
136 int residuesubmap[16]; /* [mux] submap to residue */
137
138 int coupling_steps;
139 int coupling_mag[256];
140 int coupling_ang[256];
141
142 } vorbis_info_mapping0;
143
144 #endif
VIF_POSIT
#define VIF_POSIT
Definition: backends.h:58
vorbis_info_floor0::numbooks
int numbooks
Definition: backends.h:49
vorbis_info_residue0::partvals
int partvals
Definition: backends.h:112
vorbis_info_floor1::partitions
int partitions
Definition: backends.h:62
void
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1824
vorbis_info_residue0::grouping
int grouping
Definition: backends.h:110
vorbis_info_floor0::lessthan
float lessthan
Definition: backends.h:52
vorbis_info_residue0::secondstages
int secondstages[64]
Definition: backends.h:114
vorbis_info_residue0::begin
long begin
Definition: backends.h:106
vorbis_info_floor
void vorbis_info_floor
Definition: codec_internal.h:54
vorbis_info_residue0::groupbook
int groupbook
Definition: backends.h:113
vorbis_info_residue0::classmetric1
const int classmetric1[64]
Definition: backends.h:117
vorbis_info_residue0::partitions
int partitions
Definition: backends.h:111
vorbis_info_floor0::barkmap
long barkmap
Definition: backends.h:44
vorbis_info_mapping0::coupling_steps
int coupling_steps
Definition: backends.h:138
codec_internal.h
vorbis_look_residue
void vorbis_look_residue
Definition: codec_internal.h:43
vorbis_info_floor1
Definition: backends.h:61
vorbis_info_residue0::classmetric2
const int classmetric2[64]
Definition: backends.h:118
vorbis_info_floor1::n
int n
Definition: backends.h:83
buffer
EGLContext EGLenum EGLClientBuffer buffer
Definition: eglext.h:87
vorbis_info_floor1::twofitweight
float twofitweight
Definition: backends.h:80
VIF_CLASS
#define VIF_CLASS
Definition: backends.h:59
int
int
Definition: SDL_systhread.c:37
vorbis_look_floor
void vorbis_look_floor
Definition: codec_internal.h:42
vorbis_info_residue0::end
long end
Definition: backends.h:107
vorbis_func_mapping
Definition: backends.h:122
vorbis_info_mapping0::residuesubmap
int residuesubmap[16]
Definition: backends.h:136
vorbis_info_floor0::greaterthan
float greaterthan
Definition: backends.h:53
oggpack_buffer
Definition: ogg.h:32
vorbis_block
Definition: codec.h:88
vorbis_info_floor0::rate
long rate
Definition: backends.h:43
vorbis_info_floor0::ampdB
int ampdB
Definition: backends.h:47
vorbis_info_mapping0::coupling_mag
int coupling_mag[256]
Definition: backends.h:139
vorbis_info_mapping0
Definition: backends.h:131
vorbis_info_mapping0
struct vorbis_info_mapping0 vorbis_info_mapping0
vorbis_info_residue
void vorbis_info_residue
Definition: codec_internal.h:55
VIF_PARTS
#define VIF_PARTS
Definition: backends.h:60
vorbis_info_mapping0::coupling_ang
int coupling_ang[256]
Definition: backends.h:140
vorbis_info_residue0
struct vorbis_info_residue0 vorbis_info_residue0
vorbis_info_floor1::twofitatten
float twofitatten
Definition: backends.h:81
books
int books
Definition: metrics.c:56
vorbis_info_mapping0::submaps
int submaps
Definition: backends.h:132
vorbis_info_mapping0::floorsubmap
int floorsubmap[16]
Definition: backends.h:135
vorbis_func_residue
Definition: backends.h:88
vorbis_info_mapping0::chmuxlist
int chmuxlist[256]
Definition: backends.h:133
vorbis_info_floor1::maxunder
float maxunder
Definition: backends.h:77
vorbis_func_floor
Definition: backends.h:30
vorbis_info_mapping
void vorbis_info_mapping
Definition: codec_internal.h:56
vorbis_info_floor0::ampbits
int ampbits
Definition: backends.h:46
vorbis_info_floor1::maxover
float maxover
Definition: backends.h:76
vorbis_info_residue0::booklist
int booklist[512]
Definition: backends.h:115
vorbis_info_floor0::order
int order
Definition: backends.h:42
vorbis_info_residue0
Definition: backends.h:104
vorbis_info_floor1::mult
int mult
Definition: backends.h:71
vorbis_info
Definition: codec.h:28
vorbis_info_floor0
Definition: backends.h:41
vorbis_info_floor1::maxerr
float maxerr
Definition: backends.h:78
vorbis_dsp_state
Definition: codec.h:59