RE: Encoding DMA Buf with BGRx:0x0100000000000001 in h264 using vaapi
Michael via gstreamer-devel <[email protected]> Thu, 9 Nov 2023 17:19:52 +0100
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, I apologise for the late reply. Many thanks for all the information. > As Nicolas already asked, first we have to ask what device gives you that format? perhaps the very same device might deliver other. I am using a UHD Graphics 630 as hardware. I split it via GVT-G and assign an instance to a virtual machine in QEMU. Then I get the DMA buf of the framebuffer via mdev ( ioctl(device_fd, VFIO_DEVICE_QUERY_GFX_PLANE, &plane)). I import the DMA buf into GStreamer. And the DMA buf then has BGRx:0x010000000000000001. That's why I was surprised that the graphics card uses this format internally but the encoder can't handle it. >GstVA queries the driver and expose the supported color formats, so yes, the va plugin should support all hardware capabilities, otherwise it's a bug. >You can use vadumpcaps https://github.com/fhvwy/vadumpcaps/ to check all the pixels supported by a profile/entrypoint. Thank you very much, I will have a look at that. Yours sincerely Michael -----Original Message----- From: gstreamer-devel <[email protected]> On Behalf Of Victor Jaquez via gstreamer-devel Sent: Tuesday, November 7, 2023 12:47 PM To: Discussion of the development of and with GStreamer <[email protected]> Cc: Victor Jaquez <[email protected]> Subject: Re: Encoding DMA Buf with BGRx:0x0100000000000001 in h264 using vaapi On Fri, 03 Nov 2023 at 15:46, xaterus--- via gstreamer-devel wrote: > With great interest I have read this article about Gstreamer DMABuf > modifier negotiation in > GStreamer(https://blogs.igalia.com/vjaquez/2023/08/08/dmabuf-modifier-negoti ation-in-gstreamer/). > > So I want to encode an DMA Buf with the format BGRx:0x0100000000000001 > into a h264 video stream using the VAAPI with the GStreamer VA Plugin. > > Using gst-inspect on vah264enc I can see I need to convert it to: > video/x-raw(memory:DMABuf) > width: [ 32, 4096 ] > height: [ 32, 4096 ] > format: DMA_DRM > drm-format: NV12:0x0100000000000002 > > > So I thought about using vapostproc to convert it. So using > gst-inspect again I found out that: the src pad of vapostproc supports > NV12:0x0100000000000002 (memory:DMABuf) which is great. But the sink > pad does not support BGRx:0x0100000000000001. > > Now I ask myself, is it my hardware that does not support the > conversion between BGRx:0x010000000000000001 and > NV12:0x010000000000000002, or is it Intel VAAPI or the gstreamer va > plugin? Does the gstreamer va plugin support all hardware > capabilities? GstVA queries the driver and expose the supported color formats, so yes, the va plugin should support all hardware capabilities, otherwise it's a bug. You can use vadumpcaps https://github.com/fhvwy/vadumpcaps/ to check all the pixels supported by a profile/entrypoint. > > Also is there any other method to convert a DMA Buffer with > BGRx:0x0100000000000001 with gstreamer in h264? As Nicolas already asked, first we have to ask what device gives you that format? perhaps the very same device might deliver other. > > Yours sincerely > Michael >