From patchwork Wed Jul 16 14:20:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 23823 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 08941C3237 for ; Wed, 16 Jul 2025 14:20:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DB55768F74; Wed, 16 Jul 2025 16:20:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="UmmJ4yqT"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1310B68F61 for ; Wed, 16 Jul 2025 16:20:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nDVr/i+s2Bh6DsppBfogTES1E9aj8Nr+6C1Z+bEr8AE=; b=UmmJ4yqTbjpLZ9qjN/m3WG8YsL nBu0ulhOuS+DPj1SAj7kVU67YG2Gu80sfrW4DP+fGmonVRfjhNgtJo0218/MkO0qXWqobnFlPEYSk w6MRB+SWhnBW46Ogt+cxEb84Mu4r61EtbnMfBcQ/u1Gv9Xe+flySWJplZ08940ygbk+wQCQmVRQUg n/6ylst7YBZDBlsmvnm10oGlJwg0oFWfFkSkF0cM5pazP/v6eA28PbSTfWBJX8+lWGqO9V2xgmGEV MqSzEKB+zO0dwm5DLGvcmXnCz6/1lCFAw+1hlr5KviuSGx/15IE5Zs7HXhsJNK/3XLbZzqSXentlm BgznnLiQ==; Received: from [49.36.69.57] (helo=uajain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1uc2zg-00HLf5-3b; Wed, 16 Jul 2025 16:20:24 +0200 From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Robert Mader , Umang Jain Subject: [RFC PATCH 2/6] libcamera: simple: Exclude raw configurations from output conversions Date: Wed, 16 Jul 2025 19:50:22 +0530 Message-ID: <20250716142027.236277-3-uajain@igalia.com> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250716142027.236277-1-uajain@igalia.com> References: <20250716142027.236277-1-uajain@igalia.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" From: Milan Zamazal In order to support raw streams, we need to add raw formats to software ISP configurations. In this preparatory patch, the raw formats are excluded from output configurations for conversions. Signed-off-by: Milan Zamazal Reviewed-by: Umang Jain --- src/libcamera/pipeline/simple/simple.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp index de6b29ab..cadc1117 100644 --- a/src/libcamera/pipeline/simple/simple.cpp +++ b/src/libcamera/pipeline/simple/simple.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -259,6 +260,12 @@ static const SimplePipelineInfo supportedDevices[] = { { "sun6i-csi", {}, false }, }; +bool isFormatRaw(const libcamera::PixelFormat &pixFmt) +{ + return libcamera::PixelFormatInfo::info(pixFmt).colourEncoding == + libcamera::PixelFormatInfo::ColourEncodingRAW; +} + } /* namespace */ class SimpleCameraData : public Camera::Private @@ -1388,7 +1395,7 @@ int SimplePipelineHandler::configure(Camera *camera, CameraConfiguration *c) cfg.setStream(&data->streams_[i]); - if (data->useConversion_) + if (data->useConversion_ && !isFormatRaw(cfg.pixelFormat)) outputCfgs.push_back(cfg); }