diff msmpeg4.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 07a484280a82
children 4225c131a2eb
line wrap: on
line diff
--- a/msmpeg4.c	Wed Apr 14 13:13:31 2004 +0000
+++ b/msmpeg4.c	Fri Apr 16 01:01:45 2004 +0000
@@ -449,7 +449,7 @@
     int xy, wrap, pred, a, b, c;
 
     xy = s->block_index[n];
-    wrap = s->block_wrap[0];
+    wrap = s->b8_stride;
 
     /* B C
      * A X 
@@ -567,7 +567,7 @@
 
             s->misc_bits += get_bits_diff(s);
 
-            h263_pred_motion(s, 0, &pred_x, &pred_y);
+            h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
             msmpeg4v2_encode_motion(s, motion_x - pred_x);
             msmpeg4v2_encode_motion(s, motion_y - pred_y);
         }else{
@@ -578,7 +578,7 @@
             s->misc_bits += get_bits_diff(s);
 
             /* motion vector */
-            h263_pred_motion(s, 0, &pred_x, &pred_y);
+            h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
             msmpeg4_encode_motion(s, motion_x - pred_x, 
                                   motion_y - pred_y);
         }
@@ -1549,7 +1549,7 @@
         cbp|= cbpy<<2;
         if(s->msmpeg4_version==1 || (cbp&3) != 3) cbp^= 0x3C;
         
-        h263_pred_motion(s, 0, &mx, &my);
+        h263_pred_motion(s, 0, 0, &mx, &my);
         mx= msmpeg4v2_decode_motion(s, mx, 1);
         my= msmpeg4v2_decode_motion(s, my, 1);
         
@@ -1637,7 +1637,7 @@
             s->rl_chroma_table_index = s->rl_table_index;
         }
         set_stat(ST_MV);
-        h263_pred_motion(s, 0, &mx, &my);
+        h263_pred_motion(s, 0, 0, &mx, &my);
         if (msmpeg4_decode_motion(s, &mx, &my) < 0)
             return -1;
         s->mv_dir = MV_DIR_FORWARD;