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 762546 - Stride information is missing in buffers from vaapipostproc
Stride information is missing in buffers from vaapipostproc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.6.3
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
P2
Depends on:
Blocks:
 
 
Reported: 2016-02-23 16:13 UTC by Thomas Scheuermann
Modified: 2018-04-10 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Scheuermann 2016-02-23 16:13:25 UTC
The buffers received from appsink don't have the correct stride information,
when this buffer was processed by vaapipostproc.
The pipeline looks like this:
vaapidecode ! vaapipostproc ! appsink

After getting the buffer from appsink I get the information about the video with

buffer = gst_sample_get_buffer(_sample);
caps = gst_sample_get_caps(_sample);
gst_video_frame_map(&frame, &vinfo, buffer, GST_MAP_READ);

The strides should be in
vinfo.stride[0]
vinfo.stride[1]
...

But these strides don't match.
For BGRx e.g. a line is rounded up to a multiple of 64 pixels,
but this is not reflected in the stride.
Comment 1 Nicolas Dufresne (ndufresne) 2016-02-24 01:31:52 UTC
This is a bit tricky, appsink does not support GstVideoMeta, so upstream element cannot add this meta on the buffers. That should theoretically force upstream element to copy/crop the buffers so they use a default stride. Maybe vaapipostproc does not do. So the proper behaviour here will simply kill the performance for you use case (until someone add a way to support VideoMeta in appsink).

The proper fix to vaapipostproc is to copy/crop (gst_video_frame_copy() handles thats) before pushing.
Comment 2 Víctor Manuel Jáquez Leal 2018-04-10 13:07:04 UTC
This should be already fixed with the patches merged on bug 785054

This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.