[{"id":23818,"web_url":"https://patchwork.libcamera.org/comment/23818/","msgid":"<f946a59131a8f7f9bfb58f52499ffa31c3a831b0.camel@collabora.com>","date":"2022-07-11T17:32:37","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Hi Rishikesh,\n\nI'm still uneasy on the design decision you are taking in this entire series.\nI'm always available on IRC for discussions if you need to.\n\nIn general, your approach seems to only take a subset of libcamera and gstreamer\n(the well known colorspace names). I would personally completely ignore these\nuser friendly goodies and just map four lower level enums: range, matrix,\ntransfer function and primaries. This way, we can map the full range of options\nwithout ever having to update the code everytime something new is used by some\nhardware. GStreamer will transparently translate this to a \"well-known-name\" in\ncaps.\n\nregards,\nNicolas\n\nLe lundi 11 juillet 2022 à 21:07 +0530, Rishikesh Donadkar a écrit :\n> This series aims to add colorimetry support to the libcamera gstreamer\n> element.\n> \n> If colorimetry is specified by the user in the gstreamer pipeline, try to\n> apply the libcamera colorspace corresponding to the GStreamer colorimetry\n> to the camera if the colorspace passes the validation then push the\n> colorimetry corresponding to the valid colorspace in the caps.\n> If the colorimetry pushed into the caps is same as requested negotiation\n> will succeed, else negotiation will fail.\n> \n> If no colorimetry is specified by the user in the gstreamer pipeline,\n> push the GStreamer colorimetry corresponding to the current colorspace\n> applied to the camera into the caps and the negotiation will be take\n> care of by the gstreamer. If the colorimetry corresponding to the current\n> libcamera colorspace is not available in gstreamer then remove the \n> colorimetry field if present in the caps.\n> \n> [PATCH 1/5] - Made a verbose commit message. Introduced a new helper function\n>               for converting std::string representation of colorimetry into \n>               G_STRING_TYPE. Removed unnecessary g_free(). Removed the std::optional\n>               wrapper around the colorSpace when converting into colorspace and \n>               passed the value of the colorSpace instead to the function as it is\n>               checked to have value before passing to the function.\n>               Eliminated the code which was checking if the colorimetry is valid\n>               colorimetry will be valid always because we are working with predefined \n>               colorimetries in gstreamer.\n> \n> [PATCH 2/5] - Simplified the if-else block. Eliminated the code where colorimetry\n>               was set to nullptr when it was not known. Insted the field is left\n>               unset. If the field is present and is unset then remove the field.\n> \n> [PATCH 3/5] - colorSpace was passed by reference as a function argument in the \n>               function colorimetry_form_colorspace(), Changed the function to \n>               return the colorspace instead and setting the colorspace in the \n>               StreamConfiguration was done after the colorspace is returned from \n>               the function. The local functions that were used in the same file \n>               were declared static.\n> \n> [PATCH 4/5] - Made the changes required due to the changes made in patch 3\n> \n> [PATCH 5/5] - If the camera cannot deliver the colorspace requested in the \n>               gstreamer pipeline then the colorspace is reset to the value \n>               that was present before the attempt was made to set the \n>               colorspace corresponding to the requested colorimetry.\n> \n> Rishikesh Donadkar (5):\n>   gstreamer: convert from libcamera colorspace to GStreamer colorimetry.\n>   gstreamer: Update the obtained colorimetry in caps.\n>   gstreamer: Convert from GStreamer colorimetry to libcamera ColorSpace\n>   gstreamer: Configure the colorSpace in the Stream configuration.\n>   gstreamer: Reset the colorSpace if not the same after validation.\n> \n>  src/gstreamer/gstlibcamera-utils.cpp | 69 ++++++++++++++++++++++++++++\n>  src/gstreamer/gstlibcamerasrc.cpp    | 12 +++++\n>  2 files changed, 81 insertions(+)\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 92E23BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jul 2022 17:32:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0129163312;\n\tMon, 11 Jul 2022 19:32:50 +0200 (CEST)","from madras.collabora.co.uk (madras.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C57F66330F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jul 2022 19:32:47 +0200 (CEST)","from nicolas-tpx395.localdomain (192-222-136-102.qc.cable.ebox.net\n\t[192.222.136.102])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby madras.collabora.co.uk (Postfix) with ESMTPSA id 90E226601A0F;\n\tMon, 11 Jul 2022 18:32:46 +0100 (BST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657560770;\n\tbh=s1WBtJ9JZE52BwZWiAsLaJKtFyUM8BpzhiMrtYzJ/8c=;\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:Cc:\n\tFrom;\n\tb=Rkbew7Fr+dx/ibCgNx6dGQ6hmNvb3D2GdBFs7jGRP+e2o4lnBxQe6/ozeJX0eG11d\n\t5Kuwh5ECrZDESAGPM0O9vSTKyfUvTaLoFKuoRU8KMhGC7DjW5iNmwtv7ENwOUnnbU9\n\tBR7eqM84AoI+foWcYgLmJ0WKFEZHyhq+/WLZS/vy7JDIKhpO+Flb6f5s8BGJgXDewV\n\tvdZoRTfsYYN3UyePpi4DzXKyPD3o/UqQKpQy/ZUQkuE2pIWfrFgo4q5wZdHBuxs4vb\n\tBile1GUexqB/hA8bd0xLA5B7VTjjKgeILWOO8oZb72q7NyXRswP3Yhd8RrlMtypxmE\n\t5/JpuqgrCCd8w==","v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1657560767;\n\tbh=s1WBtJ9JZE52BwZWiAsLaJKtFyUM8BpzhiMrtYzJ/8c=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=PnEUwgBd6tVVuVtYwUzF68+I+LMG8221EowscccmkgSeMCuowBg5IfRhMwWN2wHxr\n\tqSbnIeaTnQhOvKeX0Ha80uboGLPdBGs4elOp4nelXkq8aGWyXXDSsOW089TA7uqwa/\n\tMThe6qxiq6xPVoMqdtdXXCXjSTPDyExi7M0vCxOdAK7YuFI+OuyFBP+cFJ0NUSg5ol\n\tKRBku9qMsvFJalKYR4AQz6NH0eqldACkLXKOOCGbS3bEbwzFywOOR0+7zhkbH/pxe9\n\tYZvrw1GD7e2Xzb5uuqtVkFRJQP5QO3EsK6BKQvYI0nb/mUjT97kr8vUXFB0R4h4g/G\n\t5xjETWTMaZbng=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=collabora.com\n\theader.i=@collabora.com\n\theader.b=\"PnEUwgBd\"; dkim-atps=neutral","Message-ID":"<f946a59131a8f7f9bfb58f52499ffa31c3a831b0.camel@collabora.com>","To":"Rishikesh Donadkar <rishikeshdonadkar@gmail.com>, \n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 11 Jul 2022 13:32:37 -0400","In-Reply-To":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>","References":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.44.2 (3.44.2-1.fc36) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","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":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"vedantparanjape160201@gmail.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23822,"web_url":"https://patchwork.libcamera.org/comment/23822/","msgid":"<bcf20fc4-fed5-0af5-a39d-9af4c154fd7f@ideasonboard.com>","date":"2022-07-12T06:19:36","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Nicolas,\n\nThank you for the feedback.\n\nOn 7/11/22 23:02, Nicolas Dufresne via libcamera-devel wrote:\n> Hi Rishikesh,\n>\n> I'm still uneasy on the design decision you are taking in this entire series.\n> I'm always available on IRC for discussions if you need to.\n>\n> In general, your approach seems to only take a subset of libcamera and gstreamer\n> (the well known colorspace names). I would personally completely ignore these\n> user friendly goodies and just map four lower level enums: range, matrix,\n> transfer function and primaries. This way, we can map the full range of options\n> without ever having to update the code everytime something new is used by some\n> hardware. GStreamer will transparently translate this to a \"well-known-name\" in\n> caps.\n\n\nSo, you prefer to breaking down the GST_VIDEO_COLORIMETRY to lower enums \nand create a libcamera::Colorspace out of it?\n\nI assumed that the GStreamer would need to work only on standard \ncolorspaces on both libcamera and GStreamer's side and we don't need to \ncarry all the lower level enums mapping in GStreamer element.\n\nBut your point of being able to use it when something new is used, is \ngood. So in that context, I agree on breaking it down to lower enums and \ncreating a libcamera::Colorspace  out of it. My only worry in that case \nis that the assembled Colorspace might have one or more lower levels \nenums as \"Invalid\" (i.e. not present in libcamera's colorspace.cpp) and \nwe proceed with such a Colorspace to be applied on the sensor?\n\nShould we allow this? Or should we check if the constructed colorspace \nbelongs to a list of standard colorspaces (I sent a \nisStandardColorSpace() helper patch on the list). Any thoughts?\n\n\n>\n> regards,\n> Nicolas\n>\n> Le lundi 11 juillet 2022 à 21:07 +0530, Rishikesh Donadkar a écrit :\n>> This series aims to add colorimetry support to the libcamera gstreamer\n>> element.\n>>\n>> If colorimetry is specified by the user in the gstreamer pipeline, try to\n>> apply the libcamera colorspace corresponding to the GStreamer colorimetry\n>> to the camera if the colorspace passes the validation then push the\n>> colorimetry corresponding to the valid colorspace in the caps.\n>> If the colorimetry pushed into the caps is same as requested negotiation\n>> will succeed, else negotiation will fail.\n>>\n>> If no colorimetry is specified by the user in the gstreamer pipeline,\n>> push the GStreamer colorimetry corresponding to the current colorspace\n>> applied to the camera into the caps and the negotiation will be take\n>> care of by the gstreamer. If the colorimetry corresponding to the current\n>> libcamera colorspace is not available in gstreamer then remove the\n>> colorimetry field if present in the caps.\n>>\n>> [PATCH 1/5] - Made a verbose commit message. Introduced a new helper function\n>>                for converting std::string representation of colorimetry into\n>>                G_STRING_TYPE. Removed unnecessary g_free(). Removed the std::optional\n>>                wrapper around the colorSpace when converting into colorspace and\n>>                passed the value of the colorSpace instead to the function as it is\n>>                checked to have value before passing to the function.\n>>                Eliminated the code which was checking if the colorimetry is valid\n>>                colorimetry will be valid always because we are working with predefined\n>>                colorimetries in gstreamer.\n>>\n>> [PATCH 2/5] - Simplified the if-else block. Eliminated the code where colorimetry\n>>                was set to nullptr when it was not known. Insted the field is left\n>>                unset. If the field is present and is unset then remove the field.\n>>\n>> [PATCH 3/5] - colorSpace was passed by reference as a function argument in the\n>>                function colorimetry_form_colorspace(), Changed the function to\n>>                return the colorspace instead and setting the colorspace in the\n>>                StreamConfiguration was done after the colorspace is returned from\n>>                the function. The local functions that were used in the same file\n>>                were declared static.\n>>\n>> [PATCH 4/5] - Made the changes required due to the changes made in patch 3\n>>\n>> [PATCH 5/5] - If the camera cannot deliver the colorspace requested in the\n>>                gstreamer pipeline then the colorspace is reset to the value\n>>                that was present before the attempt was made to set the\n>>                colorspace corresponding to the requested colorimetry.\n>>\n>> Rishikesh Donadkar (5):\n>>    gstreamer: convert from libcamera colorspace to GStreamer colorimetry.\n>>    gstreamer: Update the obtained colorimetry in caps.\n>>    gstreamer: Convert from GStreamer colorimetry to libcamera ColorSpace\n>>    gstreamer: Configure the colorSpace in the Stream configuration.\n>>    gstreamer: Reset the colorSpace if not the same after validation.\n>>\n>>   src/gstreamer/gstlibcamera-utils.cpp | 69 ++++++++++++++++++++++++++++\n>>   src/gstreamer/gstlibcamerasrc.cpp    | 12 +++++\n>>   2 files changed, 81 insertions(+)\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 0AA5FBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 06:19:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6ED0263312;\n\tTue, 12 Jul 2022 08:19:44 +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 1CF7461FAF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 08:19:43 +0200 (CEST)","from [IPV6:2401:4900:1f3f:b3fb:3712:29bf:7855:376e] (unknown\n\t[IPv6:2401:4900:1f3f:b3fb:3712:29bf:7855:376e])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B10630B;\n\tTue, 12 Jul 2022 08:19:41 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657606784;\n\tbh=a0+tf22Ac9jaa4RIUSWKP3c77M4iJTwRn9lzH7fgDzI=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=AlE0o2MQQHsVaFUxXzVYHngcmhfVAuDIgBK4QCENvZuqCXByRCjFBVaGDQKwWGhs3\n\tgWKq4qs0HD1EkZCPrD37wPpKmhsnn48JlesYihBlrGUUYa4EVGlm4hjkzjCQJVA2M/\n\tWH0OnyjGjbdD2npAeyME2EiBH6wGLQ77wQcdqr8ZaC8YZKUm79TW7P0XJadob+ruyT\n\tHE/8YqpWnH8wuPnpsPUhfmqMEOA1EwOoStHsQ+HWf06O7uuuA4VnP1nl7JzG1eegAz\n\tzXLmSrTyE1ffj4CEXrABRmVwpV5L0zQ6OOFdej+vonOtxCWkJwG4MYftkAVgrJBgnh\n\tt+vJJrnlw+1eA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1657606782;\n\tbh=a0+tf22Ac9jaa4RIUSWKP3c77M4iJTwRn9lzH7fgDzI=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=JmkjoHGxfFTfE3S40jcXwDBgJAdkAeRMino2v8gvK/78UOsU6EPILbfTQY5pGvGsX\n\tXx6S990QYFjUFbKTIOWLye8rMrdwRTPbAhxY6NWULGXzpA65Z9S7awFGyUTHFcqAS4\n\tXT91+H0IZSlVBbrcMeZiRPthPH5zqovyuoUZd85c="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"JmkjoHGx\"; dkim-atps=neutral","Message-ID":"<bcf20fc4-fed5-0af5-a39d-9af4c154fd7f@ideasonboard.com>","Date":"Tue, 12 Jul 2022 11:49:36 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>,\n\tRishikesh Donadkar <rishikeshdonadkar@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>\n\t<f946a59131a8f7f9bfb58f52499ffa31c3a831b0.camel@collabora.com>","In-Reply-To":"<f946a59131a8f7f9bfb58f52499ffa31c3a831b0.camel@collabora.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"vedantparanjape160201@gmail.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":23841,"web_url":"https://patchwork.libcamera.org/comment/23841/","msgid":"<bed5d0c9b4709ba27db16c8c28686ac4a8bc8987.camel@collabora.com>","date":"2022-07-12T16:20:11","subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","submitter":{"id":31,"url":"https://patchwork.libcamera.org/api/people/31/","name":"Nicolas Dufresne","email":"nicolas.dufresne@collabora.com"},"content":"Le mardi 12 juillet 2022 à 11:49 +0530, Umang Jain via libcamera-devel a écrit :\n> Hi Nicolas,\n> \n> Thank you for the feedback.\n> \n> On 7/11/22 23:02, Nicolas Dufresne via libcamera-devel wrote:\n> > Hi Rishikesh,\n> > \n> > I'm still uneasy on the design decision you are taking in this entire series.\n> > I'm always available on IRC for discussions if you need to.\n> > \n> > In general, your approach seems to only take a subset of libcamera and gstreamer\n> > (the well known colorspace names). I would personally completely ignore these\n> > user friendly goodies and just map four lower level enums: range, matrix,\n> > transfer function and primaries. This way, we can map the full range of options\n> > without ever having to update the code everytime something new is used by some\n> > hardware. GStreamer will transparently translate this to a \"well-known-name\" in\n> > caps.\n> \n> \n> So, you prefer to breaking down the GST_VIDEO_COLORIMETRY to lower enums \n> and create a libcamera::Colorspace out of it?\n> \n> I assumed that the GStreamer would need to work only on standard \n> colorspaces on both libcamera and GStreamer's side and we don't need to \n> carry all the lower level enums mapping in GStreamer element.\n\nGStreamer have no strict requirement in this regard. There is a software\nconverter that should handle all the valid combination if converting is needed.\n\n> \n> But your point of being able to use it when something new is used, is \n> good. So in that context, I agree on breaking it down to lower enums and \n> creating a libcamera::Colorspace  out of it. My only worry in that case \n> is that the assembled Colorspace might have one or more lower levels \n> enums as \"Invalid\" (i.e. not present in libcamera's colorspace.cpp) and \n> we proceed with such a Colorspace to be applied on the sensor?\n\nIf you found no match with what downstream have selected (no intersection), you\nshould fail the negotiation. Though, in general, downstream filter will only\nsuggest a default and leave it open for other values to be used.\n\n> \n> Should we allow this? Or should we check if the constructed colorspace \n> belongs to a list of standard colorspaces (I sent a \n> isStandardColorSpace() helper patch on the list). Any thoughts?\n> \n> \n> > \n> > regards,\n> > Nicolas\n> > \n> > Le lundi 11 juillet 2022 à 21:07 +0530, Rishikesh Donadkar a écrit :\n> > > This series aims to add colorimetry support to the libcamera gstreamer\n> > > element.\n> > > \n> > > If colorimetry is specified by the user in the gstreamer pipeline, try to\n> > > apply the libcamera colorspace corresponding to the GStreamer colorimetry\n> > > to the camera if the colorspace passes the validation then push the\n> > > colorimetry corresponding to the valid colorspace in the caps.\n> > > If the colorimetry pushed into the caps is same as requested negotiation\n> > > will succeed, else negotiation will fail.\n> > > \n> > > If no colorimetry is specified by the user in the gstreamer pipeline,\n> > > push the GStreamer colorimetry corresponding to the current colorspace\n> > > applied to the camera into the caps and the negotiation will be take\n> > > care of by the gstreamer. If the colorimetry corresponding to the current\n> > > libcamera colorspace is not available in gstreamer then remove the\n> > > colorimetry field if present in the caps.\n> > > \n> > > [PATCH 1/5] - Made a verbose commit message. Introduced a new helper function\n> > >                for converting std::string representation of colorimetry into\n> > >                G_STRING_TYPE. Removed unnecessary g_free(). Removed the std::optional\n> > >                wrapper around the colorSpace when converting into colorspace and\n> > >                passed the value of the colorSpace instead to the function as it is\n> > >                checked to have value before passing to the function.\n> > >                Eliminated the code which was checking if the colorimetry is valid\n> > >                colorimetry will be valid always because we are working with predefined\n> > >                colorimetries in gstreamer.\n> > > \n> > > [PATCH 2/5] - Simplified the if-else block. Eliminated the code where colorimetry\n> > >                was set to nullptr when it was not known. Insted the field is left\n> > >                unset. If the field is present and is unset then remove the field.\n> > > \n> > > [PATCH 3/5] - colorSpace was passed by reference as a function argument in the\n> > >                function colorimetry_form_colorspace(), Changed the function to\n> > >                return the colorspace instead and setting the colorspace in the\n> > >                StreamConfiguration was done after the colorspace is returned from\n> > >                the function. The local functions that were used in the same file\n> > >                were declared static.\n> > > \n> > > [PATCH 4/5] - Made the changes required due to the changes made in patch 3\n> > > \n> > > [PATCH 5/5] - If the camera cannot deliver the colorspace requested in the\n> > >                gstreamer pipeline then the colorspace is reset to the value\n> > >                that was present before the attempt was made to set the\n> > >                colorspace corresponding to the requested colorimetry.\n> > > \n> > > Rishikesh Donadkar (5):\n> > >    gstreamer: convert from libcamera colorspace to GStreamer colorimetry.\n> > >    gstreamer: Update the obtained colorimetry in caps.\n> > >    gstreamer: Convert from GStreamer colorimetry to libcamera ColorSpace\n> > >    gstreamer: Configure the colorSpace in the Stream configuration.\n> > >    gstreamer: Reset the colorSpace if not the same after validation.\n> > > \n> > >   src/gstreamer/gstlibcamera-utils.cpp | 69 ++++++++++++++++++++++++++++\n> > >   src/gstreamer/gstlibcamerasrc.cpp    | 12 +++++\n> > >   2 files changed, 81 insertions(+)\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 99C9FBD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 12 Jul 2022 16:20:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 027E36330B;\n\tTue, 12 Jul 2022 18:20:23 +0200 (CEST)","from madras.collabora.co.uk (madras.collabora.co.uk\n\t[46.235.227.172])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37C2860402\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 12 Jul 2022 18:20:21 +0200 (CEST)","from nicolas-tpx395.localdomain (192-222-136-102.qc.cable.ebox.net\n\t[192.222.136.102])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256)\n\t(No client certificate requested) (Authenticated sender: nicolas)\n\tby madras.collabora.co.uk (Postfix) with ESMTPSA id 40A9566018EA;\n\tTue, 12 Jul 2022 17:20:20 +0100 (BST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657642823;\n\tbh=MBJvCrOXuV8YCe4kJ2Pf651lVy/hnSJBxwLSeAs+WO0=;\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:Cc:\n\tFrom;\n\tb=vPHIHnhP4ajtM0pEOqkVD6ffmhe/T7ENnCJm55pGpIfcB4qfGeb2lO9+IwkN86Elo\n\tAequhZJpROYuouTO9xl0MMvDEEndbU4FC6Wjyf9RLcFsr0C+1FxXdzEwAYkPY0Gv1V\n\tw7rvD0oj0XmbC04cAeqYMQRaTCwioJAOV58h6RD0957jNudZMH0xpXEpEh5KdJL85A\n\tBkv1x0nx90+By5IuNJ3ePEKW8/jZZPbtDvBHjwthhR7JpwqwbCOBfDzcF7MBDvsc4q\n\tqn1yKWLgux1P78GMwsceR+qlbt4Be/ARMAKPOdKt0KO5xprh838F87R8lhI3z0GZ+F\n\tY7xb8C8pOucqQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;\n\ts=mail; t=1657642820;\n\tbh=MBJvCrOXuV8YCe4kJ2Pf651lVy/hnSJBxwLSeAs+WO0=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=BY2PpAxpOoyURuWIcQ4OcA7Fdoxi7nLc5vp5Q6lDFCsLlfsRpdRfUHWCoP9EjXgK7\n\tziIv9Vaso2K7FwWxgW505f+cAKrx2eMYBPqrTMfjdBNwewgmgD21Yk4xvrAtkw1t6H\n\tqKOfVdy/5T3I8sXiXF2+3/8D3+WfUYVPO6FZdLioTAtqWqYNsVREPnT2tCgT2uK+zT\n\tSAaUjfxF5s+aMjy80fRPkotO5SL/PGFTssk78Ww9UFZ8x/mL+wnte00M2sHWDzGl5x\n\t23a4sdRiWqnKuRlFOOHF8Ha9GNPYYQeaDwZiK2GczDO71JtHKiOiyss1lK9BQe9yiz\n\tt5Xzw0bylZd2w=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=collabora.com\n\theader.i=@collabora.com\n\theader.b=\"BY2PpAxp\"; dkim-atps=neutral","Message-ID":"<bed5d0c9b4709ba27db16c8c28686ac4a8bc8987.camel@collabora.com>","To":"Umang Jain <umang.jain@ideasonboard.com>, Rishikesh Donadkar\n\t<rishikeshdonadkar@gmail.com>, libcamera-devel@lists.libcamera.org","Date":"Tue, 12 Jul 2022 12:20:11 -0400","In-Reply-To":"<bcf20fc4-fed5-0af5-a39d-9af4c154fd7f@ideasonboard.com>","References":"<20220711153711.36679-1-rishikeshdonadkar@gmail.com>\n\t<f946a59131a8f7f9bfb58f52499ffa31c3a831b0.camel@collabora.com>\n\t<bcf20fc4-fed5-0af5-a39d-9af4c154fd7f@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Content-Transfer-Encoding":"quoted-printable","User-Agent":"Evolution 3.44.2 (3.44.2-1.fc36) ","MIME-Version":"1.0","Subject":"Re: [libcamera-devel] [PATCH v3 0/5] Add colorimetry support to\n\tlibcamera gstreamer element.","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":"Nicolas Dufresne via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Nicolas Dufresne <nicolas.dufresne@collabora.com>","Cc":"vedantparanjape160201@gmail.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]