[v7,08/15] libcamera: controls: Define a new core Hue control
diff mbox series

Message ID 20260213-kbingham-quantizers-v7-8-1626b9aaabf1@ideasonboard.com
State Accepted
Headers show
Series
  • libipa: Introduce a Quantized type
Related show

Commit Message

Kieran Bingham Feb. 13, 2026, 4:57 p.m. UTC
From: "van Veen, Stephan" <stephan.vanveen@karlstorz.com>

Define a new control to support configuration of Hue adjustments when
supported by the available platform.

Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>
[Kieran: Rework to define as a rotation in degrees]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

---
v5:
 - Reworked control definition and direction
---
 src/libcamera/control_ids_core.yaml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Paul Elder Feb. 19, 2026, 8:58 a.m. UTC | #1
Quoting Kieran Bingham (2026-02-14 01:57:47)
> From: "van Veen, Stephan" <stephan.vanveen@karlstorz.com>
> 
> Define a new control to support configuration of Hue adjustments when
> supported by the available platform.
> 
> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
> Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>
> [Kieran: Rework to define as a rotation in degrees]
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> 
> ---
> v5:
>  - Reworked control definition and direction
> ---
>  src/libcamera/control_ids_core.yaml | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml
> index f26a1b1b08bd..6df4bc9a0372 100644
> --- a/src/libcamera/control_ids_core.yaml
> +++ b/src/libcamera/control_ids_core.yaml
> @@ -1361,4 +1361,19 @@ controls:
>        description: |
>          Enable or disable the lens shading correction.
>  
> +  - Hue:
> +      type: float
> +      direction: inout
> +      description: |
> +        Adjusts the image hue (colour rotation) in degrees, as defined in
> +        the HSL/HSV colour model.
> +
> +        The value represents a rotation around the hue circle in HSL/HSV space:
> +        positive values rotate hues clockwise (for example a +60° turns
> +        Red hues to Yellow hues), and negative values rotate counter-clockwise
> +        (a -60° turns Red hues to Magenta hues).
> +
> +        The nominal range is [-180, 180[, where 0° leaves hues unchanged and the
> +        range wraps around continuously, with 180° == -180°.
> +
>  ...
> 
> -- 
> 2.52.0
>
Laurent Pinchart Feb. 19, 2026, 12:02 p.m. UTC | #2
On Fri, Feb 13, 2026 at 04:57:47PM +0000, Kieran Bingham wrote:
> From: "van Veen, Stephan" <stephan.vanveen@karlstorz.com>
> 
> Define a new control to support configuration of Hue adjustments when
> supported by the available platform.
> 
> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
> Signed-off-by: van Veen, Stephan <stephan.vanveen@karlstorz.com>
> [Kieran: Rework to define as a rotation in degrees]
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> v5:
>  - Reworked control definition and direction
> ---
>  src/libcamera/control_ids_core.yaml | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml
> index f26a1b1b08bd..6df4bc9a0372 100644
> --- a/src/libcamera/control_ids_core.yaml
> +++ b/src/libcamera/control_ids_core.yaml
> @@ -1361,4 +1361,19 @@ controls:
>        description: |
>          Enable or disable the lens shading correction.
>  
> +  - Hue:
> +      type: float
> +      direction: inout
> +      description: |
> +        Adjusts the image hue (colour rotation) in degrees, as defined in
> +        the HSL/HSV colour model.
> +
> +        The value represents a rotation around the hue circle in HSL/HSV space:
> +        positive values rotate hues clockwise (for example a +60° turns
> +        Red hues to Yellow hues), and negative values rotate counter-clockwise
> +        (a -60° turns Red hues to Magenta hues).
> +
> +        The nominal range is [-180, 180[, where 0° leaves hues unchanged and the
> +        range wraps around continuously, with 180° == -180°.
> +
>  ...

Patch
diff mbox series

diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml
index f26a1b1b08bd..6df4bc9a0372 100644
--- a/src/libcamera/control_ids_core.yaml
+++ b/src/libcamera/control_ids_core.yaml
@@ -1361,4 +1361,19 @@  controls:
       description: |
         Enable or disable the lens shading correction.
 
+  - Hue:
+      type: float
+      direction: inout
+      description: |
+        Adjusts the image hue (colour rotation) in degrees, as defined in
+        the HSL/HSV colour model.
+
+        The value represents a rotation around the hue circle in HSL/HSV space:
+        positive values rotate hues clockwise (for example a +60° turns
+        Red hues to Yellow hues), and negative values rotate counter-clockwise
+        (a -60° turns Red hues to Magenta hues).
+
+        The nominal range is [-180, 180[, where 0° leaves hues unchanged and the
+        range wraps around continuously, with 180° == -180°.
+
 ...