aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-03-31 18:04:36 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-03-31 18:04:36 +0000
commit002a7414b5852418f9a66245fc414c0416c4b4c1 (patch)
tree3157f3fea87bcf4a0cc2a16b5591d6d01ac77a17 /libavcodec/mjpeg.c
parent78d2d4e1111f1284e12da9ae4daa0b7c14733055 (diff)
downloadffmpeg-002a7414b5852418f9a66245fc414c0416c4b4c1.tar.gz
simplify loop a little
Originally committed as revision 5255 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mjpeg.c')
-rw-r--r--libavcodec/mjpeg.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c
index 2fc870a61a..8f24931e83 100644
--- a/libavcodec/mjpeg.c
+++ b/libavcodec/mjpeg.c
@@ -1281,16 +1281,14 @@ static int decode_block(MJpegDecodeContext *s, DCTELEM *block,
/* EOB */
if (code == 0x10)
break;
- if (code == 0x100) {
- i += 16;
- } else {
- i += ((unsigned)code) >> 4;
+ i += ((unsigned)code) >> 4;
+ if(code != 0x100){
code &= 0xf;
if(code > MIN_CACHE_BITS - 16){
UPDATE_CACHE(re, &s->gb)
}
{
- int cache=GET_CACHE(re,gb);
+ int cache=GET_CACHE(re,&s->gb);
int sign=(~cache)>>31;
level = (NEG_USR32(sign ^ cache,code) ^ sign) - sign;
}