From patchwork Thu Jun 4 09:00:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tju_cooyun@163.com X-Patchwork-Id: 26820 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 E496CC324C for ; Thu, 4 Jun 2026 09:00:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D67B7631CC; Thu, 4 Jun 2026 11:00:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=163.com header.i=@163.com header.b="l0GWGPwi"; dkim-atps=neutral Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.2]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EBBBA62DC4 for ; Thu, 4 Jun 2026 11:00:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=3f YCx2Hr3Rz09HUoIJR5O3UOmZwEskGW/aH5gP7Bj54=; b=l0GWGPwivlqvrVQeG4 bBvevA16Zz8N2Kc6+0dMLLH++ohK3w9CfkpRLNE67q1eOkpH+qfTcJM4zBVpkDXm +d+k2H1m5ODGh6+/aOwIRq3kRJn5Yo9bqM+5G1DTZDJdUSutTLoQwNvFS2tPyzcZ CN5ypNMl1mZZIZGXULfqw8x1k= Received: from SH-DESKTOP.taile2d4ba.ts.net (unknown []) by gzsmtp5 (Coremail) with SMTP id QCgvCgDnQSG+PiFq61mdAQ--.55308S2; Thu, 04 Jun 2026 17:00:46 +0800 (CST) From: tju_cooyun@163.com To: libcamera-devel@lists.libcamera.org Cc: zcy Subject: [PATCH] rpi: pipeline_base: print old color space in before updating Date: Thu, 4 Jun 2026 17:00:44 +0800 Message-ID: <20260604090044.3536188-1-tju_cooyun@163.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CM-TRANSID: QCgvCgDnQSG+PiFq61mdAQ--.55308S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Jry7Jw13KF1ruFyfAw1DJrb_yoW8JF4rpF yUAFs5t347ZF1rWF98u3ZaqF9rW34kXa1Igr1jkr4jkF45Kr9a9F42kw1fJrWfWFy3ZFsr WFWrJ3WxZr17GrJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pRH89ZUUUUU= X-Originating-IP: [183.195.143.58] X-CM-SenderInfo: 5wmxsuprr130i6rwjhhfrp/xtbC5h+h+GohPr-MWgAA38 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: zcy PipelineHandlerBase::updateStreamConfig now saves the previous stream color space before assignment when a color space change is detected. This ensures the debug log reports the transition as 'from to ' instead of showing the new value twice. Signed-off-by: zcy Reviewed-by: Barnabás Pőcze Reviewed-by: David Plowman --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 263a48387..5a5acf6a1 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -342,12 +342,12 @@ bool PipelineHandlerBase::updateStreamConfig(StreamConfiguration *stream, } if (stream->colorSpace != format.colorSpace) { - stream->colorSpace = format.colorSpace; - adjusted = true; LOG(RPI, Debug) << "Color space changed from " << ColorSpace::toString(stream->colorSpace) << " to " << ColorSpace::toString(format.colorSpace); + stream->colorSpace = format.colorSpace; + adjusted = true; } stream->stride = format.planes[0].bpl;