[PATCH v2 3/4] libcamera: bayer_format: Add Y12 to bayerToFormat
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Jan 23 15:35:34 CET 2024
Support for Mono 12-bit formats were added to the mbusCodeToBayer table
without supplying the corresponding entry for converting the other way.
Add the relevant entry to the bayerToFormat table.
Fixes: ec6309571654 ("libcamera: bayer_format: Add unpacked mono 12-bit format to the conversion table")
Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
v2: new patch
src/libcamera/bayer_format.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libcamera/bayer_format.cpp b/src/libcamera/bayer_format.cpp
index 175617a0edf5..20aedfa6d925 100644
--- a/src/libcamera/bayer_format.cpp
+++ b/src/libcamera/bayer_format.cpp
@@ -170,6 +170,8 @@ const std::map<BayerFormat, Formats, BayerFormatComparator> bayerToFormat{
{ formats::R10, V4L2PixelFormat(V4L2_PIX_FMT_Y10) } },
{ { BayerFormat::MONO, 10, BayerFormat::Packing::CSI2 },
{ formats::R10_CSI2P, V4L2PixelFormat(V4L2_PIX_FMT_Y10P) } },
+ { { BayerFormat::MONO, 12, BayerFormat::Packing::None },
+ { formats::R12, V4L2PixelFormat(V4L2_PIX_FMT_Y12) } },
{ { BayerFormat::MONO, 16, BayerFormat::Packing::None },
{ formats::R16, V4L2PixelFormat(V4L2_PIX_FMT_Y16) } },
};
--
2.34.1
More information about the libcamera-devel
mailing list