bitstream reader optimize patch by (BERO <bero at geocities dot co dot jp>)

Originally committed as revision 1871 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
BERO
2003-05-14 00:32:22 +00:00
committed by Michael Niedermayer
parent 7062fad6e9
commit d8e00c0997
4 changed files with 72 additions and 19 deletions

View File

@@ -1223,9 +1223,7 @@ static inline int decode_dc(MpegEncContext *s, int component)
if (code == 0) {
diff = 0;
} else {
diff = get_bits(&s->gb, code);
if ((diff & (1 << (code - 1))) == 0)
diff = (-1 << code) | (diff + 1);
diff = get_xbits(&s->gb, code);
}
return diff;
}