OLD | NEW |
1 /** | 1 /** |
2 * LPC utility code | 2 * LPC utility code |
3 * Copyright (c) 2006 Justin Ruggles <justin.ruggles@gmail.com> | 3 * Copyright (c) 2006 Justin Ruggles <justin.ruggles@gmail.com> |
4 * | 4 * |
5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
6 * | 6 * |
7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 /** | 39 /** |
40 * Calculate LPC coefficients for multiple orders | 40 * Calculate LPC coefficients for multiple orders |
41 */ | 41 */ |
42 int ff_lpc_calc_coefs(DSPContext *s, | 42 int ff_lpc_calc_coefs(DSPContext *s, |
43 const int32_t *samples, int blocksize, int min_order, | 43 const int32_t *samples, int blocksize, int min_order, |
44 int max_order, int precision, | 44 int max_order, int precision, |
45 int32_t coefs[][MAX_LPC_ORDER], int *shift, int use_lpc, | 45 int32_t coefs[][MAX_LPC_ORDER], int *shift, int use_lpc, |
46 int omethod, int max_shift, int zero_shift); | 46 int omethod, int max_shift, int zero_shift); |
47 | 47 |
| 48 void ff_lpc_compute_autocorr(const int32_t *data, int len, int lag, |
| 49 double *autoc); |
| 50 |
48 #ifdef LPC_USE_DOUBLE | 51 #ifdef LPC_USE_DOUBLE |
49 #define LPC_TYPE double | 52 #define LPC_TYPE double |
50 #else | 53 #else |
51 #define LPC_TYPE float | 54 #define LPC_TYPE float |
52 #endif | 55 #endif |
53 | 56 |
54 /** | 57 /** |
55 * Levinson-Durbin recursion. | 58 * Levinson-Durbin recursion. |
56 * Produces LPC coefficients from autocorrelation data. | 59 * Produces LPC coefficients from autocorrelation data. |
57 */ | 60 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 return -1; | 96 return -1; |
94 | 97 |
95 lpc_last = lpc; | 98 lpc_last = lpc; |
96 lpc += lpc_stride; | 99 lpc += lpc_stride; |
97 } | 100 } |
98 | 101 |
99 return 0; | 102 return 0; |
100 } | 103 } |
101 | 104 |
102 #endif /* AVCODEC_LPC_H */ | 105 #endif /* AVCODEC_LPC_H */ |
OLD | NEW |