Commit f0538030 authored by Michael Niedermayer's avatar Michael Niedermayer

Port col_parity code from spatial mode to temporal mode,

I also love it if people duplicate code and fix one but not the other.

Originally committed as revision 14543 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 301e1057
...@@ -1185,12 +1185,12 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){ ...@@ -1185,12 +1185,12 @@ static inline void pred_direct_motion(H264Context * const h, int *mb_type){
else else
*mb_type |= MB_TYPE_8x8; *mb_type |= MB_TYPE_8x8;
}else{ }else{
/* field to frame scaling */ int cur_poc = s->current_picture_ptr->poc;
/* col_mb_y = (mb_y&~1) + (topAbsDiffPOC < bottomAbsDiffPOC ? 0 : 1) int *col_poc = h->ref_list[1]->field_poc;
* but in MBAFF, top and bottom POC are equal */ int col_parity = FFABS(col_poc[0] - cur_poc) >= FFABS(col_poc[1] - cur_poc);
int dy = (s->mb_y&1) ? 1 : 2; int dy = 2*col_parity - (s->mb_y&1);
mb_types_col[0] = mb_types_col[0] =
mb_types_col[1] = h->ref_list[1][0].mb_type[pair_xy+s->mb_stride]; mb_types_col[1] = h->ref_list[1][0].mb_type[pair_xy + col_parity*s->mb_stride];
l1ref0 += dy*h->b8_stride; l1ref0 += dy*h->b8_stride;
l1ref1 += dy*h->b8_stride; l1ref1 += dy*h->b8_stride;
l1mv0 += 2*dy*h->b_stride; l1mv0 += 2*dy*h->b_stride;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment