diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-04-14 20:53:59 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-06-12 20:27:52 +0200 |
commit | 77a1e2c5f8f8250dfacff24b993eb473260ed13e (patch) | |
tree | 90d4645a15379e4e89b2ed2bbd5ab8345c43b442 /libavcodec/h264_slice.c | |
parent | d06e4d8aab9c679b6aea2591d2a9b382df9e5f74 (diff) | |
download | ffmpeg-77a1e2c5f8f8250dfacff24b993eb473260ed13e.tar.gz |
h264: move direct mode inits out of h264_slice_header_parse()
This code does not do any bitstream parsing, it just initializes some
internal state.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 404e333c94..aefb37507c 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1387,10 +1387,6 @@ static int h264_slice_header_parse(H264Context *h, H264SliceContext *sl) } } - if (sl->slice_type_nos == AV_PICTURE_TYPE_B && !sl->direct_spatial_mv_pred) - ff_h264_direct_dist_scale_factor(h, sl); - ff_h264_direct_ref_list_init(h, sl); - if (sl->slice_type_nos != AV_PICTURE_TYPE_I && pps->cabac) { tmp = get_ue_golomb_31(&sl->gb); if (tmp > 2) { @@ -1464,6 +1460,10 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) if (ret < 0) return ret; + if (sl->slice_type_nos == AV_PICTURE_TYPE_B && !sl->direct_spatial_mv_pred) + ff_h264_direct_dist_scale_factor(h, sl); + ff_h264_direct_ref_list_init(h, sl); + if (h->avctx->skip_loop_filter >= AVDISCARD_ALL || (h->avctx->skip_loop_filter >= AVDISCARD_NONKEY && sl->slice_type_nos != AV_PICTURE_TYPE_I) || |