acelp_filters.h
Go to the documentation of this file.
1 /*
2  * various filters for ACELP-based codecs
3  *
4  * Copyright (c) 2008 Vladimir Voroshilov
5  *
6  * This file is part of Libav.
7  *
8  * Libav is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * Libav is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with Libav; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_ACELP_FILTERS_H
24 #define AVCODEC_ACELP_FILTERS_H
25 
26 #include <stdint.h>
27 
37 extern const int16_t ff_acelp_interp_filter[61];
38 
54 void ff_acelp_interpolate(int16_t* out, const int16_t* in,
55  const int16_t* filter_coeffs, int precision,
56  int frac_pos, int filter_length, int length);
57 
61 void ff_acelp_interpolatef(float *out, const float *in,
62  const float *filter_coeffs, int precision,
63  int frac_pos, int filter_length, int length);
64 
65 
89 void ff_acelp_high_pass_filter(int16_t* out, int hpf_f[2],
90  const int16_t* in, int length);
91 
103 void ff_acelp_apply_order_2_transfer_function(float *out, const float *in,
104  const float zero_coeffs[2],
105  const float pole_coeffs[2],
106  float gain,
107  float mem[2], int n);
108 
117 void ff_tilt_compensation(float *mem, float tilt, float *samples, int size);
118 
119 
120 #endif /* AVCODEC_ACELP_FILTERS_H */