[libcamera-devel] cam: Support RGB888 texture in sdl sink
Pavel Machek
pavel at ucw.cz
Tue Dec 12 18:35:44 CET 2023
Hi!
> > Lightly tested; this is useful for SoftISP testing. I get wrong
> > red/blue swapped, but that may be due to my SoftISP hacks.
> >
> > Signed-off-by: Pavel Machek <pavel at ucw.cz>
> >
> > diff --git a/src/apps/cam/sdl_sink.cpp b/src/apps/cam/sdl_sink.cpp
> > index a2f4abc1..105fa781 100644
> > --- a/src/apps/cam/sdl_sink.cpp
> > +++ b/src/apps/cam/sdl_sink.cpp
> > @@ -76,6 +76,9 @@ int SDLSink::configure(const libcamera::CameraConfiguration &config)
> > case libcamera::formats::YUYV:
> > texture_ = std::make_unique<SDLTextureYUYV>(rect_, cfg.stride);
> > break;
> > + case libcamera::formats::RGB888:
>
> I haven't confirmed, but I would bet if you have RB swaps, then you
> should probably map SDL RGB888 to libcamera BGR888, and libcamera RGB888
> to SDL BGR888.
>
> DRM RGB formats are specified differently to V4L2 formats. libcamera
> uses the DRM specification.
Thank you, fixed, and now I have good colors, v2 will follow.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20231212/ce214cd5/attachment.sig>
More information about the libcamera-devel
mailing list