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

Message ID 20250421155109.175930-1-barnabas.pocze@ideasonboard.com
Headers show
Series
  • apps: cam: Support {RGB,BGR}888 format
Related show

Message

Barnabás Pőcze April 21, 2025, 3:51 p.m. UTC
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