doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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-2002 *
9  * by the XIPHOPHORUS Company http://www.xiph.org/ *
10  * *
11  ********************************************************************
12 
13  function: PCM data envelope analysis and manipulation
14  last mod: $Id: envelope.h,v 1.25 2002/07/11 06:40:48 xiphmont Exp $
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;
41  int nearptr;
42 
44 
45 typedef struct {
46  int begin;
47  int end;
48  float *window;
49  float total;
51 
52 typedef struct {
53  int ch;
54  int winlength;
56  float minenergy;
57 
59  float *mdct_win;
60 
63  int stretch;
64 
65  int *mark;
66 
67  long storage;
68  long current;
69  long curmark;
70  long cursor;
72 
74 extern void _ve_envelope_clear(envelope_lookup *e);
76 extern void _ve_envelope_shift(envelope_lookup *e,long shift);
78 
79 
80 #endif
81 
#define VE_NEARDC
Definition: envelope.h:29
#define VE_BANDS
Definition: envelope.h:28
const GLdouble * v
Definition: glext.h:2936
long _ve_envelope_search(vorbis_dsp_state *v)
Definition: envelope.c:217
float total
Definition: envelope.h:49
envelope_filter_state * filter
Definition: envelope.h:62
#define VE_AMP
Definition: envelope.h:26
mdct_lookup mdct
Definition: envelope.h:58
float * mdct_win
Definition: envelope.h:59
float minenergy
Definition: envelope.h:56
float * window
Definition: envelope.h:48
int _ve_envelope_mark(vorbis_dsp_state *v)
Definition: envelope.c:331
void _ve_envelope_clear(envelope_lookup *e)
Definition: envelope.c:76
void _ve_envelope_init(envelope_lookup *e, vorbis_info *vi)
Definition: envelope.c:32
void _ve_envelope_shift(envelope_lookup *e, long shift)
Definition: envelope.c:357