d9709edc5f1e08d85e742371a8e040b4cf0cf2a8
[platform/upstream/gst-plugins-good.git] / gst / monoscope / convolve.h
1 /* convolve.h: Header for convolutions.
2  *
3  *  Copyright (C) 1999 Ralph Loader <suckfish@ihug.co.nz>
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef CONVOLVE_H
21 #define CONVOLVE_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /* convolve_match takes two blocks, one twice the size of the other.  The
28  * sizes of these are CONVOLVE_BIG and CONVOLVE_SMALL respectively. */
29 #define CONVOLVE_DEPTH 8
30 #define CONVOLVE_SMALL (1 << CONVOLVE_DEPTH)
31 #define CONVOLVE_BIG (CONVOLVE_SMALL * 2)
32
33 /* Convolution stuff */
34 typedef struct _struct_convolve_state convolve_state;
35
36 convolve_state *convolve_init (void);
37 void convolve_close (convolve_state * state);
38
39 int convolve_match (const int * lastchoice,
40                     const short int * input,
41                     convolve_state * state);
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif