From 741b494fa8cd28a7d096349bac183893c236e3f9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Mon, 30 Nov 2015 17:51:48 +0100 Subject: h264: eliminate default_ref_list According to the spec, the reference list for a slice should be constructed by first generating an initial (what we now call "default") reference list and then optionally applying modifications to it. Our code has an optimization where the initial reference list is constructed for the first inter slice and then rebuilt for other slices if needed. This, however, adds complexity to the code, requires an extra 2.5kB array in the codec context and there is no reason to think that it has any positive effect on performance. Therefore, simplify the code by generating the reference list from scratch for each slice. --- libavcodec/h264.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'libavcodec/h264.h') diff --git a/libavcodec/h264.h b/libavcodec/h264.h index e9fd9ccec5..13b149fe48 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -600,7 +600,6 @@ typedef struct H264Context { */ int max_pic_num; - H264Ref default_ref_list[2][32]; ///< base reference list for all slices of a coded picture H264Picture *short_ref[32]; H264Picture *long_ref[32]; H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size? @@ -645,7 +644,6 @@ typedef struct H264Context { enum AVPictureType pict_type; - int last_slice_type; /** @} */ /** @@ -804,11 +802,6 @@ int ff_h264_get_slice_type(const H264SliceContext *sl); */ int ff_h264_alloc_tables(H264Context *h); -/** - * Fill the default_ref_list. - */ -int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl); - int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl); void ff_h264_fill_mbaff_ref_list(H264Context *h, H264SliceContext *sl); void ff_h264_remove_all_refs(H264Context *h); -- cgit v1.2.3