Revision 8955a9d7 libavcodec/acelp_filters.c
libavcodec/acelp_filters.c  

114  114 
} 
115  115 
} 
116  116  
117 
void ff_acelp_apply_order_2_transfer_function(float *buf,


117 
void ff_acelp_apply_order_2_transfer_function(float *out, const float *in,


118  118 
const float zero_coeffs[2], 
119  119 
const float pole_coeffs[2], 
120  120 
float gain, float mem[2], int n) 
...  ...  
123  123 
float tmp; 
124  124  
125  125 
for (i = 0; i < n; i++) { 
126 
tmp = gain * buf[i]  pole_coeffs[0] * mem[0]  pole_coeffs[1] * mem[1];


127 
buf[i] = tmp + zero_coeffs[0] * mem[0] + zero_coeffs[1] * mem[1];


126 
tmp = gain * in[i]  pole_coeffs[0] * mem[0]  pole_coeffs[1] * mem[1];


127 
out[i] = tmp + zero_coeffs[0] * mem[0] + zero_coeffs[1] * mem[1];


128  128  
129  129 
mem[1] = mem[0]; 
130  130 
mem[0] = tmp; 
Also available in: Unified diff