Recognizes if input is ogg or not.
[xiph.git] / postfish / subband.h
blobc4297a7c0f8a6b4c7f4a4713b9ee533a9f20db8c
1 /*
3 * postfish
4 *
5 * Copyright (C) 2002-2005 Monty and Xiph.Org
7 * Postfish is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
10 * any later version.
12 * Postfish is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Postfish; see the file COPYING. If not, write to the
19 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "postfish.h"
26 typedef struct {
28 int freq_bands;
29 float **ho_window;
31 } subband_window;
33 typedef struct {
34 time_linkage out;
36 float *fftwf_forward_out;
37 float *fftwf_backward_in;
38 float *fftwf_forward_in;
39 float *fftwf_backward_out;
40 fftwf_plan fftwf_forward;
41 fftwf_plan fftwf_backward;
43 int qblocksize;
44 float *window;
45 int bands;
46 float ***lap;
47 float **cache0;
48 float **cache1;
50 int *lap_activeC;
51 int *lap_active0;
52 int *lap_active1;
53 int *lap_activeP;
55 int *visibleC;
56 int *visible0;
57 int *visible1;
59 int *effect_activeC;
60 int *effect_active0;
61 int *effect_active1;
62 int *effect_activeP;
64 u_int32_t mutemaskC;
65 u_int32_t mutemask0;
66 u_int32_t mutemask1;
67 u_int32_t mutemaskP;
69 int lap_samples;
70 int fillstate; /* 0: uninitialized
71 1: partial prime
72 2: nominal
73 3: eof processed */
74 subband_window **wP;
75 subband_window **w0;
76 subband_window **w1;
77 subband_window **wC;
79 } subband_state;
83 extern int subband_load(subband_state *f,int bands, int qb,int ch);
84 extern int subband_load_freqs(subband_state *f,subband_window *w,
85 const float *freq_list,int bands);
87 extern time_linkage *subband_read(time_linkage *in, subband_state *f,
88 subband_window **w,int *visible, int *active,
89 void (*workfunc)(void *),void *arg);
91 extern int subband_reset(subband_state *f);