[libcamera-devel,v2,2/3] qcam: format_converter: Support X RGB variants
diff mbox series

Message ID 20220706090642.2750987-3-kieran.bingham@ideasonboard.com
State Accepted
Commit 24095ff765e32046a9d22c83ca53c4cd89e540ce
Headers show
Series
  • qcam: Support 'X'RGB formats
Related show

Commit Message

Kieran Bingham July 6, 2022, 9:06 a.m. UTC
Support the X variants of the RGB pixel formats
along side the equivalent Alpha component based versions.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/qcam/format_converter.cpp | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/src/qcam/format_converter.cpp b/src/qcam/format_converter.cpp
index d4d3223bc698..9331da0ce7a3 100644
--- a/src/qcam/format_converter.cpp
+++ b/src/qcam/format_converter.cpp
@@ -93,6 +93,7 @@  int FormatConverter::configure(const libcamera::PixelFormat &format,
 		bpp_ = 3;
 		break;
 	case libcamera::formats::ARGB8888:
+	case libcamera::formats::XRGB8888:
 		formatFamily_ = RGB;
 		r_pos_ = 2;
 		g_pos_ = 1;
@@ -100,6 +101,7 @@  int FormatConverter::configure(const libcamera::PixelFormat &format,
 		bpp_ = 4;
 		break;
 	case libcamera::formats::RGBA8888:
+	case libcamera::formats::RGBX8888:
 		formatFamily_ = RGB;
 		r_pos_ = 3;
 		g_pos_ = 2;
@@ -107,6 +109,7 @@  int FormatConverter::configure(const libcamera::PixelFormat &format,
 		bpp_ = 4;
 		break;
 	case libcamera::formats::ABGR8888:
+	case libcamera::formats::XBGR8888:
 		formatFamily_ = RGB;
 		r_pos_ = 0;
 		g_pos_ = 1;
@@ -114,6 +117,7 @@  int FormatConverter::configure(const libcamera::PixelFormat &format,
 		bpp_ = 4;
 		break;
 	case libcamera::formats::BGRA8888:
+	case libcamera::formats::BGRX8888:
 		formatFamily_ = RGB;
 		r_pos_ = 1;
 		g_pos_ = 2;