Commit fdd5319e authored by rbultje's avatar rbultje

Simplify interleaving code.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22719 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ed191512
...@@ -1346,14 +1346,12 @@ static int decode_frame(WMAProDecodeCtx *s) ...@@ -1346,14 +1346,12 @@ static int decode_frame(WMAProDecodeCtx *s)
/** interleave samples and write them to the output buffer */ /** interleave samples and write them to the output buffer */
for (i = 0; i < s->num_channels; i++) { for (i = 0; i < s->num_channels; i++) {
float* ptr; float* ptr = s->samples + i;
int incr = s->num_channels; int incr = s->num_channels;
float* iptr = s->channel[i].out; float* iptr = s->channel[i].out;
int x; float* iend = iptr + s->samples_per_frame;
ptr = s->samples + i;
for (x = 0; x < s->samples_per_frame; x++) { while (iptr < iend) {
*ptr = av_clipf(*iptr++, -1.0, 32767.0 / 32768.0); *ptr = av_clipf(*iptr++, -1.0, 32767.0 / 32768.0);
ptr += incr; ptr += incr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment