comparison celp_filters.c @ 10690:63451af5f8f9 libavcodec

Cosmetics: make celp_filters.* formatting more consistent with the rest of FFmpeg
author vitor
date Wed, 16 Dec 2009 17:15:57 +0000
parents d124d9b688d0
children 51d5b29fc4fc
comparison
equal deleted inserted replaced
10689:d124d9b688d0 10690:63451af5f8f9
23 #include <inttypes.h> 23 #include <inttypes.h>
24 24
25 #include "avcodec.h" 25 #include "avcodec.h"
26 #include "celp_filters.h" 26 #include "celp_filters.h"
27 27
28 void ff_celp_convolve_circ(int16_t* fc_out, 28 void ff_celp_convolve_circ(int16_t* fc_out, const int16_t* fc_in,
29 const int16_t* fc_in, 29 const int16_t* filter, int len)
30 const int16_t* filter,
31 int len)
32 { 30 {
33 int i, k; 31 int i, k;
34 32
35 memset(fc_out, 0, len * sizeof(int16_t)); 33 memset(fc_out, 0, len * sizeof(int16_t));
36 34
55 out[k] = in[k] + fac * lagged[n + k - lag]; 53 out[k] = in[k] + fac * lagged[n + k - lag];
56 for (; k < n; k++) 54 for (; k < n; k++)
57 out[k] = in[k] + fac * lagged[ k - lag]; 55 out[k] = in[k] + fac * lagged[ k - lag];
58 } 56 }
59 57
60 int ff_celp_lp_synthesis_filter(int16_t *out, 58 int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,
61 const int16_t* filter_coeffs, 59 const int16_t *in, int buffer_length,
62 const int16_t* in, 60 int filter_length, int stop_on_overflow,
63 int buffer_length,
64 int filter_length,
65 int stop_on_overflow,
66 int rounder) 61 int rounder)
67 { 62 {
68 int i,n; 63 int i,n;
69 64
70 for (n = 0; n < buffer_length; n++) { 65 for (n = 0; n < buffer_length; n++) {
83 } 78 }
84 79
85 return 0; 80 return 0;
86 } 81 }
87 82
88 void ff_celp_lp_synthesis_filterf(float *out, 83 void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs,
89 const float* filter_coeffs, 84 const float* in, int buffer_length,
90 const float* in,
91 int buffer_length,
92 int filter_length) 85 int filter_length)
93 { 86 {
94 int i,n; 87 int i,n;
95 88
96 float out0, out1, out2, out3; 89 float out0, out1, out2, out3;
193 for (i = 1; i <= filter_length; i++) 186 for (i = 1; i <= filter_length; i++)
194 out[n] -= filter_coeffs[i-1] * out[n-i]; 187 out[n] -= filter_coeffs[i-1] * out[n-i];
195 } 188 }
196 } 189 }
197 190
198 void ff_celp_lp_zero_synthesis_filterf(float *out, 191 void ff_celp_lp_zero_synthesis_filterf(float *out, const float *filter_coeffs,
199 const float* filter_coeffs, 192 const float *in, int buffer_length,
200 const float* in,
201 int buffer_length,
202 int filter_length) 193 int filter_length)
203 { 194 {
204 int i,n; 195 int i,n;
205 196
206 for (n = 0; n < buffer_length; n++) { 197 for (n = 0; n < buffer_length; n++) {