summaryrefslogtreecommitdiff
path: root/src/apps/cam/sdl_texture_yuv.cpp
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-04-18 14:57:36 +0200
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-05-15 17:41:36 +0200
commitb24cd1229348764e20a360805b946537d1f8fe13 (patch)
tree0fa91082b26175bd0ccd667e0f19a49c0d90db9c /src/apps/cam/sdl_texture_yuv.cpp
parent41b0997114c1e1c09d001cb6241d5ce861e21e61 (diff)
apps: cam: sdl_texture: Add `SDLTexture1Plane`
`SDLTextureYUYV` uses `SDL_PIXELFORMAT_YUY2`, which is a single plane format. To support other single plane formats, replace `SDLTextureYUYV` with `SDLTexture1Plane` that can be instantiated with an arbitrary SDL pixel format and that uses `SDL_UpdateTexture()` to update the texture using exactly a single plane. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/apps/cam/sdl_texture_yuv.cpp')
-rw-r--r--src/apps/cam/sdl_texture_yuv.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/apps/cam/sdl_texture_yuv.cpp b/src/apps/cam/sdl_texture_yuv.cpp
index 7e2ce3f4..bed297d2 100644
--- a/src/apps/cam/sdl_texture_yuv.cpp
+++ b/src/apps/cam/sdl_texture_yuv.cpp
@@ -21,13 +21,3 @@ void SDLTextureNV12::update(libcamera::Span<const libcamera::Span<const uint8_t>
data[1].data(), stride_);
}
#endif
-
-SDLTextureYUYV::SDLTextureYUYV(const SDL_Rect &rect, unsigned int stride)
- : SDLTexture(rect, SDL_PIXELFORMAT_YUY2, stride)
-{
-}
-
-void SDLTextureYUYV::update(libcamera::Span<const libcamera::Span<const uint8_t>> data)
-{
- SDL_UpdateTexture(ptr_, nullptr, data[0].data(), stride_);
-}