apps: qcam: Add support for RGB565

Qt supports RGB565 natively; add support for the format by mapping
the libcamera format to Qt's representation of it.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Daniel Scally 2023-10-23 09:22:16 +01:00 committed by Laurent Pinchart
parent d477ee97bc
commit b5f5a89bc3

View file

@ -36,6 +36,7 @@ static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
{ libcamera::formats::RGB888, QImage::Format_BGR888 }, { libcamera::formats::RGB888, QImage::Format_BGR888 },
#endif #endif
{ libcamera::formats::BGR888, QImage::Format_RGB888 }, { libcamera::formats::BGR888, QImage::Format_RGB888 },
{ libcamera::formats::RGB565, QImage::Format_RGB16 },
}; };
ViewFinderQt::ViewFinderQt(QWidget *parent) ViewFinderQt::ViewFinderQt(QWidget *parent)