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

Graphics, sound and multimedia • Re: PISP on Pi5 and 32 BPP

$
0
0
Some time ago, I wrote a program that captures the HDMI output of my decoder and applies changes to the video, creates PIP windows with various streams, etc.

From GStreamer directly to the OpenGL texture, it's been years since I've touched the code or done anything in OpenGL, so I may be wrong about some of the details...

This is the pipeline I use for GStreamer

Code:

v4l2src ! video/x-raw,width=1920,height=1080,framerate=50/1,format=UYVY ! appsink name=videosink sync=false"
Anyway, when I got the pi5, I wanted to make everything work in RGB instead of UYVY, but eglCreateImageKHR failed to create an image with DRM_FORMAT_RGB888.

Code:

   {     EGLint attr[] = {     EGL_WIDTH, width,     EGL_HEIGHT, height,     EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_RGB888,     EGL_DMA_BUF_PLANE0_FD_EXT, dmabuf_fd,     EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,     EGL_DMA_BUF_PLANE0_PITCH_EXT, width *3,     EGL_NONE   };         image = dec->egl->eglCreateImageKHR(dec->egl->display, EGL_NO_CONTEXT,       EGL_LINUX_DMA_BUF_EXT, NULL, attr);   }
It only works in DRM_FORMAT_ARGB8888 and DRM_FORMAT_XRGB8888

I was wondering if this change could be used to output the video directly in rgbx xrgb etc., without having to apply conversions and lose the dma buffer, and if this works when switching from gstreamer

It would take me a while to remember everything I did, but I would gladly do it to take full advantage of all 4 lanes of the pi5

Statistics: Posted by Bundan — Sun Nov 30, 2025 7:30 pm



Viewing all articles
Browse latest Browse all 8093

Trending Articles