From patchwork Wed Jul 23 22:39:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 23915 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 097A9BDCC1 for ; Wed, 23 Jul 2025 22:39:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BA626906F; Thu, 24 Jul 2025 00:39:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="l4h7NCr3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1759568F93 for ; Thu, 24 Jul 2025 00:39:11 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4FE58B0B for ; Thu, 24 Jul 2025 00:38:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1753310312; bh=a2MFK1DFi/fSeavf6lNWsXU/88dHQc4xQUB/3Lmzffw=; h=From:To:Subject:Date:From; b=l4h7NCr346ox1kjs4vGWLrgtUjgjMig1UPMM9lwrHTgTe4ojuMczI4DHbE4vdMr7Q OSA2QM+vUwIsHaS+Oitnesqy7RVf0BxRWoxuuRJNVWcVIIxUwhVZogCv0oM20BolOA UfifiCu32hbw/mtJ0rLtbi+QlKCRgIyFJD+pkpNw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH] libcamera: v4l2_videodevice: Add color space to format string representation Date: Thu, 24 Jul 2025 01:39:07 +0300 Message-ID: <20250723223907.23698-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.49.1 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" To debug color issues in a pipeline it is necessary to know the color space used. Therefore add the color space to the string representation of V4L2DeviceFormat that is returned by toString() and operator<<(). The format gets for example printed as [0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC Signed-off-by: Laurent Pinchart Reviewed-by: Umang Jain Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_videodevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe -- Regards, Laurent Pinchart diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 76bdad40ca8d..71cc7e895d8c 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const */ std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f) { - out << f.size << "-" << f.fourcc; + out << f.size << "-" << f.fourcc << "/" + << ColorSpace::toString(f.colorSpace); return out; }