diff options
author | Clément Bœsch <u@pkh.me> | 2016-07-29 10:24:06 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-07-29 10:24:06 +0200 |
commit | 13872d2aa1f454f103e501b91417c44f0f184d53 (patch) | |
tree | 718fb4412a10f0c0ad3435059b0fca174b377dda /libavcodec/h264_slice.c | |
parent | 238733f7417cd290ebac6fa70f3e62ded2c0bb3f (diff) | |
parent | bcd91f1644b46dd142c5355c8b742b27d9028903 (diff) | |
download | ffmpeg-streaming-13872d2aa1f454f103e501b91417c44f0f184d53.zip ffmpeg-streaming-13872d2aa1f454f103e501b91417c44f0f184d53.tar.gz |
Merge commit 'bcd91f1644b46dd142c5355c8b742b27d9028903'
* commit 'bcd91f1644b46dd142c5355c8b742b27d9028903':
h264: move a per-field block from decode_slice_header() to field_start()
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index e1de971..7dcfd84 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1331,6 +1331,13 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl, (h->mb_height * h->mb_stride - 1) * sizeof(*h->slice_table)); } + ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc, + h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc); + + memcpy(h->mmco, sl->mmco, sl->nb_mmco * sizeof(*h->mmco)); + h->nb_mmco = sl->nb_mmco; + h->explicit_ref_marking = sl->explicit_ref_marking; + return 0; } @@ -1667,15 +1674,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl, sl->resync_mb_y = sl->mb_y = sl->mb_y + 1; av_assert1(sl->mb_y < h->mb_height); - if (!h->setup_finished) { - ff_h264_init_poc(h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc, - h->ps.sps, &h->poc, h->picture_structure, nal->ref_idc); - - memcpy(h->mmco, sl->mmco, sl->nb_mmco * sizeof(*h->mmco)); - h->nb_mmco = sl->nb_mmco; - h->explicit_ref_marking = sl->explicit_ref_marking; - } - ret = ff_h264_build_ref_list(h, sl); if (ret < 0) return ret; |