Plane address mismatch of vaapi video buffer
Sebastian Dröge
sebastian at centricular.com
Mon Feb 22 13:07:05 UTC 2016
On Mo, 2016-02-22 at 13:41 +0100, Thomas Scheuermann wrote:
> 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?
Can you file a bug about this? VAAPI buffers should behave exactly the
same as any others if you use the GstVideoFrame API.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160222/30669f0e/attachment.sig>
More information about the gstreamer-devel
mailing list