Merge infrastructure work; full books
[platform/upstream/libvorbis.git] / lib / envelope.h
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-2001             *
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.17 2001/12/12 09:45:25 xiphmont Exp $
15
16  ********************************************************************/
17
18 #ifndef _V_ENVELOPE_
19 #define _V_ENVELOPE_
20
21 #include "iir.h"
22 #include "smallft.h"
23
24 typedef struct {
25   int ch;
26   int winlength;
27   int searchstep;
28   float minenergy;
29
30   IIR_state *iir;
31   float    **filtered;
32
33   long storage;
34   long current;
35   long mark;
36   long prevmark;
37   long cursor;
38 } envelope_lookup;
39
40 extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi);
41 extern void _ve_envelope_clear(envelope_lookup *e);
42 extern long _ve_envelope_search(vorbis_dsp_state *v);
43 extern void _ve_envelope_shift(envelope_lookup *e,long shift);
44 extern int  _ve_envelope_mark(vorbis_dsp_state *v);
45
46
47 #endif
48