Re: Encoding DMA Buf with BGRx:0x0100000000000001 in h264 using vaapi
Victor Jaquez via gstreamer-devel <[email protected]> Tue, 7 Nov 2023 12:46:36 +0100
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <20231107114636.gik7mibnzwgkdcdq@octavia> |
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-negotiation-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 >