Commit 5b3c9e1d authored by kabi's avatar kabi

* minor optimalization


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1618 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent bde7d23b
...@@ -427,18 +427,19 @@ static int adpcm_decode_frame(AVCodecContext *avctx, ...@@ -427,18 +427,19 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
src++; /* if != 0 -> out-of-sync */ src++; /* if != 0 -> out-of-sync */
} }
for(m=3; src < (buf + buf_size);) { for(m=4; src < (buf + buf_size);) {
*samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F); *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F);
if (st) if (st)
*samples++ = adpcm_ima_expand_nibble(&c->status[1], src[4] & 0x0F); *samples++ = adpcm_ima_expand_nibble(&c->status[1], src[4] & 0x0F);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], (src[0] >> 4) & 0x0F); *samples++ = adpcm_ima_expand_nibble(&c->status[0], (src[0] >> 4) & 0x0F);
if (st) if (st) {
*samples++ = adpcm_ima_expand_nibble(&c->status[1], (src[4] >> 4) & 0x0F); *samples++ = adpcm_ima_expand_nibble(&c->status[1], (src[4] >> 4) & 0x0F);
src++; if (!--m) {
if (st && !m--) { m=4;
m=3; src+=4;
src+=4; }
} }
src++;
} }
break; break;
case CODEC_ID_ADPCM_MS: case CODEC_ID_ADPCM_MS:
......
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