From patchwork Thu Oct 23 14:48:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24752 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 CC74DC3341 for ; Thu, 23 Oct 2025 14:50:03 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0E53760844; Thu, 23 Oct 2025 16:50:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="kcZiKNGt"; 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 B92426082F for ; Thu, 23 Oct 2025 16:50:01 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7328:357b:4ce1:72b6]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 99B9F177F; Thu, 23 Oct 2025 16:48:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761230896; bh=j/3WsFB4D2Uta3xMCM/dsUMW3xNcA+oJ/oLjccHCkWw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kcZiKNGtnHGy0KqC+44eRhTEqii1l2/9oXsOkwKZRh1HfGmErqvC7CaH2sxPUxkkn U3Lu43P2pAcwAij9F/+xmQE5EUm1J+dhFB3/2X27COB922gj20zEvXltVlmbbLhmAS TyaYeBV60E+iNshCJz/+OJrWDEAYenMFqGaTYwGU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 25/35] pipeline: rkisp1: Drop rawFormat variable Date: Thu, 23 Oct 2025 16:48:26 +0200 Message-ID: <20251023144841.403689-26-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251023144841.403689-1-stefan.klug@ideasonboard.com> References: <20251023144841.403689-1-stefan.klug@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" In raw mode we know there is only a single configuration so there is no need to iterate over all configurations to find the format. Drop that. Signed-off-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 35cb54c812bc..d7bb30f20668 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -677,21 +677,16 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() } /* Select the sensor format. */ - PixelFormat rawFormat; Size maxSize; for (const StreamConfiguration &cfg : config_) { - const PixelFormatInfo &info = PixelFormatInfo::info(cfg.pixelFormat); - if (info.colourEncoding == PixelFormatInfo::ColourEncodingRAW) - rawFormat = cfg.pixelFormat; - maxSize = std::max(maxSize, cfg.size); } std::vector mbusCodes; - if (rawFormat.isValid()) { - mbusCodes = { rawFormats.at(rawFormat) }; + if (isRaw) { + mbusCodes = { rawFormats.at(config_[0].pixelFormat) }; } else { std::transform(rawFormats.begin(), rawFormats.end(), std::back_inserter(mbusCodes),