1f214e99115f529ce31012198a0349395be13902
[platform/upstream/libvorbis.git] / lib / envelope.h
1 /********************************************************************
2  *                                                                  *
3  * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE.  *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5  * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
6  * PLEASE READ THESE TERMS DISTRIBUTING.                            *
7  *                                                                  *
8  * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000             *
9  * by Monty <monty@xiph.org> and The XIPHOPHORUS Company            *
10  * http://www.xiph.org/                                             *
11  *                                                                  *
12  ********************************************************************
13
14  function: PCM data envelope analysis and manipulation
15  last mod: $Id: envelope.h,v 1.10 2000/10/12 03:12:52 xiphmont Exp $
16
17  ********************************************************************/
18
19 #ifndef _V_ENVELOPE_
20 #define _V_ENVELOPE_
21
22 #include "iir.h"
23 #include "smallft.h"
24
25 #define EORDER 16
26
27 typedef struct {
28   int ch;
29   int winlength;
30   int searchstep;
31   float minenergy;
32
33   IIR_state *iir;
34   float    **filtered;
35   long storage;
36   long current;
37
38   drft_lookup drft;
39   float *window;
40 } envelope_lookup;
41
42 extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi);
43 extern void _ve_envelope_clear(envelope_lookup *e);
44 extern long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint);
45 extern void _ve_envelope_shift(envelope_lookup *e,long shift);
46
47
48 #endif
49