Plane address mismatch of vaapi video buffer

Thomas Scheuermann scheuermann at barco.com
Mon Feb 22 12:41:40 UTC 2016


Hi all,

I use a pipeline which which uses vaapidecode and vaapipostproc for a
video and the frames are delivered to appsink. I keep the NV12 format.
Outside the pipeline I get the sample from where I want to access the
video frame. I use the following code to get access:

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

Now I should be able to access the video planes via
frame.data[0] for the Y plane and
frame.data[1] for the UV plane.

This works for a video with e.g. 1280x720. But if I use a video of
1920x1080 the Y plane is still correct but the UV plane is shifted for
some lines and starts later as in data[1].

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

but they also dont match.

How can I get the correct addresses of the planes?
Do I have to set something special if I use a VAAPI generetad buffer?
How do I get the correct stride of the planes?

I use GStreamer 1.4.5 at the moment.

Regards,

Thomas
This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer>


More information about the gstreamer-devel mailing list