Lines Matching refs:lsp
30 #include "lsp.h"
38 * @param lsp a vector of the cosine of the LSP values
40 * @param order the order of the LSP (and the size of the *lsp buffer). Must
46 static float eval_lpc_spectrum(const float *lsp, float cos_val, int order)
55 q *= lsp[j] - two_cos_w;
56 p *= lsp[j + 1] - two_cos_w;
58 q *= lsp[j + 2] - two_cos_w;
59 p *= lsp[j + 3] - two_cos_w;
251 static void rearrange_lsp(int order, float *lsp, float min_dist)
256 if (lsp[i] - lsp[i - 1] < min_dist) {
257 float avg = (lsp[i] + lsp[i - 1]) * 0.5;
259 lsp[i - 1] = avg - min_dist2;
260 lsp[i] = avg + min_dist2;
265 int lpc_hist_idx, float *lsp, float *hist)
286 lsp[j] = cb[lpc_idx1 * mtab->n_lsp + j] +
290 rearrange_lsp(mtab->n_lsp, lsp, 0.0001);
295 hist[i] = lsp[i];
296 lsp[i] = lsp[i] * tmp1 + tmp2;
299 rearrange_lsp(mtab->n_lsp, lsp, 0.0001);
300 rearrange_lsp(mtab->n_lsp, lsp, 0.000095);
301 ff_sort_nearly_sorted_floats(lsp, mtab->n_lsp);
304 static void dec_lpc_spectrum_inv(TwinVQContext *tctx, float *lsp,
311 lsp[i] = 2 * cos(lsp[i]);
315 eval_lpcenv_2parts(tctx, ftype, lsp, lpc, size, 8);
318 eval_lpcenv_2parts(tctx, ftype, lsp, lpc, size, 2);
321 eval_lpcenv(tctx, lsp, lpc);
444 float lsp[TWINVQ_LSP_COEFS_MAX];
461 bits->lpc_hist_idx[i], lsp, tctx->lsp_hist[i]);
463 dec_lpc_spectrum_inv(tctx, lsp, ftype, tctx->tmp_buf);