zenilib: zenilib/jni/external/libvorbis/lib/envelope.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
envelope.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: PCM data envelope analysis and manipulation
14 last mod: $Id: envelope.h 16227 2009-07-08 06:58:46Z xiphmont $
15
16 ********************************************************************/
17
18 #ifndef _V_ENVELOPE_
19 #define _V_ENVELOPE_
20
21 #include "mdct.h"
22
23 #define VE_PRE 16
24 #define VE_WIN 4
25 #define VE_POST 2
26 #define VE_AMP (VE_PRE+VE_POST-1)
27
28 #define VE_BANDS 7
29 #define VE_NEARDC 15
30
31 #define VE_MINSTRETCH 2 /* a bit less than short block */
32 #define VE_MAXSTRETCH 12 /* one-third full block */
33
34 typedef struct {
35 float ampbuf[VE_AMP];
36 int ampptr;
37
38 float nearDC[VE_NEARDC];
39 float nearDC_acc;
40 float nearDC_partialacc;
41 int nearptr;
42
43 } envelope_filter_state;
44
45 typedef struct {
46 int begin;
47 int end;
48 float *window;
49 float total;
50 } envelope_band;
51
52 typedef struct {
53 int ch;
54 int winlength;
55 int searchstep;
56 float minenergy;
57
58 mdct_lookup mdct;
59 float *mdct_win;
60
61 envelope_band band[VE_BANDS];
62 envelope_filter_state *filter;
63 int stretch;
64
65 int *mark;
66
67 long storage;
68 long current;
69 long curmark;
70 long cursor;
71 } envelope_lookup;
72
73 extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi);
74 extern void _ve_envelope_clear(envelope_lookup *e);
75 extern long _ve_envelope_search(vorbis_dsp_state *v);
76 extern void _ve_envelope_shift(envelope_lookup *e,long shift);
77 extern int _ve_envelope_mark(vorbis_dsp_state *v);
78
79
80 #endif
mdct.h
VE_NEARDC
#define VE_NEARDC
Definition: envelope.h:29
VE_BANDS
#define VE_BANDS
Definition: envelope.h:28
envelope_filter_state::nearDC_acc
float nearDC_acc
Definition: envelope.h:39
envelope_filter_state::nearDC_partialacc
float nearDC_partialacc
Definition: envelope.h:40
envelope_band::begin
int begin
Definition: envelope.h:46
_ve_envelope_shift
void _ve_envelope_shift(envelope_lookup *e, long shift)
Definition: envelope.c:356
e
return Display return Display Bool Bool int int e
Definition: SDL_x11sym.h:30
envelope_filter_state
Definition: envelope.h:34
envelope_band::end
int end
Definition: envelope.h:47
_ve_envelope_mark
int _ve_envelope_mark(vorbis_dsp_state *v)
Definition: envelope.c:330
_ve_envelope_clear
void _ve_envelope_clear(envelope_lookup *e)
Definition: envelope.c:76
_ve_envelope_init
void _ve_envelope_init(envelope_lookup *e, vorbis_info *vi)
Definition: envelope.c:32
envelope_lookup::storage
long storage
Definition: envelope.h:67
envelope_band::total
float total
Definition: envelope.h:49
v
const GLdouble * v
Definition: glew.h:1377
envelope_lookup::filter
envelope_filter_state * filter
Definition: envelope.h:62
VE_AMP
#define VE_AMP
Definition: envelope.h:26
envelope_lookup::curmark
long curmark
Definition: envelope.h:69
envelope_lookup::current
long current
Definition: envelope.h:68
envelope_lookup::mdct
mdct_lookup mdct
Definition: envelope.h:58
envelope_lookup::winlength
int winlength
Definition: envelope.h:54
envelope_lookup
Definition: envelope.h:52
envelope_filter_state::nearptr
int nearptr
Definition: envelope.h:41
envelope_lookup::cursor
long cursor
Definition: envelope.h:70
vi
XVisualInfo * vi
Definition: glewinfo_tail.c:221
envelope_lookup::mdct_win
float * mdct_win
Definition: envelope.h:59
envelope_lookup::minenergy
float minenergy
Definition: envelope.h:56
envelope_lookup::searchstep
int searchstep
Definition: envelope.h:55
_ve_envelope_search
long _ve_envelope_search(vorbis_dsp_state *v)
Definition: envelope.c:216
envelope_band::window
float * window
Definition: envelope.h:48
envelope_lookup::stretch
int stretch
Definition: envelope.h:63
envelope_band
Definition: envelope.h:45
mdct_lookup
Definition: mdct.h:56
envelope_lookup::mark
int * mark
Definition: envelope.h:65
envelope_lookup::ch
int ch
Definition: envelope.h:53
envelope_filter_state::ampptr
int ampptr
Definition: envelope.h:36
vorbis_info
Definition: codec.h:28
vorbis_dsp_state
Definition: codec.h:59