Mercurial > libavcodec.hg
comparison h264.h @ 11023:ff5aff85ec10 libavcodec
Simplify left_xy init
author | michael |
---|---|
date | Wed, 27 Jan 2010 00:15:55 +0000 |
parents | 44529d4292ce |
children | b37a53d101c3 |
comparison
equal
deleted
inserted
replaced
11022:44529d4292ce | 11023:ff5aff85ec10 |
---|---|
1142 if(FRAME_MBAFF){ | 1142 if(FRAME_MBAFF){ |
1143 const int left_mb_field_flag = IS_INTERLACED(s->current_picture.mb_type[mb_xy-1]); | 1143 const int left_mb_field_flag = IS_INTERLACED(s->current_picture.mb_type[mb_xy-1]); |
1144 const int curr_mb_field_flag = IS_INTERLACED(mb_type); | 1144 const int curr_mb_field_flag = IS_INTERLACED(mb_type); |
1145 if(s->mb_y&1){ | 1145 if(s->mb_y&1){ |
1146 if (left_mb_field_flag != curr_mb_field_flag) { | 1146 if (left_mb_field_flag != curr_mb_field_flag) { |
1147 left_xy[0] = mb_xy - s->mb_stride - 1; | 1147 left_xy[0] -= s->mb_stride; |
1148 left_xy[1] = mb_xy - 1; | |
1149 } | 1148 } |
1150 }else{ | 1149 }else{ |
1151 if(curr_mb_field_flag){ | 1150 if(curr_mb_field_flag){ |
1152 top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1); | 1151 top_xy += s->mb_stride & (((s->current_picture.mb_type[top_xy ]>>7)&1)-1); |
1153 } | 1152 } |
1154 if (left_mb_field_flag != curr_mb_field_flag) { | 1153 if (left_mb_field_flag != curr_mb_field_flag) { |
1155 left_xy[0] = mb_xy - 1; | 1154 left_xy[1] += s->mb_stride; |
1156 left_xy[1] = mb_xy + s->mb_stride - 1; | |
1157 } | 1155 } |
1158 } | 1156 } |
1159 } | 1157 } |
1160 | 1158 |
1161 h->top_mb_xy = top_xy; | 1159 h->top_mb_xy = top_xy; |