diff motion_est_template.c @ 1177:fea03d2c4946 libavcodec

simplified adressing of most mb based arrays (mb_x + mb_y*s->mb_stride) now instead of mb_x + mb_y*mb_width and 1+mb_x + (1+mb_y)*(mb_width+2) and ... mixture more direct use of the new mb_type stuff instead of codec specific stuff runtime mb_type debug output h264/h263 variants/mpeg1/2/4 error concealment /resilience for mpeg1/2 various minor optimizations
author michaelni
date Thu, 10 Apr 2003 13:18:38 +0000
parents 8c15d82c1893
children ec946cb74397
line wrap: on
line diff
--- a/motion_est_template.c	Thu Apr 10 08:47:08 2003 +0000
+++ b/motion_est_template.c	Thu Apr 10 13:18:38 2003 +0000
@@ -897,8 +897,8 @@
     int map_generation;
     const int penalty_factor= s->me.penalty_factor;
     const int size=0;
-    const int ref_mv_stride= s->mb_width+2;
-    const int ref_mv_xy= 1 + s->mb_x + (s->mb_y + 1)*ref_mv_stride;
+    const int ref_mv_stride= s->mb_stride;
+    const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride;
     me_cmp_func cmp, chroma_cmp;
     LOAD_COMMON(s->mb_x*16, s->mb_y*16);
     
@@ -1009,8 +1009,8 @@
     int map_generation;
     const int penalty_factor= s->me.penalty_factor;
     const int size=1;
-    const int ref_mv_stride= s->mb_width+2;
-    const int ref_mv_xy= 1 + s->mb_x + (s->mb_y + 1)*ref_mv_stride;
+    const int ref_mv_stride= s->mb_stride;
+    const int ref_mv_xy= s->mb_x + s->mb_y *ref_mv_stride;
     me_cmp_func cmp, chroma_cmp;
     LOAD_COMMON((s->mb_x*2 + (block&1))*8, (s->mb_y*2 + (block>>1))*8);