qcam: viewfinder: Use correct DRM/QImage mappings
When the native pixel formats supported by QT were introduced, the
RGB/BGR formats were inverted.
Swap the BGR888 and RGB888 mappings accordingly.
Fixes: f890a57b7a ("qcam: viewfinder: Add support for more native formats")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -26,9 +26,9 @@ static const QMap<libcamera::PixelFormat, QImage::Format> nativeFormats
|
||||
#endif
|
||||
{ libcamera::PixelFormat{ DRM_FORMAT_ARGB8888 }, QImage::Format_RGB32 },
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
{ libcamera::PixelFormat{ DRM_FORMAT_BGR888 }, QImage::Format_BGR888 },
|
||||
{ libcamera::PixelFormat{ DRM_FORMAT_RGB888 }, QImage::Format_BGR888 },
|
||||
#endif
|
||||
{ libcamera::PixelFormat{ DRM_FORMAT_RGB888 }, QImage::Format_RGB888 },
|
||||
{ libcamera::PixelFormat{ DRM_FORMAT_BGR888 }, QImage::Format_RGB888 },
|
||||
};
|
||||
|
||||
ViewFinder::ViewFinder(QWidget *parent)
|
||||
|
||||
Reference in New Issue
Block a user