Commit 2f2469f1 authored by vitor's avatar vitor

Simplify: use a for instead of unrolling by hand

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15213 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8600545f
......@@ -317,7 +317,7 @@ static int mace3_decode_frame(AVCodecContext *avctx,
{
short *samples = data;
MACEContext *ctx = avctx->priv_data;
int i, j;
int i, j, k;
for(i = 0; i < avctx->channels; i++) {
ctx->index = ctx->lev = 0;
......@@ -325,15 +325,12 @@ static int mace3_decode_frame(AVCodecContext *avctx,
ctx->outPtr = samples + i;
for (j=0; j < buf_size / 2 / avctx->channels; j++) {
uint8_t pkt = buf[i*2 + j*2*avctx->channels];
chomp3(ctx, pkt & 7, MACEtab1, MACEtab2, avctx->channels);
chomp3(ctx,(pkt >> 3) & 3, MACEtab3, MACEtab4, avctx->channels);
chomp3(ctx, pkt >> 5 , MACEtab1, MACEtab2, avctx->channels);
pkt = buf[i*2 + j*2*avctx->channels + 1];
for (k=0; k < 2; k++) {
uint8_t pkt = buf[i*2 + j*2*avctx->channels + k];
chomp3(ctx, pkt & 7, MACEtab1, MACEtab2, avctx->channels);
chomp3(ctx,(pkt >> 3) & 3, MACEtab3, MACEtab4, avctx->channels);
chomp3(ctx, pkt >> 5 , MACEtab1, MACEtab2, avctx->channels);
}
}
}
......
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