codecs: h264dec: Improve the algorithm for low latency mode.
authorHe Junyan <junyan.he@intel.com>
Tue, 20 Jul 2021 16:04:18 +0000 (00:04 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 21 Jul 2021 15:23:17 +0000 (15:23 +0000)
commit130205629f94c26ebb155f50c643bdb9664e2051
tree695b595185c6ca617a3393d25287d00a2b74920b
parent573d3f5ba5725b59aeb245eed4a673aa39504d54
codecs: h264dec: Improve the algorithm for low latency mode.

In low_latency mode, try to bump the picture as soon as possible
without the frames disorder:
1. We can directly output the continuous non-reference frame.
2. Consider max_num_reorder_frames, which is special useful for
   I-P mode.
3. Consider the leading pictures with negative POC.
4  Output small POC pictures when non-reference frame comes.
4. Output the POC increment<=2 pictures. This is not 100% safe,
   but in practice this condition can be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2373>
gst-libs/gst/codecs/gsth264decoder.c
gst-libs/gst/codecs/gsth264picture.c
gst-libs/gst/codecs/gsth264picture.h