changeset 11023:ff5aff85ec10 libavcodec

Simplify left_xy init
author michael
date Wed, 27 Jan 2010 00:15:55 +0000
parents 44529d4292ce
children 5ab861519e79
files h264.h
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h264.h	Tue Jan 26 23:54:11 2010 +0000
+++ b/h264.h	Wed Jan 27 00:15:55 2010 +0000
@@ -1144,16 +1144,14 @@
         const int curr_mb_field_flag     = IS_INTERLACED(mb_type);
         if(s->mb_y&1){
             if (left_mb_field_flag != curr_mb_field_flag) {
-                left_xy[0] = mb_xy - s->mb_stride - 1;
-                left_xy[1] = mb_xy                - 1;
+                left_xy[0] -= s->mb_stride;
             }
         }else{
             if(curr_mb_field_flag){
                 top_xy      += s->mb_stride & (((s->current_picture.mb_type[top_xy    ]>>7)&1)-1);
             }
             if (left_mb_field_flag != curr_mb_field_flag) {
-                left_xy[0] = mb_xy                - 1;
-                left_xy[1] = mb_xy + s->mb_stride - 1;
+                left_xy[1] += s->mb_stride;
             }
         }
     }