lsp.h
Go to the documentation of this file.
1 /*
2  * LSP computing 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_LSP_H
24 #define AVCODEC_LSP_H
25 
26 #include <stdint.h>
27 
40 void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, int lsfq_max, int lp_order);
41 
53 void ff_set_min_dist_lsf(float *lsf, double min_spacing, int size);
54 
63 void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order);
64 
68 void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order);
69 
76 void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order);
77 
81 void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order);
82 
91 void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd, const int16_t* lsp_prev, int lp_order);
92 
93 
94 #define MAX_LP_HALF_ORDER 10
95 #define MAX_LP_ORDER (2*MAX_LP_HALF_ORDER)
96 
109 void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order);
110 
116 void ff_sort_nearly_sorted_floats(float *vals, int len);
117 
128 void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order);
129 
130 #endif /* AVCODEC_LSP_H */