Originally committed as revision 20602 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -128,17 +128,7 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd · 127 unmodified lines | ||
| 128 | 128 | ff_acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1); |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | −/** | |
| 132 | − * Computes the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients | |
| 133 | − * needed for LSP to LPC conversion. | |
| 134 | − * We only need to calculate the 6 first elements of the polynomial. | |
| 135 | − * | |
| 136 | − * @param lsp line spectral pairs in cosine domain | |
| 137 | − * @param f [out] polynomial input/output as a vector | |
| 138 | − * | |
| 139 | − * TIA/EIA/IS-733 2.4.3.3.5-1/2 | |
| 140 | − */ | |
| 141 | −static void lsp2polyf(const double *lsp, double *f, int lp_half_order) | |
| 131 | +void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order) | |
| 142 | 132 | { |
| 143 | 133 | int i, j; |
| 144 | 134 | |
| @@ -162,8 +152,8 @@ void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order) · 17 unmodified lines | ||
| 162 | 152 | |
| 163 | 153 | assert(lp_half_order <= MAX_LP_HALF_ORDER); |
| 164 | 154 | |
| 165 | − lsp2polyf(lsp, pa, lp_half_order); | |
| 166 | − lsp2polyf(lsp + 1, qa, lp_half_order); | |
| 155 | + ff_lsp2polyf(lsp, pa, lp_half_order); | |
| 156 | + ff_lsp2polyf(lsp + 1, qa, lp_half_order); | |
| 167 | 157 | |
| 168 | 158 | while (lp_half_order--) { |
| 169 | 159 | double paf = pa[lp_half_order+1] + pa[lp_half_order]; |
| @@ -104,4 +104,16 @@ void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order); · 103 unmodified lines | ||
| 104 | 104 | */ |
| 105 | 105 | void ff_sort_nearly_sorted_floats(float *vals, int len); |
| 106 | 106 | |
| 107 | +/** | |
| 108 | + * Computes the Pa / (1 + z(-1)) or Qa / (1 - z(-1)) coefficients | |
| 109 | + * needed for LSP to LPC conversion. | |
| 110 | + * We only need to calculate the 6 first elements of the polynomial. | |
| 111 | + * | |
| 112 | + * @param lsp line spectral pairs in cosine domain | |
| 113 | + * @param f [out] polynomial input/output as a vector | |
| 114 | + * | |
| 115 | + * TIA/EIA/IS-733 2.4.3.3.5-1/2 | |
| 116 | + */ | |
| 117 | +void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order); | |
| 118 | + | |
| 107 | 119 | #endif /* AVCODEC_LSP_H */ |