From patchwork Tue Jan 23 14:35:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 19465 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DD1D6C32BD for ; Tue, 23 Jan 2024 14:35:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1E21462947; Tue, 23 Jan 2024 15:35:44 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qzeVqAAN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CB35162946 for ; Tue, 23 Jan 2024 15:35:40 +0100 (CET) Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2C70A1890; Tue, 23 Jan 2024 15:34:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1706020467; bh=0MlrDwpQVwhGB3Yl9UaxpeQalfJDz6L0v9QfgTDwffw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qzeVqAANL9aPUoUFyJ9zspvHsBTmeyJXt9MDu9QmxQp8BXMBS9vKKTXZUPL/mNDNn GCUQ5s2vipkKWZfi5o/u8tq/fUasMLimAJWede7YhJBBrEo0RbTPbblE6gFXyEdEPr KXjzyyWnnVnHEiBXe3lPUHlwuxCAL72Rz/nKsDXs= From: Kieran Bingham To: libcamera devel Subject: [PATCH v2 3/4] libcamera: bayer_format: Add Y12 to bayerToFormat Date: Tue, 23 Jan 2024 14:35:34 +0000 Message-Id: <20240123143535.52255-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123143535.52255-1-kieran.bingham@ideasonboard.com> References: <20240123143535.52255-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 Reviewed-by: Laurent Pinchart --- 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 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) } }, };