History

Make lsp2polyf() function non-static for upcoming usage in SIPR

Originally committed as revision 20602 to svn://svn.ffmpeg.org/ffmpeg/trunk

Vitor Sessak committed 16 years ago

Commit 691a4231 parent d2b34ef2 files · +15 −13Browse files

Unified · Split

2 files
  1. libavcodec/lsp.c +3 −13
  2. libavcodec/lsp.h +12 −0
libavcodec/lsp.c+3−13
@@ -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 ff_acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1);128 ff_acelp_lsp2lpc(lp_2nd, lsp_2nd, lp_order >> 1);
129}129}
130 130
131/**131void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order)
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 */
141static void lsp2polyf(const double *lsp, double *f, int lp_half_order)
142{132{
143 int i, j;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 assert(lp_half_order <= MAX_LP_HALF_ORDER);153 assert(lp_half_order <= MAX_LP_HALF_ORDER);
164 154
165 lsp2polyf(lsp, pa, lp_half_order);155 ff_lsp2polyf(lsp, pa, lp_half_order);
166 lsp2polyf(lsp + 1, qa, lp_half_order);156 ff_lsp2polyf(lsp + 1, qa, lp_half_order);
167 157
168 while (lp_half_order--) {158 while (lp_half_order--) {
169 double paf = pa[lp_half_order+1] + pa[lp_half_order];159 double paf = pa[lp_half_order+1] + pa[lp_half_order];
libavcodec/lsp.h+12−0
@@ -104,4 +104,16 @@ void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order); · 103 unmodified lines
104 */104 */
105void ff_sort_nearly_sorted_floats(float *vals, int len);105void 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 */
117void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order);
118
107#endif /* AVCODEC_LSP_H */119#endif /* AVCODEC_LSP_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t