|
|
|
@ -457,6 +457,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst, |
|
|
|
|
h->poc.prev_frame_num = h->poc.frame_num; |
|
|
|
|
|
|
|
|
|
h->recovery_frame = h1->recovery_frame; |
|
|
|
|
h->non_gray = h1->non_gray; |
|
|
|
|
|
|
|
|
|
return err; |
|
|
|
|
} |
|
|
|
@ -1544,11 +1545,15 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, |
|
|
|
|
if (ret < 0) |
|
|
|
|
return ret; |
|
|
|
|
h->short_ref[0]->poc = prev->poc + 2U; |
|
|
|
|
h->short_ref[0]->gray = prev->gray; |
|
|
|
|
ff_thread_report_progress(&h->short_ref[0]->tf, INT_MAX, 0); |
|
|
|
|
if (h->short_ref[0]->field_picture) |
|
|
|
|
ff_thread_report_progress(&h->short_ref[0]->tf, INT_MAX, 1); |
|
|
|
|
} else if (!h->frame_recovered && !h->avctx->hwaccel) |
|
|
|
|
color_frame(h->short_ref[0]->f, c); |
|
|
|
|
} else if (!h->frame_recovered) { |
|
|
|
|
if (!h->avctx->hwaccel) |
|
|
|
|
color_frame(h->short_ref[0]->f, c); |
|
|
|
|
h->short_ref[0]->gray = 1; |
|
|
|
|
} |
|
|
|
|
h->short_ref[0]->frame_num = h->poc.prev_frame_num; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2007,6 +2012,19 @@ static int h264_slice_init(H264Context *h, H264SliceContext *sl, |
|
|
|
|
(sl->ref_list[j][i].reference & 3); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (sl->slice_type_nos == AV_PICTURE_TYPE_I) { |
|
|
|
|
h->cur_pic_ptr->gray = 0; |
|
|
|
|
h->non_gray = 1; |
|
|
|
|
} else { |
|
|
|
|
int gray = 0; |
|
|
|
|
for (j = 0; j < sl->list_count; j++) { |
|
|
|
|
for (i = 0; i < sl->ref_count[j]; i++) { |
|
|
|
|
gray |= sl->ref_list[j][i].parent->gray; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
h->cur_pic_ptr->gray = gray; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (h->avctx->debug & FF_DEBUG_PICT_INFO) { |
|
|
|
|
av_log(h->avctx, AV_LOG_DEBUG, |
|
|
|
|
"slice:%d %c mb:%d %c%s%s frame:%d poc:%d/%d ref:%d/%d qp:%d loop:%d:%d:%d weight:%d%s %s\n", |
|
|
|
|