[FFmpeg-devel] [PATCH] simplify ff_set_fixed_vector()
Ronald S. Bultje
rsbultje
Wed Jan 27 17:46:54 CET 2010
Hi,
$subj (4 lines-of-code less).
Ronald
-------------- next part --------------
Index: libavcodec/acelp_vectors.c
===================================================================
--- libavcodec/acelp_vectors.c (revision 21350)
+++ libavcodec/acelp_vectors.c (working copy)
@@ -245,14 +245,12 @@
for (i=0; i < in->n; i++) {
int x = in->x[i];
float y = in->y[i] * scale;
- out[x] += y;
- x += in->pitch_lag;
- while (x < size) {
+ do {
+ out[x] += y;
y *= in->pitch_fac;
- out[x] += y;
x += in->pitch_lag;
- }
+ } while (x < size);
}
}
@@ -262,12 +260,10 @@
for (i=0; i < in->n; i++) {
int x = in->x[i];
- out[x] = 0.0;
- x += in->pitch_lag;
- while (x < size) {
+ do {
out[x] = 0.0;
x += in->pitch_lag;
- }
+ } while (x < size);
}
}
More information about the ffmpeg-devel
mailing list