summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorBERO <bero@geocities.co.jp>2003-05-14 00:32:22 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-05-14 00:32:22 +0000
commitd8e00c099731b8499a8c377469ac5796f5bd186c (patch)
tree711680cabebcfad66236563377db4e1ee77545b6 /libavcodec/mpeg12.c
parent7062fad6e9e5d506f2cdaa31c75c404ccd1315ab (diff)
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
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 3bbc843429..32d3057831 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -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;
}