After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786802 - vaapidecode: h264: fix nal aligned streams
vaapidecode: h264: fix nal aligned streams
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: High normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-25 13:59 UTC by Orestis Floros
Modified: 2018-11-03 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Orestis Floros 2017-08-25 13:59:06 UTC
Running the following pipeline:

gst-launch-1.0 filesrc location=CI_MW_D.264 ! h264parse ! video/x-h264, stream-format=byte-stream, alignment=nal ! vaapih264dec ! vaapisink

seems to show only a single frame while the pipeline works correctly with au alignment:

gst-launch-1.0 filesrc location=CI_MW_D.264 ! h264parse ! video/x-h264, stream-format=byte-stream, alignment=au ! vaapih264dec ! vaapisink

A quick workaround seems to be to not mark the GST_H264_NAL_AU_DELIMITER units as AU and FRAME START which makes the above pipeline work but the problem still persists for other files such as BAMQ1_JVC_C.264.

Files from ITU-T_H.264.1(2016-02)_AVCv1_bitstreams.zip from https://www.itu.int/net/itu-t/sigdb/spevideo/VideoForm-s.aspx?val=102002641.
Comment 1 sreerenj 2017-08-25 18:24:24 UTC
Setting the priority as High since the "aligname=nal" should be considered as the default format of h264 and which should work with vaapih264dec.
Comment 2 Hyunjun Ko 2017-09-22 07:43:28 UTC
I've looked into this issue all this week.
This is a bit tricky but let me try to explain briefly.

1. This is introduced by my commit to gsth264parse (201e71c in gst-plugins-bad)
Since the commit landed, incoming data with byte-stream/nal is like:
<AU><SLICE> instead of just only <SLICE>.
vaapih264dec can't handle this now, which is this issue.

2. I think vaapih264dec is doing fine in the way it should do.
Adding AU to a frame and adding SLICE to the frame (by add_to_frame)
and have_frame call.

3. Meanwhile, in the base video decoder, it tries to decide frame information such as pts, duration, etc. See gst_video_decoder_get_buffer_info_at_offset.
Previously it choose info from slice buffer properly, but for now it choose from AU buffer.

Finally this wrong information leads to dropping all frames in gst_video_decoder_clip_and_push_buf.

Acutally, I tried to improve gst_video_decoder_get_buffer_info_at_offset, but I realized that I have to be careful since there are lots of cases.

Now I'm looking for other solution. :(
Comment 3 GStreamer system administrator 2018-11-03 15:51:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/67.