diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2003-03-03 17:13:26 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2003-03-03 17:13:26 +0000 |
commit | 6b9b85c165ae71e38f41d64e9bb1adf13cbb253f (patch) | |
tree | 4a2ce398e5b89dc79a01670ca970baa6df72654b | |
parent | b0368839ac6de47dee3e971c709676d9635865e9 (diff) | |
download | ffmpeg-6b9b85c165ae71e38f41d64e9bb1adf13cbb253f.tar.gz |
* minor optimalization
Originally committed as revision 1618 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/adpcm.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 0c4e722e02..8f6863cb01 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -427,18 +427,19 @@ static int adpcm_decode_frame(AVCodecContext *avctx, src++; /* if != 0 -> out-of-sync */ } - for(m=3; src < (buf + buf_size);) { - *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F); + for(m=4; src < (buf + buf_size);) { + *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] & 0x0F); if (st) *samples++ = adpcm_ima_expand_nibble(&c->status[1], src[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); - src++; - if (st && !m--) { - m=3; - src+=4; - } + if (!--m) { + m=4; + src+=4; + } + } + src++; } break; case CODEC_ID_ADPCM_MS: |