From 2f955ea41b804c0804f71d27a0bba13e59988726 Mon Sep 17 00:00:00 2001 From: Sebastian Vater Date: Thu, 13 May 2010 13:18:25 +0000 Subject: Move a while(..){..} -> do{..}while(..), slightly faster. Patch by Sebastian Vater . Originally committed as revision 23110 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/iff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/iff.c') diff --git a/libavcodec/iff.c b/libavcodec/iff.c index b77d3dc41e..2b3648bc8a 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -173,11 +173,11 @@ static av_cold int decode_init(AVCodecContext *avctx) static void decodeplane8(uint8_t *dst, const uint8_t *buf, int buf_size, int plane) { const uint64_t *lut = plane8_lut[plane]; - while (buf_size--) { + do { uint64_t v = AV_RN64A(dst) | lut[*buf++]; AV_WN64A(dst, v); dst += 8; - } + } while (--buf_size); } /** -- cgit v1.2.3