{"id":23915,"url":"https://patchwork.libcamera.org/api/1.1/patches/23915/?format=json","web_url":"https://patchwork.libcamera.org/patch/23915/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250723223907.23698-1-laurent.pinchart@ideasonboard.com>","date":"2025-07-23T22:39:07","name":"libcamera: v4l2_videodevice: Add color space to format string representation","commit_ref":"b43520d70ecd9db68c3ae50a20ba46dcef019836","pull_url":null,"state":"accepted","archived":false,"hash":"158dfb82903bbf95dfa9e11d9cf21e844636a577","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23915/mbox/","series":[{"id":5317,"url":"https://patchwork.libcamera.org/api/1.1/series/5317/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5317","date":"2025-07-23T22:39:07","name":"libcamera: v4l2_videodevice: Add color space to format string representation","version":1,"mbox":"https://patchwork.libcamera.org/series/5317/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23915/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23915/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 097A9BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 23 Jul 2025 22:39:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1BA626906F;\n\tThu, 24 Jul 2025 00:39:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1759568F93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jul 2025 00:39:11 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4FE58B0B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jul 2025 00:38:32 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"l4h7NCr3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1753310312;\n\tbh=a2MFK1DFi/fSeavf6lNWsXU/88dHQc4xQUB/3Lmzffw=;\n\th=From:To:Subject:Date:From;\n\tb=l4h7NCr346ox1kjs4vGWLrgtUjgjMig1UPMM9lwrHTgTe4ojuMczI4DHbE4vdMr7Q\n\tOSA2QM+vUwIsHaS+Oitnesqy7RVf0BxRWoxuuRJNVWcVIIxUwhVZogCv0oM20BolOA\n\tUfifiCu32hbw/mtJ0rLtbi+QlKCRgIyFJD+pkpNw=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH] libcamera: v4l2_videodevice: Add color space to format\n\tstring 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","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"To debug color issues in a pipeline it is necessary to know the color\nspace used. Therefore add the color space to the string representation\nof V4L2DeviceFormat that is returned by toString() and operator<<(). The\nformat gets for example printed as\n\n[0:05:52.981684000] [230] DEBUG RkISP1 rkisp1_path.cpp:468 Configured main resizer video device with 1920x1080-NV12/sYCC\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/v4l2_videodevice.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\n\nbase-commit: b65df7e7554b45e2d3d7fdb5b37c2ab7df3db4fe\n--\nRegards,\n\nLaurent Pinchart","diff":"diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 76bdad40ca8d..71cc7e895d8c 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -446,7 +446,8 @@ const std::string V4L2DeviceFormat::toString() const\n  */\n std::ostream &operator<<(std::ostream &out, const V4L2DeviceFormat &f)\n {\n-\tout << f.size << \"-\" << f.fourcc;\n+\tout << f.size << \"-\" << f.fourcc << \"/\"\n+\t    << ColorSpace::toString(f.colorSpace);\n \treturn out;\n }\n\n","prefixes":[]}