mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Cosmetics: s/LPC_type/LPC_TYPE/
Originally committed as revision 15202 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9990e4269c
commit
82ab49dc41
@ -46,22 +46,22 @@ int ff_lpc_calc_coefs(DSPContext *s,
|
|||||||
int omethod, int max_shift, int zero_shift);
|
int omethod, int max_shift, int zero_shift);
|
||||||
|
|
||||||
#ifdef LPC_USE_DOUBLE
|
#ifdef LPC_USE_DOUBLE
|
||||||
#define LPC_type double
|
#define LPC_TYPE double
|
||||||
#else
|
#else
|
||||||
#define LPC_type float
|
#define LPC_TYPE float
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Levinson-Durbin recursion.
|
* Levinson-Durbin recursion.
|
||||||
* Produces LPC coefficients from autocorrelation data.
|
* Produces LPC coefficients from autocorrelation data.
|
||||||
*/
|
*/
|
||||||
static inline int compute_lpc_coefs(const LPC_type *autoc, int max_order,
|
static inline int compute_lpc_coefs(const LPC_TYPE *autoc, int max_order,
|
||||||
LPC_type *lpc, int lpc_stride, int fail,
|
LPC_TYPE *lpc, int lpc_stride, int fail,
|
||||||
int normalize)
|
int normalize)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
LPC_type err;
|
LPC_TYPE err;
|
||||||
LPC_type *lpc_last = lpc;
|
LPC_TYPE *lpc_last = lpc;
|
||||||
|
|
||||||
if (normalize)
|
if (normalize)
|
||||||
err = *autoc++;
|
err = *autoc++;
|
||||||
@ -70,7 +70,7 @@ static inline int compute_lpc_coefs(const LPC_type *autoc, int max_order,
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for(i=0; i<max_order; i++) {
|
for(i=0; i<max_order; i++) {
|
||||||
LPC_type r = -autoc[i];
|
LPC_TYPE r = -autoc[i];
|
||||||
|
|
||||||
if (normalize) {
|
if (normalize) {
|
||||||
for(j=0; j<i; j++)
|
for(j=0; j<i; j++)
|
||||||
@ -83,8 +83,8 @@ static inline int compute_lpc_coefs(const LPC_type *autoc, int max_order,
|
|||||||
lpc[i] = r;
|
lpc[i] = r;
|
||||||
|
|
||||||
for(j=0; j < (i+1)>>1; j++) {
|
for(j=0; j < (i+1)>>1; j++) {
|
||||||
LPC_type f = lpc_last[ j];
|
LPC_TYPE f = lpc_last[ j];
|
||||||
LPC_type b = lpc_last[i-1-j];
|
LPC_TYPE b = lpc_last[i-1-j];
|
||||||
lpc[ j] = f + r * b;
|
lpc[ j] = f + r * b;
|
||||||
lpc[i-1-j] = b + r * f;
|
lpc[i-1-j] = b + r * f;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user