Skip to content

codecs: h264dec: Do not insert the current frame into dpb before needs_bump() check.

He Junyan requested to merge He_Junyan/gst-plugins-bad:h264_bump into master

The spec says in C.4.4: IDR picture for which no_output_of_prior_pics_flag is not equal to 1 and is not inferred to be equal to 1, ... repeatedly invoking the “bumping” process.

But that is "Removal of pictures from the DPB before possible insertion of the current picture". In our h264 decoder, we add the picture to the DPB first and then do the bump check. So, this changes SPEC's behavior. The IDR frame with no_output_of_prior_pics_flag=0 always bumps and outputs immediately, which make the POC disorder when there are some negative POC.

We should not insert the current frame into dpb before needs_bump() check.

Edited by He Junyan

Merge request reports

Loading