Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Graphics, sound and multimedia • Re: h264 encoding from GPU output on raspberry Pi 3/4

$
0
0
I believe the approach is to not use a GL framebuffer and export its texture, but instead have Mesa render into a gbm surface and get the linear output from there. kmscube might help with that: Once you have the gbm_bo, you can get a handle for it, which I think you should be able to convert into a dmabuf filedescriptor using drmPrimeHandleToFD.

In my tool, the GL surfaces all looks like this in /sys/kernel/debug/dma_buf/bufinfo:

Code:

08294400        00000000        00080005        00000005        drm     00000878        <none>        write fence:drm_sched v3d_render seq 119 unsignalled        Attached Devices:        1002000000.v3d
1920*1080*4 (RGBA) = 8294400. So it has the expected size, has a single plane, the modifier is DRM_FORMAT_MOD_LINEAR and format is DRM_FORMAT_ARGB8888.

Statistics: Posted by dividuum — Thu Jul 03, 2025 9:59 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles