diff mpeg12.c @ 1938:e2501e6e7ff7 libavcodec

unify table indexing (motion_val,dc_val,ac_val,coded_block changed) minor +-1 bugfix
author michael
date Fri, 16 Apr 2004 01:01:45 +0000
parents 284fb24da44d
children f9212b59a802
line wrap: on
line diff
--- a/mpeg12.c	Wed Apr 14 13:13:31 2004 +0000
+++ b/mpeg12.c	Fri Apr 16 01:01:45 2004 +0000
@@ -2324,8 +2324,8 @@
             return -1;
 
         if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs
-            const int wrap = field_pic ? 2*s->block_wrap[0] : s->block_wrap[0];
-            int xy = s->mb_x*2 + 1 + (s->mb_y*2 +1)*wrap;
+            const int wrap = field_pic ? 2*s->b8_stride : s->b8_stride;
+            int xy = s->mb_x*2 + s->mb_y*2*wrap;
             int motion_x, motion_y, dir, i;
             if(field_pic && !s->first_field)
                 xy += wrap/2;