GNOME Bugzilla – Bug 788229
plugins: NV12 memory:DMABuf support is broken
Last modified: 2018-09-06 10:53:48 UTC
see commit message
Created attachment 360518 [details] [review] plugins: memory:DMABuf only handles planar formats When glimagesink negotiates the caps feature memory:DMABuf the exported dmabufs buffers with NV12 format are not well rendered, thus setting only planar.
Is that slower then using NV12? How come they aren't well rendered?
Attachment 360518 [details] pushed as 8fee85e - plugins: memory:DMABuf only handles planar formats
Actually, when I tried to render NV12 DMA buffer from vaapih264 decoder I faced with the issue that strides/offsets in GstVideoMeta are wrong. The following simplified snippet retrieves correct strides/offsets: GstVaapiVideoMeta *meta = gst_buffer_get_vaapi_video_meta(buf); GstVaapiSurface *surface = gst_vaapi_video_meta_get_surface(meta); GstVaapiImage* image = gst_vaapi_surface_derive_image(surface); VAImage va_image = {0}; gst_vaapi_image_get_image(image, &va_image)) gsize offsets[4] = {va_image.offsets[0], va_image.offsets[1], va_image.offsets[2], 0}; gint stride[4] = {va_image.pitches[0], va_image.pitches[1], va_image.pitches[2], 0}; GstVideoMeta* vmeta = gst_buffer_add_video_meta_full(outbuf, GST_VIDEO_FRAME_FLAG_NONE, gst_vaapi_image_get_format(image), va_image.width, va_image.height, va_image.num_planes, offsets, stride);
Ok, that does not seem terribly complicated to fix, removing the format is fine short term, but shouldn't this bug be kept open then ?
(In reply to Nicolas Dufresne (ndufresne) from comment #5) > Ok, that does not seem terribly complicated to fix, removing the format is > fine short term, but shouldn't this bug be kept open then ? Thinking about to keep open this bug, I guess it just become a duplicate of bug 779146. I'm going to close this bug, and keep the tiled formats debate in bug 779146.