{"id":17192,"url":"https://patchwork.libcamera.org/api/patches/17192/?format=json","web_url":"https://patchwork.libcamera.org/patch/17192/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20220823174314.14881-7-laurent.pinchart@ideasonboard.com>","date":"2022-08-23T17:43:14","name":"[libcamera-devel,6/6] cam: Add color space support","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"c7ec62af479a34f27de6bd542a9c534216999315","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17192/mbox/","series":[{"id":3432,"url":"https://patchwork.libcamera.org/api/series/3432/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3432","date":"2022-08-23T17:43:08","name":"libcamera: Add support for color spaces to rkisp1 pipeline handler","version":1,"mbox":"https://patchwork.libcamera.org/series/3432/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17192/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17192/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 03329C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Aug 2022 17:43:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E52B61FCA;\n\tTue, 23 Aug 2022 19:43:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C9BC61FCA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Aug 2022 19:43:29 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 953F1484\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Aug 2022 19:43:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1661276612;\n\tbh=/SXJKJDO3SeO9tKwX/HD8uXUoE84grewaMGkleZeAqs=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=YEJWogwWhMJKCRP9zkoHqIfNbQ+f3wT7G+JzH8l2L+3hKT5vnVb1oHXnm8wj/6Q7i\n\tC2chh0no0fOcMcAVCm70EhTgb1vS+lb5S+CCoSTmQRjOdH9YH3GYwLRXQTCrIGt+OP\n\tGdaYrlvW8cINWF1OeTkUnsKGXemyGSRiz6zuBqU73KD8SHoiaI6lrEbxHb6W2y3sPR\n\twxmytJk1yEZzaTWm3mNMjUCP+O1kYKh5iTNZHC2GnPM6658os5SFtf/4VTERUN52Hd\n\tLWfgfeW29VmN0VYEU6/k4L0SlwXu31InVcQ3VKXAxW8QQuYeoML5OR04yD0386VIpU\n\tB3uypyY9o/pwQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1661276608;\n\tbh=/SXJKJDO3SeO9tKwX/HD8uXUoE84grewaMGkleZeAqs=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Vga8QM8qyr8Gx3/0g7/PztOsM4thp8tKk+86hdx4gDdBFYoxs0Z+Y66mfSpl1SwSf\n\tZ5kYvuAUA4zFNZyiFVRpwSTu6TXIQp94IhE0ALSoovC4ntvfWIqXNeaOoWiHgXgssC\n\t8dJp9E/MzhIPENRNn9XgUhHzFkHDq3tQBDPadm10="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Vga8QM8q\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 23 Aug 2022 20:43:14 +0300","Message-Id":"<20220823174314.14881-7-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.35.1","In-Reply-To":"<20220823174314.14881-1-laurent.pinchart@ideasonboard.com>","References":"<20220823174314.14881-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 6/6] cam: Add color space support","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add support for color space to the StreamKeyValueParser, allowing\nselection of a color space on the command line.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/cam/stream_options.cpp | 7 +++++++\n 1 file changed, 7 insertions(+)","diff":"diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\nindex a68135a9ed88..3a5625f5f267 100644\n--- a/src/cam/stream_options.cpp\n+++ b/src/cam/stream_options.cpp\n@@ -8,6 +8,8 @@\n \n #include <iostream>\n \n+#include <libcamera/color_space.h>\n+\n using namespace libcamera;\n \n StreamKeyValueParser::StreamKeyValueParser()\n@@ -21,6 +23,8 @@ StreamKeyValueParser::StreamKeyValueParser()\n \t\t  ArgumentRequired);\n \taddOption(\"pixelformat\", OptionString, \"Pixel format name\",\n \t\t  ArgumentRequired);\n+\taddOption(\"colorspace\", OptionString, \"Color space\",\n+\t\t  ArgumentRequired);\n }\n \n KeyValueParser::Options StreamKeyValueParser::parse(const char *arguments)\n@@ -96,6 +100,9 @@ int StreamKeyValueParser::updateConfiguration(CameraConfiguration *config,\n \n \t\tif (opts.isSet(\"pixelformat\"))\n \t\t\tcfg.pixelFormat = PixelFormat::fromString(opts[\"pixelformat\"].toString());\n+\n+\t\tif (opts.isSet(\"colorspace\"))\n+\t\t\tcfg.colorSpace = ColorSpace::fromString(opts[\"colorspace\"].toString());\n \t}\n \n \treturn 0;\n","prefixes":["libcamera-devel","6/6"]}