Browse Source

Simplify interleaving code.

Originally committed as revision 22719 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Ronald S. Bultje 16 years ago
parent
commit
8ff5d1f319
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      libavcodec/wmaprodec.c

+ 3
- 5
libavcodec/wmaprodec.c View File

@@ -1346,14 +1346,12 @@ static int decode_frame(WMAProDecodeCtx *s)

/** interleave samples and write them to the output buffer */
for (i = 0; i < s->num_channels; i++) {
float* ptr;
float* ptr = s->samples + i;
int incr = s->num_channels;
float* iptr = s->channel[i].out;
int x;

ptr = s->samples + i;
float* iend = iptr + s->samples_per_frame;

for (x = 0; x < s->samples_per_frame; x++) {
while (iptr < iend) {
*ptr = av_clipf(*iptr++, -1.0, 32767.0 / 32768.0);
ptr += incr;
}


Loading…
Cancel
Save