|
|
@ -919,8 +919,9 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, |
|
|
|
for (i = 0; i < 2; i++) { |
|
|
|
for (i = 0; i < 2; i++) { |
|
|
|
uint8_t **ref2picture; |
|
|
|
uint8_t **ref2picture; |
|
|
|
|
|
|
|
|
|
|
|
if ((s->picture_structure == s->field_select[dir][i] + 1 |
|
|
|
if ((s->picture_structure == s->field_select[dir][i] + 1 || |
|
|
|
|| s->pict_type == AV_PICTURE_TYPE_B || s->first_field) && ref_picture[0]) { |
|
|
|
s->pict_type == AV_PICTURE_TYPE_B || s->first_field) && |
|
|
|
|
|
|
|
ref_picture[0]) { |
|
|
|
ref2picture = ref_picture; |
|
|
|
ref2picture = ref_picture; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ref2picture = s->current_picture_ptr->f->data; |
|
|
|
ref2picture = s->current_picture_ptr->f->data; |
|
|
@ -942,8 +943,7 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, |
|
|
|
if (CONFIG_SMALL || is_mpeg12) { |
|
|
|
if (CONFIG_SMALL || is_mpeg12) { |
|
|
|
if (s->picture_structure == PICT_FRAME) { |
|
|
|
if (s->picture_structure == PICT_FRAME) { |
|
|
|
for (i = 0; i < 2; i++) { |
|
|
|
for (i = 0; i < 2; i++) { |
|
|
|
int j; |
|
|
|
for (int j = 0; j < 2; j++) |
|
|
|
for (j = 0; j < 2; j++) |
|
|
|
|
|
|
|
mpeg_motion_field(s, dest_y, dest_cb, dest_cr, |
|
|
|
mpeg_motion_field(s, dest_y, dest_cb, dest_cr, |
|
|
|
j, j ^ i, ref_picture, pix_op, |
|
|
|
j, j ^ i, ref_picture, pix_op, |
|
|
|
s->mv[dir][2 * i + j][0], |
|
|
|
s->mv[dir][2 * i + j][0], |
|
|
@ -966,11 +966,10 @@ static av_always_inline void mpv_motion_internal(MpegEncContext *s, |
|
|
|
|
|
|
|
|
|
|
|
/* opposite parity is always in the same frame if this is
|
|
|
|
/* opposite parity is always in the same frame if this is
|
|
|
|
* second field */ |
|
|
|
* second field */ |
|
|
|
if (!s->first_field) { |
|
|
|
if (!s->first_field) |
|
|
|
ref_picture = s->current_picture_ptr->f->data; |
|
|
|
ref_picture = s->current_picture_ptr->f->data; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
default: av_assert2(0); |
|
|
|
default: av_assert2(0); |
|
|
|