From patchwork Thu Oct 23 14:48:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24751 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 0C468BE080 for ; Thu, 23 Oct 2025 14:50:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 802446083D; Thu, 23 Oct 2025 16:50:00 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MZpv9SG9"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 71ECE6082F for ; Thu, 23 Oct 2025 16:49:58 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7328:357b:4ce1:72b6]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 8267D177F; Thu, 23 Oct 2025 16:48:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1761230893; bh=YD8/Fc4sV3lxt4nPYvG9lORTvpOnOCp/4zQKsFVq1Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MZpv9SG94Fw5wGlr4NFeq39MUwPlq0TsdwKlwr8JlAZ7cM0x9gQ4UASEF6md0yIjv bGap88PaG+QnAJkMkHlSgoKXIG7rkUOilcifAR2+E7k3j6r7S3OtfBUhKRgbZgP4SZ 8oeG66tfuQg6y+N1I59RXkPQVHwmxrn3sd9afe6w= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope Date: Thu, 23 Oct 2025 16:48:25 +0200 Message-ID: <20251023144841.403689-25-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 the number of configurations is actively limited to 1. It is therefore safe to move isRaw up one level to simplify the code and prepare for later use. Signed-off-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 0b31b8077c8d..35cb54c812bc 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -559,28 +559,22 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() * Simultaneous capture of raw and processed streams isn't possible. If * there is any raw stream, cap the number of streams to one. */ + bool isRaw = false; if (config_.size() > 1) { for (const auto &cfg : config_) { if (PixelFormatInfo::info(cfg.pixelFormat).colourEncoding == PixelFormatInfo::ColourEncodingRAW) { config_.resize(1); status = Adjusted; + isRaw = true; break; } } } bool useDewarper = false; - if (pipe->dewarper_) { - /* - * Platforms with dewarper support, such as i.MX8MP, support - * only a single stream. We can inspect config_[0] only here. - */ - bool isRaw = PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding == - PixelFormatInfo::ColourEncodingRAW; - if (!isRaw) - useDewarper = true; - } + if (pipe->dewarper_ && !isRaw) + useDewarper = true; /* * If there are more than one stream in the configuration figure out the