changeset 5535:75b2c31d3dde libavcodec

fix motion vectors for old version
author michael
date Mon, 13 Aug 2007 01:05:19 +0000
parents 1c8999a3f193
children 44e140e3cd6a
files 4xm.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/4xm.c	Mon Aug 13 00:56:26 2007 +0000
+++ b/4xm.c	Mon Aug 13 01:05:19 2007 +0000
@@ -248,7 +248,10 @@
     int i;
 
     for(i=0; i<256; i++){
-        f->mv[i] = mv[i][0] + mv[i][1]*f->current_picture.linesize[0]/2;
+        if(f->version)
+            f->mv[i] = mv[i][0]   + mv[i][1]  *f->current_picture.linesize[0]/2;
+        else
+            f->mv[i] = (i&15) - 8 + ((i>>4)-8)*f->current_picture.linesize[0]/2;
     }
 }