diff --git a/libavcodec/h263.c b/libavcodec/h263.c index bc21e0cd86..64b2e18bda 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -2654,8 +2654,7 @@ static inline int get_amv(MpegEncContext *s, int n){ v+= dx; } } - sum /= 256; - sum= RSHIFT(sum<quarter_sample, a); + sum= RSHIFT(sum, a+8-s->quarter_sample); } if (sum < -len) sum= -len;