| OLD | NEW |
| 1 /* | 1 /* |
| 2 * LSP computing for ACELP-based codecs | 2 * LSP computing for ACELP-based codecs |
| 3 * | 3 * |
| 4 * Copyright (c) 2008 Vladimir Voroshilov | 4 * Copyright (c) 2008 Vladimir Voroshilov |
| 5 * | 5 * |
| 6 * This file is part of FFmpeg. | 6 * This file is part of FFmpeg. |
| 7 * | 7 * |
| 8 * FFmpeg is free software; you can redistribute it and/or | 8 * FFmpeg is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 * \brief Convert LSF to LSP | 56 * \brief Convert LSF to LSP |
| 57 * \param[out] lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) | 57 * \param[out] lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) |
| 58 * \param lsf normalized LSF coefficients (0 <= (2.13) < 0x2000 * PI) | 58 * \param lsf normalized LSF coefficients (0 <= (2.13) < 0x2000 * PI) |
| 59 * \param lp_order LP filter order | 59 * \param lp_order LP filter order |
| 60 * | 60 * |
| 61 * \remark It is safe to pass the same array into the lsf and lsp parameters. | 61 * \remark It is safe to pass the same array into the lsf and lsp parameters. |
| 62 */ | 62 */ |
| 63 void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order); | 63 void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order); |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 * Floating point version of ff_acelp_lsf2lsp() |
| 67 */ |
| 68 void ff_acelp_lsf2lspd(double *lsp, const float *lsf, int lp_order); |
| 69 |
| 70 /** |
| 66 * \brief LSP to LP conversion (3.2.6 of G.729) | 71 * \brief LSP to LP conversion (3.2.6 of G.729) |
| 67 * \param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) | 72 * \param[out] lp decoded LP coefficients (-0x8000 <= (3.12) < 0x8000) |
| 68 * \param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) | 73 * \param lsp LSP coefficients (-0x8000 <= (0.15) < 0x8000) |
| 69 * \param lp_half_order LP filter order, divided by 2 | 74 * \param lp_half_order LP filter order, divided by 2 |
| 70 */ | 75 */ |
| 71 void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order); | 76 void ff_acelp_lsp2lpc(int16_t* lp, const int16_t* lsp, int lp_half_order); |
| 72 | 77 |
| 73 /** | 78 /** |
| 79 * LSP to LP conversion (5.2.4 of AMR-WB) |
| 80 */ |
| 81 void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order); |
| 82 |
| 83 /** |
| 74 * \brief Interpolate LSP for the first subframe and convert LSP -> LP for both
subframes (3.2.5 and 3.2.6 of G.729) | 84 * \brief Interpolate LSP for the first subframe and convert LSP -> LP for both
subframes (3.2.5 and 3.2.6 of G.729) |
| 75 * \param[out] lp_1st decoded LP coefficients for first subframe (-0x8000 <= (3
.12) < 0x8000) | 85 * \param[out] lp_1st decoded LP coefficients for first subframe (-0x8000 <= (3
.12) < 0x8000) |
| 76 * \param[out] lp_2nd decoded LP coefficients for second subframe (-0x8000 <= (3
.12) < 0x8000) | 86 * \param[out] lp_2nd decoded LP coefficients for second subframe (-0x8000 <= (3
.12) < 0x8000) |
| 77 * \param lsp_2nd LSP coefficients of the second subframe (-0x8000 <= (0.15) < 0
x8000) | 87 * \param lsp_2nd LSP coefficients of the second subframe (-0x8000 <= (0.15) < 0
x8000) |
| 78 * \param lsp_prev LSP coefficients from the second subframe of the previous fra
me (-0x8000 <= (0.15) < 0x8000) | 88 * \param lsp_prev LSP coefficients from the second subframe of the previous fra
me (-0x8000 <= (0.15) < 0x8000) |
| 79 * \param lp_order LP filter order | 89 * \param lp_order LP filter order |
| 80 */ | 90 */ |
| 81 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); | 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); |
| 82 | 92 |
| 83 | 93 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 111 * We only need to calculate the 6 first elements of the polynomial. | 121 * We only need to calculate the 6 first elements of the polynomial. |
| 112 * | 122 * |
| 113 * @param lsp line spectral pairs in cosine domain | 123 * @param lsp line spectral pairs in cosine domain |
| 114 * @param[out] f polynomial input/output as a vector | 124 * @param[out] f polynomial input/output as a vector |
| 115 * | 125 * |
| 116 * TIA/EIA/IS-733 2.4.3.3.5-1/2 | 126 * TIA/EIA/IS-733 2.4.3.3.5-1/2 |
| 117 */ | 127 */ |
| 118 void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order); | 128 void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order); |
| 119 | 129 |
| 120 #endif /* AVCODEC_LSP_H */ | 130 #endif /* AVCODEC_LSP_H */ |
| OLD | NEW |