aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-06-29 11:02:33 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-06-29 11:02:33 +0000
commite8ba1cea3cfd8eb34c676aa1461dc21e47ab4493 (patch)
tree28d70c3f1432d242d84c7353f95ad0caa862b1d9
parentb028a8667d28d5de390ba68e37edc96e4cbc7154 (diff)
downloadffmpeg-e8ba1cea3cfd8eb34c676aa1461dc21e47ab4493.tar.gz
This should make P-frames decoding work on x86 (by avoiding get_bits(0))
Originally committed as revision 5542 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/vc1.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 8901f79fa3..5df818c59b 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -1341,14 +1341,18 @@ if(v->mv_mode != MV_PMODE_1MV && v->mv_mode != MV_PMODE_1MV_HPEL && v->mv_mode !
index1 = index%6; \
if (s->mspel && index1 == 5) val = 1; \
else val = 0; \
- val = get_bits(gb, size_table[index1] - val); \
+ if(size_table[index1] - val > 0) \
+ val = get_bits(gb, size_table[index1] - val); \
+ else val = 0; \
sign = 0 - (val&1); \
_dmv_x = (sign ^ ((val>>1) + offset_table[index1])) - sign; \
\
index1 = index/6; \
if (s->mspel && index1 == 5) val = 1; \
- else val = 0; \
- val = get_bits(gb, size_table[index1] - val); \
+ else val = 0; \
+ if(size_table[index1] - val > 0) \
+ val = get_bits(gb, size_table[index1] - val); \
+ else val = 0; \
sign = 0 - (val&1); \
_dmv_y = (sign ^ ((val>>1) + offset_table[index1])) - sign; \
}