1 /* convolve.h: Header for convolutions.
3 * Copyright (C) 1999 Ralph Loader <suckfish@ihug.co.nz>
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.
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.
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.
28 /* convolve_match takes two blocks, one twice the size of the other. The
29 * sizes of these are CONVOLVE_BIG and CONVOLVE_SMALL respectively. */
30 #define CONVOLVE_DEPTH 8
31 #define CONVOLVE_SMALL (1 << CONVOLVE_DEPTH)
32 #define CONVOLVE_BIG (CONVOLVE_SMALL * 2)
34 /* Convolution stuff */
35 typedef struct _struct_convolve_state convolve_state;
37 convolve_state *convolve_init (void);
38 void convolve_close (convolve_state * state);
40 int convolve_match (const int *lastchoice,
41 const short int *input, convolve_state * state);