[libcamera-devel,2/2] libcamera: Update V4L2 pixel format to libcamera pixel format mapping
diff mbox series

Message ID 20210618200247.624987-3-vedantparanjape160201@gmail.com
State Superseded
Headers show
Series
  • Fixed mismatch of pixel formats of V4L2 and libcamera
Related show

Commit Message

Vedant Paranjape June 18, 2021, 8:02 p.m. UTC
This patch adds mapping between V4L2_PIX_FMT_RGBX32 and formats::XBGR8888

Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
---
 src/libcamera/v4l2_pixelformat.cpp | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp
index 950cbda4..78a08303 100644
--- a/src/libcamera/v4l2_pixelformat.cpp
+++ b/src/libcamera/v4l2_pixelformat.cpp
@@ -52,6 +52,7 @@  const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{
 	{ V4L2PixelFormat(V4L2_PIX_FMT_BGR24), formats::RGB888 },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_XBGR32), formats::XRGB8888 },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), formats::BGRX8888 },
+	{ V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), formats::XBGR8888 },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_RGBA32), formats::ABGR8888 },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_ABGR32), formats::ARGB8888 },
 	{ V4L2PixelFormat(V4L2_PIX_FMT_ARGB32), formats::BGRA8888 },