[{"id":34078,"web_url":"https://patchwork.libcamera.org/comment/34078/","msgid":"<0336d712-fb4c-42ce-a408-55765a7036c4@ideasonboard.com>","date":"2025-04-29T16:49:24","subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 04. 29. 16:42 keltezéssel, Laurent Pinchart írta:\n> On Fri, Apr 25, 2025 at 08:23:06AM +0100, Kieran Bingham wrote:\n>> Quoting Laurent Pinchart (2025-04-24 15:47:13)\n>>> Extend the string representation of StreamConfiguration, as returned by\n>>> the toString() and operator<<() functions, with color space information.\n>>\n>> This looks reasonable and helpful.\n>>\n>> It would be nice to see here (or after the ---) what the change\n>> looks like in the logs to make it easy to comprehend the update.\n> \n> Here an example.\n> \n> Before:\n> \n> [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV\n> \n> After:\n> \n> [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV/sYCC\n\nI am wondering if maybe a different separator wouldn't have been better\nas such outputs are possible now:\n\n   INFO Camera camera.cpp:1258 configuring streams: (0) 1280x720-MJPEG/Rec709/Rec709/Rec601/Limited\n\nI think the above is not immediately clear.\n\n\nRegards,\nBarnabás Pőcze\n\n> \n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>> ---\n>>>   src/libcamera/stream.cpp | 3 ++-\n>>>   1 file changed, 2 insertions(+), 1 deletion(-)\n>>>\n>>> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n>>> index 978d72752b00..f091487c9353 100644\n>>> --- a/src/libcamera/stream.cpp\n>>> +++ b/src/libcamera/stream.cpp\n>>> @@ -407,7 +407,8 @@ std::string StreamConfiguration::toString() const\n>>>    */\n>>>   std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)\n>>>   {\n>>> -       out << cfg.size << \"-\" << cfg.pixelFormat;\n>>> +       out << cfg.size << \"-\" << cfg.pixelFormat << \"/\"\n>>> +           << ColorSpace::toString(cfg.colorSpace);\n>>>          return out;\n>>>   }\n>>>\n>>>\n>>> base-commit: 3569fed7afc16fe31dfbccbfbaeb72a741bc8973\n>","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 905B7C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Apr 2025 16:49:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D42D168AD3;\n\tTue, 29 Apr 2025 18:49:35 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 773F6617DB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Apr 2025 18:49:34 +0200 (CEST)","from [192.168.33.9] (185.221.141.190.nat.pool.zt.hu\n\t[185.221.141.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 85D866A8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Apr 2025 18:49:28 +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=\"ihhBWD9Q\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745945368;\n\tbh=TKN+AdqU5Qa0Cn029Cg0bYSV413ihDU1oFJQ4LMFE0E=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=ihhBWD9QCpWZ2sVnn8pCO+1F2cxooQrDhi+aOgPRM2ykSnMRS1EwreXaVN0hXXSof\n\tnSVFWPNgZbJRNuaaStVAjj9UGT4Jx0MRAf6eSq+WsnoBbWvjnewaoDjV4WLs1QhkcJ\n\ty7VHyMg9NXdoOxbD2kOggSqxPUF0tRqiLH1fbSzc=","Message-ID":"<0336d712-fb4c-42ce-a408-55765a7036c4@ideasonboard.com>","Date":"Tue, 29 Apr 2025 18:49:24 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","To":"libcamera-devel@lists.libcamera.org","References":"<20250424144713.14279-1-laurent.pinchart@ideasonboard.com>\n\t<174556578643.1586992.8197234857631069320@ping.linuxembedded.co.uk>\n\t<20250429144251.GA25912@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250429144251.GA25912@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":34079,"web_url":"https://patchwork.libcamera.org/comment/34079/","msgid":"<20250429171702.GA16233@pendragon.ideasonboard.com>","date":"2025-04-29T17:17:02","subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Apr 29, 2025 at 06:49:24PM +0200, Barnabás Pőcze wrote:\n> 2025. 04. 29. 16:42 keltezéssel, Laurent Pinchart írta:\n> > On Fri, Apr 25, 2025 at 08:23:06AM +0100, Kieran Bingham wrote:\n> >> Quoting Laurent Pinchart (2025-04-24 15:47:13)\n> >>> Extend the string representation of StreamConfiguration, as returned by\n> >>> the toString() and operator<<() functions, with color space information.\n> >>\n> >> This looks reasonable and helpful.\n> >>\n> >> It would be nice to see here (or after the ---) what the change\n> >> looks like in the logs to make it easy to comprehend the update.\n> > \n> > Here an example.\n> > \n> > Before:\n> > \n> > [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV\n> > \n> > After:\n> > \n> > [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV/sYCC\n> \n> I am wondering if maybe a different separator wouldn't have been better\n> as such outputs are possible now:\n> \n>    INFO Camera camera.cpp:1258 configuring streams: (0) 1280x720-MJPEG/Rec709/Rec709/Rec601/Limited\n> \n> I think the above is not immediately clear.\n\nWhat separator would you recommend ?\n\n> >> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >>\n> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>> ---\n> >>>   src/libcamera/stream.cpp | 3 ++-\n> >>>   1 file changed, 2 insertions(+), 1 deletion(-)\n> >>>\n> >>> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> >>> index 978d72752b00..f091487c9353 100644\n> >>> --- a/src/libcamera/stream.cpp\n> >>> +++ b/src/libcamera/stream.cpp\n> >>> @@ -407,7 +407,8 @@ std::string StreamConfiguration::toString() const\n> >>>    */\n> >>>   std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)\n> >>>   {\n> >>> -       out << cfg.size << \"-\" << cfg.pixelFormat;\n> >>> +       out << cfg.size << \"-\" << cfg.pixelFormat << \"/\"\n> >>> +           << ColorSpace::toString(cfg.colorSpace);\n> >>>          return out;\n> >>>   }\n> >>>\n> >>>\n> >>> base-commit: 3569fed7afc16fe31dfbccbfbaeb72a741bc8973","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 27470BE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Apr 2025 17:17:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 506F768AD3;\n\tTue, 29 Apr 2025 19:17:10 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 33148617DB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Apr 2025 19:17:09 +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 ESMTPSA id 03E4C99F;\n\tTue, 29 Apr 2025 19:17:02 +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=\"VNyOeyqn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745947023;\n\tbh=nlWsGOAtjJAjlMrO8VB3N+ZE4ZbVNWcMQQgVBIBL4Qk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VNyOeyqnKMcJcALg/Rg2SvvmnPkY3TJVitW4NI//OXAqrfd1X7zZTz1nTkLGOpRzq\n\tQ8/eOcCXWqogpV7ApvOzLjDLcWWP7dYfOD1eZ2zomd0RgzDJTeQgs8Ru0c9QFYCXPr\n\tx7WHyf+kIha8xvrf14zNhpE248gvq8fwMRD5XFbs=","Date":"Tue, 29 Apr 2025 20:17:02 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","Message-ID":"<20250429171702.GA16233@pendragon.ideasonboard.com>","References":"<20250424144713.14279-1-laurent.pinchart@ideasonboard.com>\n\t<174556578643.1586992.8197234857631069320@ping.linuxembedded.co.uk>\n\t<20250429144251.GA25912@pendragon.ideasonboard.com>\n\t<0336d712-fb4c-42ce-a408-55765a7036c4@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<0336d712-fb4c-42ce-a408-55765a7036c4@ideasonboard.com>","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>"}},{"id":34080,"web_url":"https://patchwork.libcamera.org/comment/34080/","msgid":"<8a8db491-7d49-4f94-82f5-1d4271bf3642@ideasonboard.com>","date":"2025-04-29T17:48:13","subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 04. 29. 19:17 keltezéssel, Laurent Pinchart írta:\n> On Tue, Apr 29, 2025 at 06:49:24PM +0200, Barnabás Pőcze wrote:\n>> 2025. 04. 29. 16:42 keltezéssel, Laurent Pinchart írta:\n>>> On Fri, Apr 25, 2025 at 08:23:06AM +0100, Kieran Bingham wrote:\n>>>> Quoting Laurent Pinchart (2025-04-24 15:47:13)\n>>>>> Extend the string representation of StreamConfiguration, as returned by\n>>>>> the toString() and operator<<() functions, with color space information.\n>>>>\n>>>> This looks reasonable and helpful.\n>>>>\n>>>> It would be nice to see here (or after the ---) what the change\n>>>> looks like in the logs to make it easy to comprehend the update.\n>>>\n>>> Here an example.\n>>>\n>>> Before:\n>>>\n>>> [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV\n>>>\n>>> After:\n>>>\n>>> [0:03:53.962430875] [222]  INFO Camera camera.cpp:1205 configuring streams: (0) 1920x1080-YUYV/sYCC\n>>\n>> I am wondering if maybe a different separator wouldn't have been better\n>> as such outputs are possible now:\n>>\n>>     INFO Camera camera.cpp:1258 configuring streams: (0) 1280x720-MJPEG/Rec709/Rec709/Rec601/Limited\n>>\n>> I think the above is not immediately clear.\n> \n> What separator would you recommend ?\n\nI don't know. I imagine many options could work, e.g. just `-`,\nwhich is already used to separate the size and the pixel format.\nBut I see this patch has already been merged; and it is probably\nnot a significant issue.\n\n\nRegards,\nBarnabás Pőcze\n\n> \n>>>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>>\n>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>>>> ---\n>>>>>    src/libcamera/stream.cpp | 3 ++-\n>>>>>    1 file changed, 2 insertions(+), 1 deletion(-)\n>>>>>\n>>>>> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n>>>>> index 978d72752b00..f091487c9353 100644\n>>>>> --- a/src/libcamera/stream.cpp\n>>>>> +++ b/src/libcamera/stream.cpp\n>>>>> @@ -407,7 +407,8 @@ std::string StreamConfiguration::toString() const\n>>>>>     */\n>>>>>    std::ostream &operator<<(std::ostream &out, const StreamConfiguration &cfg)\n>>>>>    {\n>>>>> -       out << cfg.size << \"-\" << cfg.pixelFormat;\n>>>>> +       out << cfg.size << \"-\" << cfg.pixelFormat << \"/\"\n>>>>> +           << ColorSpace::toString(cfg.colorSpace);\n>>>>>           return out;\n>>>>>    }\n>>>>>\n>>>>>\n>>>>> base-commit: 3569fed7afc16fe31dfbccbfbaeb72a741bc8973\n>","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 A5BDCC327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 29 Apr 2025 17:48:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A57AF68AD3;\n\tTue, 29 Apr 2025 19:48:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EDB75617DB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 29 Apr 2025 19:48:19 +0200 (CEST)","from [192.168.33.9] (185.221.141.190.nat.pool.zt.hu\n\t[185.221.141.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7728DAF;\n\tTue, 29 Apr 2025 19:48:13 +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=\"cS6qsWEX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1745948894;\n\tbh=A5ng35zEZy22NLuCzHgeiBHreLksHDGqzXoi2zrdkGc=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=cS6qsWEXgMM3065sdLLkyEi2ZLSYM1meHnEEXV/MaA804bgrToj1/FlC+FAzPbwlw\n\tD+w0zvzMMQhSpjHKZaQe0jg5oCFFJYj8o/sHlS10XzbrnFjPb19Ew/VrIcHoKHXnNc\n\tuoXjooZGkcRjSmC/VRe6qjlbtsWPvQZBPgGzPY7w=","Message-ID":"<8a8db491-7d49-4f94-82f5-1d4271bf3642@ideasonboard.com>","Date":"Tue, 29 Apr 2025 19:48:13 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] libcamera: stream: Add color space to configuration\n\tstring representation","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250424144713.14279-1-laurent.pinchart@ideasonboard.com>\n\t<174556578643.1586992.8197234857631069320@ping.linuxembedded.co.uk>\n\t<20250429144251.GA25912@pendragon.ideasonboard.com>\n\t<0336d712-fb4c-42ce-a408-55765a7036c4@ideasonboard.com>\n\t<20250429171702.GA16233@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250429171702.GA16233@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]