Lines Matching refs:lsps

159     int lsps;                     ///< number of LSPs per frame [10 or 16]  member
391 s->lsps = 16; in wmavoice_decode_init()
395 s->lsps = 10; in wmavoice_decode_init()
399 for (n = 0; n < s->lsps; n++) in wmavoice_decode_init()
400 s->prev_lsps[n] = M_PI * (n + 1.0) / (s->lsps + 1.0); in wmavoice_decode_init()
702 memcpy(&tilted_lpcs[1], lpcs, sizeof(lpcs[0]) * s->lsps); in wiener_denoise()
703 memset(&tilted_lpcs[s->lsps + 1], 0, in wiener_denoise()
704 sizeof(tilted_lpcs[0]) * (128 - s->lsps - 1)); in wiener_denoise()
705 ff_tilt_compensation(&tilt_mem, 0.7 * tilt_factor(lpcs, s->lsps), in wiener_denoise()
706 tilted_lpcs, s->lsps + 2); in wiener_denoise()
785 ff_celp_lp_zero_synthesis_filterf(zero_exc_pf, lpcs, synth, size, s->lsps); in postfilter()
793 synth_filter_in, size, s->lsps); in postfilter()
794 memcpy(&synth_pf[-s->lsps], &synth_pf[size - s->lsps], in postfilter()
795 sizeof(synth_pf[0]) * s->lsps); in postfilter()
827 static void dequant_lsps(double *lsps, int num, in dequant_lsps() argument
836 memset(lsps, 0, num * sizeof(*lsps)); in dequant_lsps()
842 lsps[m] += base + mul * t_off[m]; in dequant_lsps()
859 static void dequant_lsp10i(GetBitContext *gb, double *lsps) in dequant_lsp10i() argument
877 dequant_lsps(lsps, 10, v, vec_sizes, 4, wmavoice_dq_lsp10i, in dequant_lsp10i()
921 static void dequant_lsp16i(GetBitContext *gb, double *lsps) in dequant_lsp16i() argument
942 dequant_lsps( lsps, 5, v, vec_sizes, 2, in dequant_lsp16i()
944 dequant_lsps(&lsps[5], 5, &v[2], &vec_sizes[2], 2, in dequant_lsp16i()
946 dequant_lsps(&lsps[10], 6, &v[4], &vec_sizes[4], 1, in dequant_lsp16i()
1412 const double *lsps, const double *prev_lsps, in synth_block() argument
1429 for (n = 0; n < s->lsps; n++) // LSF -> LSP in synth_block()
1430 i_lsps[n] = cos(prev_lsps[n] + fac * (lsps[n] - prev_lsps[n])); in synth_block()
1431 ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1); in synth_block()
1434 ff_celp_lp_synthesis_filterf(synth, lpcs, excitation, size, s->lsps); in synth_block()
1454 const double *lsps, const double *prev_lsps, in synth_frame() argument
1570 lsps, prev_lsps, &frame_descs[bd_idx], in synth_frame()
1581 for (n = 0; n < s->lsps; n++) // LSF -> LSP in synth_frame()
1582 i_lsps[n] = cos(0.5 * (prev_lsps[n] + lsps[n])); in synth_frame()
1583 ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1); in synth_frame()
1588 for (n = 0; n < s->lsps; n++) // LSF -> LSP in synth_frame()
1589 i_lsps[n] = cos(lsps[n]); in synth_frame()
1590 ff_acelp_lspd2lpc(i_lsps, lpcs, s->lsps >> 1); in synth_frame()
1628 static void stabilize_lsps(double *lsps, int num) in stabilize_lsps() argument
1635 lsps[0] = FFMAX(lsps[0], 0.0015 * M_PI); in stabilize_lsps()
1637 lsps[n] = FFMAX(lsps[n], lsps[n - 1] + 0.0125 * M_PI); in stabilize_lsps()
1638 lsps[num - 1] = FFMIN(lsps[num - 1], 0.9985 * M_PI); in stabilize_lsps()
1643 if (lsps[n] < lsps[n - 1]) { in stabilize_lsps()
1645 double tmp = lsps[m]; in stabilize_lsps()
1647 if (lsps[l] <= tmp) break; in stabilize_lsps()
1648 lsps[l + 1] = lsps[l]; in stabilize_lsps()
1650 lsps[l + 1] = tmp; in stabilize_lsps()
1757 double lsps[MAX_FRAMES][MAX_LSPS]; in synth_superframe() local
1758 const double *mean_lsf = s->lsps == 16 ? in synth_superframe()
1765 s->lsps * sizeof(*synth)); in synth_superframe()
1803 for (n = 0; n < s->lsps; n++) in synth_superframe()
1806 if (s->lsps == 10) { in synth_superframe()
1807 dequant_lsp10r(gb, lsps[2], prev_lsps, a1, a2, s->lsp_q_mode); in synth_superframe()
1809 dequant_lsp16r(gb, lsps[2], prev_lsps, a1, a2, s->lsp_q_mode); in synth_superframe()
1811 for (n = 0; n < s->lsps; n++) { in synth_superframe()
1812 lsps[0][n] = mean_lsf[n] + (a1[n] - a2[n * 2]); in synth_superframe()
1813 lsps[1][n] = mean_lsf[n] + (a1[s->lsps + n] - a2[n * 2 + 1]); in synth_superframe()
1814 lsps[2][n] += mean_lsf[n]; in synth_superframe()
1817 stabilize_lsps(lsps[n], s->lsps); in synth_superframe()
1832 if (s->lsps == 10) { in synth_superframe()
1833 dequant_lsp10i(gb, lsps[n]); in synth_superframe()
1835 dequant_lsp16i(gb, lsps[n]); in synth_superframe()
1837 for (m = 0; m < s->lsps; m++) in synth_superframe()
1838 lsps[n][m] += mean_lsf[m]; in synth_superframe()
1839 stabilize_lsps(lsps[n], s->lsps); in synth_superframe()
1844 lsps[n], n == 0 ? s->prev_lsps : lsps[n - 1], in synth_superframe()
1846 &synth[s->lsps + n * MAX_FRAMESIZE]))) { in synth_superframe()
1863 memcpy(s->prev_lsps, lsps[2], in synth_superframe()
1864 s->lsps * sizeof(*s->prev_lsps)); in synth_superframe()
1866 s->lsps * sizeof(*synth)); in synth_superframe()
2044 for (n = 0; n < s->lsps; n++) in wmavoice_flush()
2045 s->prev_lsps[n] = M_PI * (n + 1.0) / (s->lsps + 1.0); in wmavoice_flush()
2054 memset(&s->synth_filter_out_buf[MAX_LSPS_ALIGN16 - s->lsps], 0, in wmavoice_flush()
2055 sizeof(*s->synth_filter_out_buf) * s->lsps); in wmavoice_flush()