Mercurial > libavcodec.hg
comparison acelp_vectors.c @ 11044:3f66d1d80e03 libavcodec
Simplify. See "[PATCH] simplify ff_set_fixed_vector()" thread on mailinglist.
author | rbultje |
---|---|
date | Thu, 28 Jan 2010 14:29:53 +0000 |
parents | 608d19b30fa3 |
children | 00fcecde822b |
comparison
equal
deleted
inserted
replaced
11043:916df4ea4e64 | 11044:3f66d1d80e03 |
---|---|
243 int i; | 243 int i; |
244 | 244 |
245 for (i=0; i < in->n; i++) { | 245 for (i=0; i < in->n; i++) { |
246 int x = in->x[i]; | 246 int x = in->x[i]; |
247 float y = in->y[i] * scale; | 247 float y = in->y[i] * scale; |
248 out[x] += y; | 248 |
249 | 249 do { |
250 x += in->pitch_lag; | 250 out[x] += y; |
251 while (x < size) { | |
252 y *= in->pitch_fac; | 251 y *= in->pitch_fac; |
253 out[x] += y; | |
254 x += in->pitch_lag; | 252 x += in->pitch_lag; |
255 } | 253 } while (x < size); |
256 } | 254 } |
257 } | 255 } |
258 | 256 |
259 void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size) | 257 void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size) |
260 { | 258 { |
261 int i; | 259 int i; |
262 | 260 |
263 for (i=0; i < in->n; i++) { | 261 for (i=0; i < in->n; i++) { |
264 int x = in->x[i]; | 262 int x = in->x[i]; |
265 out[x] = 0.0; | 263 |
266 | 264 do { |
267 x += in->pitch_lag; | |
268 while (x < size) { | |
269 out[x] = 0.0; | 265 out[x] = 0.0; |
270 x += in->pitch_lag; | 266 x += in->pitch_lag; |
271 } | 267 } while (x < size); |
272 } | 268 } |
273 } | 269 } |