From d11c6359b514707e99371d31b4454542fb6ca112 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 23 Jan 2024 14:12:34 +0000 Subject: libcamera: bayer_format: Add Y12 to bayerToFormat 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") Reviewed-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- 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 175617a0..20aedfa6 100644 --- a/src/libcamera/bayer_format.cpp +++ b/src/libcamera/bayer_format.cpp @@ -170,6 +170,8 @@ const std::map 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) } }, }; -- cgit v1.2.1