[{"id":36880,"web_url":"https://patchwork.libcamera.org/comment/36880/","msgid":"<176346965454.880260.3666007087990626519@isaac-ThinkPad-T16-Gen-2>","date":"2025-11-18T12:40:54","subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","submitter":{"id":215,"url":"https://patchwork.libcamera.org/api/people/215/","name":"Isaac Scott","email":"isaac.scott@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch!\n\nReviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\nQuoting Kieran Bingham (2025-11-14 00:54:18)\n> From: \"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>\n> \n> Define a new control to support configuration of Hue adjustments when\n> supported by the available platform.\n> \n> Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>\n> [Kieran: Rework to define as a rotation in degrees]\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/control_ids_core.yaml | 13 +++++++++++++\n>  1 file changed, 13 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> index f781865859ac..4993da14b3f6 100644\n> --- a/src/libcamera/control_ids_core.yaml\n> +++ b/src/libcamera/control_ids_core.yaml\n> @@ -1346,4 +1346,17 @@ controls:\n>          reduces the WdrExposureValue until the amount of pixels that are close\n>          to saturation is lower than this value.\n>  \n> +  - Hue:\n> +      type: float\n> +      direction: inout\n> +      description: |\n> +        Adjusts the image hue (colour rotation) in degrees.\n> +\n> +        The value specifies a rotation around the colour wheel:\n> +        positive values rotate hues counter-clockwise (for example a +60 degree\n> +        rotation turns Red hues to Magenta hues), and negative values rotate\n> +        clockwise (a -60 degree rotation turns Red hues to Yellow hues).\n> +\n> +        A value of 0 leaves the hue unchanged.\n> +\n>  ...\n> -- \n> 2.51.1\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 EB817BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 18 Nov 2025 12:40:59 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9ECB360AA4;\n\tTue, 18 Nov 2025 13:40:59 +0100 (CET)","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 0A160606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 18 Nov 2025 13:40:58 +0100 (CET)","from thinkpad.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E926FD52;\n\tTue, 18 Nov 2025 13:38:53 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"vrOMNhZM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763469534;\n\tbh=macSBfH1wJdCeH5l61LLIp2LrojqLZYVhniCT83xfCY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=vrOMNhZMjelvChUZZ7FTtdIdfii/CJm3znB+zWmn18hKtZrH6VK3qMp9V1dcQJXO6\n\tP1xPUEcDUDxJzvpbe8VyqUry4CVMBbpKV0k1Sr+ImIbLtFRiMA7J0oGphQLmNe7efC\n\t7gnLLm2yzy4weS9CM7bmv0UC21q3Rm1c9DEVIS7w=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251114005428.90024-15-kieran.bingham@ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-15-kieran.bingham@ideasonboard.com>","Subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","From":"Isaac Scott <isaac.scott@ideasonboard.com>","Cc":"\"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 18 Nov 2025 12:40:54 +0000","Message-ID":"<176346965454.880260.3666007087990626519@isaac-ThinkPad-T16-Gen-2>","User-Agent":"alot/0.10","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":36902,"web_url":"https://patchwork.libcamera.org/comment/36902/","msgid":"<20251119043033.GD17526@pendragon.ideasonboard.com>","date":"2025-11-19T04:30:33","subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Nov 14, 2025 at 12:54:18AM +0000, Kieran Bingham wrote:\n> From: \"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>\n> \n> Define a new control to support configuration of Hue adjustments when\n> supported by the available platform.\n> \n> Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>\n> [Kieran: Rework to define as a rotation in degrees]\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/control_ids_core.yaml | 13 +++++++++++++\n>  1 file changed, 13 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> index f781865859ac..4993da14b3f6 100644\n> --- a/src/libcamera/control_ids_core.yaml\n> +++ b/src/libcamera/control_ids_core.yaml\n> @@ -1346,4 +1346,17 @@ controls:\n>          reduces the WdrExposureValue until the amount of pixels that are close\n>          to saturation is lower than this value.\n>  \n> +  - Hue:\n> +      type: float\n> +      direction: inout\n> +      description: |\n> +        Adjusts the image hue (colour rotation) in degrees.\n> +\n> +        The value specifies a rotation around the colour wheel:\n\nA reference to HSV/HSL would be good. I'm not sure \"colour wheel\" is\nsuch a standard term.\n\n> +        positive values rotate hues counter-clockwise (for example a +60 degree\n> +        rotation turns Red hues to Magenta hues), and negative values rotate\n> +        clockwise (a -60 degree rotation turns Red hues to Yellow hues).\n\nWhat's the expected range for this control, ]-180, 180] or [-180, 180[ ?\n\n> +\n> +        A value of 0 leaves the hue unchanged.\n> +\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 3E709C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Nov 2025 04:31:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD90160A9E;\n\tWed, 19 Nov 2025 05:31:08 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BED1C609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Nov 2025 05:31:07 +0100 (CET)","from pendragon.ideasonboard.com (unknown [205.220.129.225])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id DF2ED14B0; \n\tWed, 19 Nov 2025 05:29:00 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"sXhTIipn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763526543;\n\tbh=6DVHdFuvqb3KsPv9CTGQBwyRNGpdhJslR31yTukV0aE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sXhTIipnfJHT12ANqqA2yaPynwZTtdTEu5Cnr0dlmy3fh/aLKAOU9I1SeaQQneGYq\n\tqvoQIrF/ak9mr6EYknGYrnZzTmmque+vHF5BVhvn/O8qnW0oY7lK38f0Z/J0bq+twJ\n\tuxNYouKvuksMhWO8RAG+L8SVdpQyMv2OeSU6Df9U=","Date":"Wed, 19 Nov 2025 13:30:33 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>,\n\t\"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>","Subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","Message-ID":"<20251119043033.GD17526@pendragon.ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-15-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251114005428.90024-15-kieran.bingham@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":36920,"web_url":"https://patchwork.libcamera.org/comment/36920/","msgid":"<176356607575.1127434.2425221632140995164@ping.linuxembedded.co.uk>","date":"2025-11-19T15:27:55","subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-11-19 04:30:33)\n> On Fri, Nov 14, 2025 at 12:54:18AM +0000, Kieran Bingham wrote:\n> > From: \"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>\n> > \n> > Define a new control to support configuration of Hue adjustments when\n> > supported by the available platform.\n> > \n> > Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>\n> > [Kieran: Rework to define as a rotation in degrees]\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  src/libcamera/control_ids_core.yaml | 13 +++++++++++++\n> >  1 file changed, 13 insertions(+)\n> > \n> > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > index f781865859ac..4993da14b3f6 100644\n> > --- a/src/libcamera/control_ids_core.yaml\n> > +++ b/src/libcamera/control_ids_core.yaml\n> > @@ -1346,4 +1346,17 @@ controls:\n> >          reduces the WdrExposureValue until the amount of pixels that are close\n> >          to saturation is lower than this value.\n> >  \n> > +  - Hue:\n> > +      type: float\n> > +      direction: inout\n> > +      description: |\n> > +        Adjusts the image hue (colour rotation) in degrees.\n> > +\n> > +        The value specifies a rotation around the colour wheel:\n> \n> A reference to HSV/HSL would be good. I'm not sure \"colour wheel\" is\n> such a standard term.\n\nAttempt below:\n> > +        positive values rotate hues counter-clockwise (for example a +60 degree\n> > +        rotation turns Red hues to Magenta hues), and negative values rotate\n> > +        clockwise (a -60 degree rotation turns Red hues to Yellow hues).\n> \n> What's the expected range for this control, ]-180, 180] or [-180, 180[ ?\n\nBeing circular - I think it shouldn't matter. So [-180, 180] where both\n-180 and 180 are an identical adjustment. Looking at how fixed point\ntypes get represented, if you force me to pick one of the above I'd take\n[-180, 180[.\n\nOr maybe someone might really prefer a syntax of ]-360, 360[ and who are\nwe to stop them only going round in one direction?\n\nBut it's likely hardware specific, and should be conveyed through the\nControlInfo as is done by the implementation in RKISP1 which is only\n[-90, 90[\n\nSo I do not really want to specify limits or expected range here, but if\nit's helpful:\n\n> > +\n> > +        A value of 0 leaves the hue unchanged.\n> > +\n\n\nHow about:\n\nAdjusts the image hue (colour rotation) in degrees, as defined in\nthe HSL/HSV colour model.\n\nThe value represents a rotation around the hue circle in HSL/HSV space:\npositive values rotate hues counter-clockwise (for example a +60° turns\nRed hues to Magenta hues), and negative values rotate clockwise (a -60°\nturns Red hues to Yellow hues).\n\nThe nominal range is [-180, 180[, where 0° leaves hues unchanged and the\nrange wraps around continuously, with 180° == -180°.\n\nA value of 0 leaves the hue unchanged.\n\n\n\n> >  ...\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 AE32ABD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Nov 2025 15:28:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 81273609D8;\n\tWed, 19 Nov 2025 16:28:01 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D015606A0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Nov 2025 16:27:59 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 605A6E7C;\n\tWed, 19 Nov 2025 16:25:54 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mhYQg1al\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763565954;\n\tbh=JEgrLscYxGqTODtChR9QcG/NIwdm7iZN4E/5KftQ3ak=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=mhYQg1al5CZw6+XhQ74q6jGV49SLRMlal27w+z4Dl49Hcba/WuEqwQrJJiR5qAvGp\n\t1ud19ibtULensndi5l03bjKYnq5CZBZN9VevRO6lKwtOgoNqi72Rf74xb5t5kw3vZV\n\trncBBtzSguv8gsqmufPX52XKOyYEQD4eqiMNUB2c=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251119043033.GD17526@pendragon.ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-15-kieran.bingham@ideasonboard.com>\n\t<20251119043033.GD17526@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, \"van Veen,\n\tStephan\" <stephan.vanveen@karlstorz.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Wed, 19 Nov 2025 15:27:55 +0000","Message-ID":"<176356607575.1127434.2425221632140995164@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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":36926,"web_url":"https://patchwork.libcamera.org/comment/36926/","msgid":"<20251120014439.GE10711@pendragon.ideasonboard.com>","date":"2025-11-20T01:44:39","subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Wed, Nov 19, 2025 at 03:27:55PM +0000, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2025-11-19 04:30:33)\n> > On Fri, Nov 14, 2025 at 12:54:18AM +0000, Kieran Bingham wrote:\n> > > From: \"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>\n> > > \n> > > Define a new control to support configuration of Hue adjustments when\n> > > supported by the available platform.\n> > > \n> > > Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>\n> > > [Kieran: Rework to define as a rotation in degrees]\n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > ---\n> > >  src/libcamera/control_ids_core.yaml | 13 +++++++++++++\n> > >  1 file changed, 13 insertions(+)\n> > > \n> > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > index f781865859ac..4993da14b3f6 100644\n> > > --- a/src/libcamera/control_ids_core.yaml\n> > > +++ b/src/libcamera/control_ids_core.yaml\n> > > @@ -1346,4 +1346,17 @@ controls:\n> > >          reduces the WdrExposureValue until the amount of pixels that are close\n> > >          to saturation is lower than this value.\n> > >  \n> > > +  - Hue:\n> > > +      type: float\n> > > +      direction: inout\n> > > +      description: |\n> > > +        Adjusts the image hue (colour rotation) in degrees.\n> > > +\n> > > +        The value specifies a rotation around the colour wheel:\n> > \n> > A reference to HSV/HSL would be good. I'm not sure \"colour wheel\" is\n> > such a standard term.\n> \n> Attempt below:\n> > > +        positive values rotate hues counter-clockwise (for example a +60 degree\n> > > +        rotation turns Red hues to Magenta hues), and negative values rotate\n> > > +        clockwise (a -60 degree rotation turns Red hues to Yellow hues).\n> > \n> > What's the expected range for this control, ]-180, 180] or [-180, 180[ ?\n> \n> Being circular - I think it shouldn't matter. So [-180, 180] where both\n> -180 and 180 are an identical adjustment. Looking at how fixed point\n> types get represented, if you force me to pick one of the above I'd take\n> [-180, 180[.\n> \n> Or maybe someone might really prefer a syntax of ]-360, 360[ and who are\n> we to stop them only going round in one direction?\n> \n> But it's likely hardware specific, and should be conveyed through the\n> ControlInfo as is done by the implementation in RKISP1 which is only\n> [-90, 90[\n\nThe limits will be hardware-specific, as you mentioned the RKISP1 can't\nshift by more than 90° in each direction (not entirely sure why). I\nthink it's best if we standardize the maximum range though, as that will\nmake things easier for applications. It's trivial for an IPA module to\nthen convert to hardware values.\n\n[-180, 180[ seems to be a good range.\n\n> So I do not really want to specify limits or expected range here, but if\n> it's helpful:\n> \n> > > +\n> > > +        A value of 0 leaves the hue unchanged.\n> > > +\n> \n> How about:\n> \n> Adjusts the image hue (colour rotation) in degrees, as defined in\n> the HSL/HSV colour model.\n> \n> The value represents a rotation around the hue circle in HSL/HSV space:\n> positive values rotate hues counter-clockwise (for example a +60° turns\n> Red hues to Magenta hues), and negative values rotate clockwise (a -60°\n> turns Red hues to Yellow hues).\n\nWhere did you get that direction from ? The formulas in\nhttps://en.wikipedia.org/wiki/HSL_and_HSV map 0° to red and 60° to\nyellow.\n\n> The nominal range is [-180, 180[, where 0° leaves hues unchanged and the\n> range wraps around continuously, with 180° == -180°.\n> \n> A value of 0 leaves the hue unchanged.\n\nThis duplicates the previous sentence.\n\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 F0A16BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 Nov 2025 01:45:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6BCB60A8B;\n\tThu, 20 Nov 2025 02:45:04 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 93E6D606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 Nov 2025 02:45:02 +0100 (CET)","from pendragon.ideasonboard.com (fs276ed015.tkyc509.ap.nuro.jp\n\t[39.110.208.21])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 7EF55C77;\n\tThu, 20 Nov 2025 02:42:56 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"sPsSB978\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763602977;\n\tbh=VbUKO8H7SqnAqdkdkvA9oJqK9HRHIG6UuIrI9DF4JNY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=sPsSB978VrkMQQ5I3XPUHYSTIFzHOqT4Spp32kjusi2ikj9rvj/HZr3KC5MIMXjxj\n\tGL456iq1LTTjESgnqBOS2WwS4ipl1DGjJmb/OIUEFHapt3GiTGpxiGFm0tiMg/dfMu\n\tdDnCPZ8PAXqQlQEKt7MLXh+XVQYFfjeNmE8ESOlc=","Date":"Thu, 20 Nov 2025 10:44:39 +0900","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>,\n\t\"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>","Subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","Message-ID":"<20251120014439.GE10711@pendragon.ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-15-kieran.bingham@ideasonboard.com>\n\t<20251119043033.GD17526@pendragon.ideasonboard.com>\n\t<176356607575.1127434.2425221632140995164@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<176356607575.1127434.2425221632140995164@ping.linuxembedded.co.uk>","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":37651,"web_url":"https://patchwork.libcamera.org/comment/37651/","msgid":"<176839554456.1693075.5097306992149681055@ping.linuxembedded.co.uk>","date":"2026-01-14T12:59:04","subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2025-11-20 01:44:39)\n> On Wed, Nov 19, 2025 at 03:27:55PM +0000, Kieran Bingham wrote:\n> > Quoting Laurent Pinchart (2025-11-19 04:30:33)\n> > > On Fri, Nov 14, 2025 at 12:54:18AM +0000, Kieran Bingham wrote:\n> > > > From: \"van Veen, Stephan\" <stephan.vanveen@karlstorz.com>\n> > > > \n> > > > Define a new control to support configuration of Hue adjustments when\n> > > > supported by the available platform.\n> > > > \n> > > > Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>\n> > > > [Kieran: Rework to define as a rotation in degrees]\n> > > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > > > ---\n> > > >  src/libcamera/control_ids_core.yaml | 13 +++++++++++++\n> > > >  1 file changed, 13 insertions(+)\n> > > > \n> > > > diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml\n> > > > index f781865859ac..4993da14b3f6 100644\n> > > > --- a/src/libcamera/control_ids_core.yaml\n> > > > +++ b/src/libcamera/control_ids_core.yaml\n> > > > @@ -1346,4 +1346,17 @@ controls:\n> > > >          reduces the WdrExposureValue until the amount of pixels that are close\n> > > >          to saturation is lower than this value.\n> > > >  \n> > > > +  - Hue:\n> > > > +      type: float\n> > > > +      direction: inout\n> > > > +      description: |\n> > > > +        Adjusts the image hue (colour rotation) in degrees.\n> > > > +\n> > > > +        The value specifies a rotation around the colour wheel:\n> > > \n> > > A reference to HSV/HSL would be good. I'm not sure \"colour wheel\" is\n> > > such a standard term.\n> > \n> > Attempt below:\n> > > > +        positive values rotate hues counter-clockwise (for example a +60 degree\n> > > > +        rotation turns Red hues to Magenta hues), and negative values rotate\n> > > > +        clockwise (a -60 degree rotation turns Red hues to Yellow hues).\n> > > \n> > > What's the expected range for this control, ]-180, 180] or [-180, 180[ ?\n> > \n> > Being circular - I think it shouldn't matter. So [-180, 180] where both\n> > -180 and 180 are an identical adjustment. Looking at how fixed point\n> > types get represented, if you force me to pick one of the above I'd take\n> > [-180, 180[.\n> > \n> > Or maybe someone might really prefer a syntax of ]-360, 360[ and who are\n> > we to stop them only going round in one direction?\n> > \n> > But it's likely hardware specific, and should be conveyed through the\n> > ControlInfo as is done by the implementation in RKISP1 which is only\n> > [-90, 90[\n> \n> The limits will be hardware-specific, as you mentioned the RKISP1 can't\n> shift by more than 90° in each direction (not entirely sure why). I\n> think it's best if we standardize the maximum range though, as that will\n> make things easier for applications. It's trivial for an IPA module to\n> then convert to hardware values.\n> \n> [-180, 180[ seems to be a good range.\n> \n> > So I do not really want to specify limits or expected range here, but if\n> > it's helpful:\n> > \n> > > > +\n> > > > +        A value of 0 leaves the hue unchanged.\n> > > > +\n> > \n> > How about:\n> > \n> > Adjusts the image hue (colour rotation) in degrees, as defined in\n> > the HSL/HSV colour model.\n> > \n> > The value represents a rotation around the hue circle in HSL/HSV space:\n> > positive values rotate hues counter-clockwise (for example a +60° turns\n> > Red hues to Magenta hues), and negative values rotate clockwise (a -60°\n> > turns Red hues to Yellow hues).\n> \n> Where did you get that direction from ? The formulas in\n> https://en.wikipedia.org/wiki/HSL_and_HSV map 0° to red and 60° to\n> yellow.\n\nThe RKISP1 Cproc definitely goes the other way. I've added a negation to\ninvert it now.\n\nUsing https://pinetools.com/adjust-hue-image and loading in a picture of\na colour chart, I can clearly see the hue displacement matches what\nyou've stated above, and is opposite to what the cproc does.\n\nAnyway, that makes me confident to update the text above to match your\nexpectations.\n\n \n> > The nominal range is [-180, 180[, where 0° leaves hues unchanged and the\n> > range wraps around continuously, with 180° == -180°.\n> > \n> > A value of 0 leaves the hue unchanged.\n> \n> This duplicates the previous sentence.\n\nOopsa copy pasta. Ignore the last sentence :D\n\n\n> \n> > > >  ...\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 CC734C3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Jan 2026 12:59:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EA89D61FBC;\n\tWed, 14 Jan 2026 13:59:08 +0100 (CET)","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 AF80C61F9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jan 2026 13:59:07 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B1A781D1C;\n\tWed, 14 Jan 2026 13:58:40 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Bauv7lsa\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768395520;\n\tbh=fIUMA1f6VaZxL6I6dsMiwTuJwHrbM150FMvk7NgsgzU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Bauv7lsaxUfhaCuL+zYJl1BVioRZ7JjoBVszRj672ExZZJx7UKFVSNYBEet680XW4\n\tTaXgh5yUo9tp/meay4ksB3HG/ZluUsXdmVcc3RP1DiiDSCtIg7JewZifIfFafgzps0\n\tHXGoldx84r7zEA10wWtCzWc77d2N+smdk+/i9aiE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251120014439.GE10711@pendragon.ideasonboard.com>","References":"<20251114005428.90024-1-kieran.bingham@ideasonboard.com>\n\t<20251114005428.90024-15-kieran.bingham@ideasonboard.com>\n\t<20251119043033.GD17526@pendragon.ideasonboard.com>\n\t<176356607575.1127434.2425221632140995164@ping.linuxembedded.co.uk>\n\t<20251120014439.GE10711@pendragon.ideasonboard.com>","Subject":"Re: [PATCH v4 14/21] libcamera: controls: Define a new core Hue\n\tcontrol","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>, \"van Veen,\n\tStephan\" <stephan.vanveen@karlstorz.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Wed, 14 Jan 2026 12:59:04 +0000","Message-ID":"<176839554456.1693075.5097306992149681055@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}}]