average motion vector rounding like the reference says and not what the standard...
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2003 12:16:36 +0000 (12:16 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 12 Jan 2003 12:16:36 +0000 (12:16 +0000)
Originally committed as revision 1453 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h263.c

index bc21e0cd86e753c770f8ce1cbd402384bcd06380..64b2e18bdafc76ed74ff18c9277f9f34253665d7 100644 (file)
@@ -2654,8 +2654,7 @@ static inline int get_amv(MpegEncContext *s, int n){
                 v+= dx;
             }
         }
-        sum /= 256;
-        sum= RSHIFT(sum<<s->quarter_sample, a);
+        sum= RSHIFT(sum, a+8-s->quarter_sample);
     }
 
     if      (sum < -len) sum= -len;