OSDN Git Service

h264: eliminate default_ref_list
authorAnton Khirnov <anton@khirnov.net>
Mon, 30 Nov 2015 16:51:48 +0000 (17:51 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sun, 6 Dec 2015 08:42:39 +0000 (09:42 +0100)
commit741b494fa8cd28a7d096349bac183893c236e3f9
tree92fccb992b75e8106820a9d28be42e9492fa84ec
parente7078e842d93436edba1f30af1f9869d3913f7fe
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
libavcodec/h264_refs.c
libavcodec/h264_slice.c