From patchwork Fri Oct 23 10:58:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 28588 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 C3A95C324C for ; Fri, 23 Oct 2026 11:00:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 79D5468FBF; Fri, 23 Oct 2026 13:00:25 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GqerBKnp"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7140A68FBF for ; Fri, 23 Oct 2026 13:00:23 +0200 (CEST) Received: from mail.ideasonboard.com (unknown [IPv6:2401:4900:1c30:59f6:be2b:2877:6bc4:392]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EFEE32335; Fri, 23 Oct 2026 12:58:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1792753094; bh=oE7wKxkZ037gLOJfiY7EQ1gFdMRR4M5vkeK5HjOf9bc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=GqerBKnpohFbmk9GnJfGOjpFXPSZvnOT1MQ2AMoyxBAsU3w9N3LPweFlSNpF6mQac T361y1bIr0q/3+N3RUweQngROwsmy3uTMKhy3c+Bi+SumzGMX2oj0YqegWWEZUZHwH 8h6+cI23GyK/6NZce09aj3Q44fKb0d9Y4Muq39rY= From: Jai Luthra Date: Fri, 23 Oct 2026 16:28:26 +0530 Subject: [PATCH WIP RFC 18/26] libcamera: stream: Add bayerOrder for raw formats MIME-Version: 1.0 Message-Id: <20261023-b4-raw-model-v1-18-eadb9948901b@ideasonboard.com> References: <20261023-b4-raw-model-v1-0-eadb9948901b@ideasonboard.com> In-Reply-To: <20261023-b4-raw-model-v1-0-eadb9948901b@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Laurent Pinchart , Kieran Bingham , Sakari Ailus , Naushir Patuck , Jai Luthra X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1649; i=jai.luthra@ideasonboard.com; h=from:subject:message-id; bh=oE7wKxkZ037gLOJfiY7EQ1gFdMRR4M5vkeK5HjOf9bc=; b=owEBbQKS/ZANAwAKAUPekfkkmnFFAcsmYgBq2z3UeqYj5GOSTRHkkjHHij5sMAjEgWRXcwzR6 WCXHZx2HsWJAjMEAAEKAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCats91AAKCRBD3pH5JJpx RfX/EACRs/QOESpjwRJxHY9vxpZmnhzodnnZMX629ERLmW15g29hzYr7Kk/r/7kk2D9dR2yCLV9 FCYuqwebD2HWyMB1F6k5ixEYtiW5aw2RbTK0Vss2VabwtSxbi+4dEyi/wPcm3Bh/zepIoSoUMLf 5gpMzzupYSEHEuPagmpblvsofmYb4IQx+Ug0a7+5RxyqAFgzcpoNztaPKZjkwTTcjy+62nbYHx5 S3FtjiJXFUn+QOAJIVdXcE2Gr8yliotE+hkRIyBnYwUwfLdxJFNRDbb5/ey5sA3Q/RZJw3V/iCz 2ekVCYaBCdsnwI25HlA/QEnUhHfYmTVgSOneyk0EO7XLs3QKxoJlUK96EovmNQFCeCEP6upUVDC TZ/L+wZSIqs8uEjcK7TX7RxAvQzOGQYLvGhuxNw5lw1wQxXWZZ5I8tsWJQXJpN/L8uJOL1bFx7M n10LpmuqHi2O8CBQNzkoDLdHbnxzxSVMg8+Si7SZuPvnPiGknsUI+JUeh9o3StKumb5g8NdHUJo uSxHrq1K8KpTeRlb7YUXMQH7Es+SD1HfGDRir9P4fLplXPWrd1ExJ418rbto0EnGk/K3RrjVhgh 9mq7sbkTEZ3D2/TU/zlFFfsuxt0egyjxoIKw40yhNi2rEjMvLpHkFak71bbiy4FhFZjMGP8sQl4 gXKWC4e4KL8ifkQ== X-Developer-Key: i=jai.luthra@ideasonboard.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 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" Now that we only use bayer-independent PixelFormats, communicate the bayer order through an optional property in StreamConfiguration for raw streams so applications can process them correctly. Signed-off-by: Jai Luthra --- include/libcamera/stream.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h index b5e8f0a9a22d..afc8f07f99f1 100644 --- a/include/libcamera/stream.h +++ b/include/libcamera/stream.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -50,6 +51,22 @@ struct StreamConfiguration { std::optional colorSpace; + /** + * \brief The color filter array pattern of the raw data of the stream + * + * This field is only meaningful for streams with a raw pixel format. + * Pipeline handlers populate it in + * CameraConfiguration::generateConfiguration() with the sensor's + * native color filter array pattern, and adjust it in + * CameraConfiguration::validate() for any transform applied to the + * sensor data. + * + * A ColorFilterArray::MONO value indicates monochrome raw data + * without a color filter array. The field is left unset for non-raw + * streams. + */ + std::optional bayerOrder; + Stream *stream() const { return stream_; } void setStream(Stream *stream) { stream_ = stream; } const StreamFormats &formats() const { return formats_; }