summaryrefslogtreecommitdiff
path: root/src/qcam
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-05-26 17:02:48 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-05-28 12:05:44 +0100
commit16c5f44c690a1d7d31b2e150d6e916cc6a999119 (patch)
tree080b5f9f1747e880428cbcdc9c25ef5765736ce3 /src/qcam
parent2d5a369b2c5154a6ee6aef03e2a95300478bc8d3 (diff)
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: f890a57b7a06 ("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>
Diffstat (limited to 'src/qcam')
-rw-r--r--src/qcam/viewfinder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qcam/viewfinder.cpp b/src/qcam/viewfinder.cpp
index 0d68f62e..7a308f53 100644
--- a/src/qcam/viewfinder.cpp
+++ b/src/qcam/viewfinder.cpp
@@ -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)