[Bug 796169] vaapidec: Sample video that renders fine with FFMPEG but not in GStreamer

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed May 30 06:21:23 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796169

--- Comment #27 from sreerenj <bsreerenj at gmail.com> ---
(In reply to Nicolas Dufresne (ndufresne) from comment #25)
> (In reply to sreerenj from comment #24)
> > SEI Buffering period header can also activate the SPS. May it is missing
> > there?
> > I have seen a lot of SEI headers in the stream, didn't get time to analyze
> > it.
> 
> Ok, to be looked at.
> 
> (In reply to sreerenj from comment #23)
> > (In reply to Nicolas Dufresne (ndufresne) from comment #21)
> > > I'm trying to understand what to do. What I see from FFMPEG code (assuming
> > > I'm reading it properly), whenever it starts a new frame, it will first go
> > > over the DPB to find all frame with unpaired fields. When one is found,
> > > there is two venue, pair it with the new frame, otherwise it's a lost field,
> > > and it must be concealed. In the software decoder, they copy the previous
> > > field of the same parity, I don't see any concealment on the VAAPI side
> > > there.
> > > 
> > > Is the software FFMPEG decoder method what you had in mind when you say
> > > "cache 2 fields" ?
> > 
> > 
> > I was thinking to wait for the next field too before making an assumption.
> > But I afraid that this could break the current design of gstreamer-vaapi.
> > Again, it won't work well if there is two immediate field-parity order
> > change in consecutive frames.
> > 
> > What we need is some heuristics to find whether the field was missing or
> > not. I mean, how to distinguish field-parity change from "missing the first
> > field" scenario.
> > 
> > As you said checking in dpb for the unpaired field could be an option to try.
> 
> What's the semantic for gst_vaapi_decoder_h264_start_frame /
> gst_vaapi_decoder_h264_end_frame ? Is that really frames ? or it's in hidden
> pictures/fields ?



The boundary checking is based on 7.4.1.2.4.

The parsing code detects the frame boundary. Start_frame() get invoked with
first data unit(slice) of a field or frame.
end_frame() get invoked once we have a frame boundary. Here the frame boundary
can be "only a field" in field encoded frames.

For eg: in the above stream, all the frames till the 50 th frame are
field-packed-frames and only one start_frame invocation for both fields.
For the 50 th frame, there are two separate fields, and each one get one
start_frame invocation.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list