[RFC PATCH v1 0/5] apps: cam: Support {RGB,BGR}888 format

Barnabás Pőcze barnabas.pocze at ideasonboard.com
Mon Apr 21 17:51:04 CEST 2025


This patch series adds support for the following formats in the SDL sink:
  * RGB888 -> SDL_PIXELFORMAT_RGB24
  * BGR888 -> SDL_PIXELFORMAT_BGR24

This is done by introducing a "generic" texture object that
implements update by calling `SDL_UpdateTexture()`, so this
can be used for single plane formats. This is then used
for YUYV, RGB888, and BGR888.

Barnabás Pőcze (5):
  apps: cam: sdl_texture: Take list of buffers in span
  apps: cam: sdl_texture: Add single plane generic texture
  apps: cam: sdl_sink: Use `SDLTexture1Plane` for `YUYV`
  apps: cam: sdl_texture: Remove `SDLTextureYUYV`
  apps: cam: sdl_sink: Support `{RGB,BGR}888`

 src/apps/cam/sdl_sink.cpp         |  9 ++++++++-
 src/apps/cam/sdl_texture.h        |  4 ++--
 src/apps/cam/sdl_texture_1plane.h | 18 ++++++++++++++++++
 src/apps/cam/sdl_texture_mjpg.cpp |  2 +-
 src/apps/cam/sdl_texture_mjpg.h   |  2 +-
 src/apps/cam/sdl_texture_yuv.cpp  | 12 +-----------
 src/apps/cam/sdl_texture_yuv.h    |  9 +--------
 7 files changed, 32 insertions(+), 24 deletions(-)
 create mode 100644 src/apps/cam/sdl_texture_1plane.h

--
2.49.0


More information about the libcamera-devel mailing list