changeset 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 916df4ea4e64
children 5f712d734793
files acelp_vectors.c
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/acelp_vectors.c	Thu Jan 28 13:04:25 2010 +0000
+++ b/acelp_vectors.c	Thu Jan 28 14:29:53 2010 +0000
@@ -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);
     }
 }