Browse Source

Simplify. See "[PATCH] simplify ff_set_fixed_vector()" thread on mailinglist.

Originally committed as revision 21510 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Ronald S. Bultje 15 years ago
parent
commit
52ed8d0efe
1 changed files with 5 additions and 9 deletions
  1. +5
    -9
      libavcodec/acelp_vectors.c

+ 5
- 9
libavcodec/acelp_vectors.c View File

@@ -245,14 +245,12 @@ void ff_set_fixed_vector(float *out, const AMRFixed *in, float scale, int size)
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) {
y *= in->pitch_fac;
do {
out[x] += y;
y *= in->pitch_fac;
x += in->pitch_lag;
}
} while (x < size);
}
}

@@ -262,12 +260,10 @@ void ff_clear_fixed_vector(float *out, const AMRFixed *in, int size)

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);
}
}

Loading…
Cancel
Save