[libcamera-devel,v2,1/1] libcamera: controls: Add controls for HDR
diff mbox series

Message ID 20230925092136.51550-2-david.plowman@raspberrypi.com
State Accepted
Headers show
Series
  • HDR controls
Related show

Commit Message

David Plowman Sept. 25, 2023, 9:21 a.m. UTC
We add an HdrMode control (to enable and disable HDR processing)
and an HdrChannel, which indicates what kind of HDR frame (short, long
or otherwise) has just arrived.

Currently the HdrMode supports the following values:

* Off - no HDR processing at all.
* MultiExposure - frames at multiple different exposures are combined
  to create HDR images.
* SingleExposure - multiple frames all at the same exposure are
  combined to create HDR images.
* Night - multiple frames will be combined to create "night mode"
  images.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/control_ids.yaml | 55 ++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Comments

David Plowman Sept. 28, 2023, 2:21 p.m. UTC | #1
Oops, there's a typo:

On Mon, 25 Sept 2023 at 10:21, David Plowman
<david.plowman@raspberrypi.com> wrote:
>
> We add an HdrMode control (to enable and disable HDR processing)
> and an HdrChannel, which indicates what kind of HDR frame (short, long
> or otherwise) has just arrived.
>
> Currently the HdrMode supports the following values:
>
> * Off - no HDR processing at all.
> * MultiExposure - frames at multiple different exposures are combined
>   to create HDR images.
> * SingleExposure - multiple frames all at the same exposure are
>   combined to create HDR images.
> * Night - multiple frames will be combined to create "night mode"
>   images.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
> ---
>  src/libcamera/control_ids.yaml | 55 ++++++++++++++++++++++++++++++++++
>  1 file changed, 55 insertions(+)
>
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index f2e542f4..0b4e2462 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -774,6 +774,61 @@ controls:
>              Continuous AF is paused. No further state changes or lens movements
>              will occur until the AfPauseResume control is sent.
>
> +  - HdrMode:
> +      type: int32_t
> +      description: |
> +        Control to set the mode to be used for High Dynamic Range (HDR)
> +        imaging.
> +
> +      enum:
> +        - name: HdrModeOff
> +          value: 0
> +          description: |
> +            HDR is not enabled.
> +        - name: HdrModeMultiExposure
> +          value: 1
> +          description: |
> +            Multiple exposures will be used to create HDR images.
> +        - name: HdrModeSingleExposure
> +          value: 2
> +          description: |
> +            Multiple frames all at a single exposure will be used to create HDR
> +            images.
> +        - name: HdrModeNight
> +          value: 3
> +          description: |
> +            Multiple frames will be combined to produce "night mode" images.
> +
> +  - HdrChannel:
> +      type: int32_t
> +      description: |
> +        This value is reported back to the application so that it can discover
> +        whether this capture corresponds to the short or long exposure image (or
> +        any other image used by the HDR procedure).
> +
> +      enum:
> +        - name: HdrChannelNone
> +          value: 0
> +          description: |
> +            This image does not correspond to any of the captures used to create
> +            an HDR image.
> +        - name: HdrChannelShort
> +          value: 1
> +          description: |
> +            This is a short exposure image.
> +        - name: HdrChannelMedium
> +          value: 2
> +          description: |
> +            This is a medium exposure image.
> +        - name: HdrChannelLong
> +          value: 3
> +          description: |
> +            This is a long exposure image.
> +        - name: HdrChannel Night

s/HdrChannel Night/HdrChannelNight/

Thanks!
David

> +          value: 4
> +          description: |
> +            This frame has been used to produce a "night mode" image.
> +
>    # ----------------------------------------------------------------------------
>    # Draft controls section
>
> --
> 2.30.2
>

Patch
diff mbox series

diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index f2e542f4..0b4e2462 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -774,6 +774,61 @@  controls:
             Continuous AF is paused. No further state changes or lens movements
             will occur until the AfPauseResume control is sent.
 
+  - HdrMode:
+      type: int32_t
+      description: |
+        Control to set the mode to be used for High Dynamic Range (HDR)
+        imaging.
+
+      enum:
+        - name: HdrModeOff
+          value: 0
+          description: |
+            HDR is not enabled.
+        - name: HdrModeMultiExposure
+          value: 1
+          description: |
+            Multiple exposures will be used to create HDR images.
+        - name: HdrModeSingleExposure
+          value: 2
+          description: |
+            Multiple frames all at a single exposure will be used to create HDR
+            images.
+        - name: HdrModeNight
+          value: 3
+          description: |
+            Multiple frames will be combined to produce "night mode" images.
+
+  - HdrChannel:
+      type: int32_t
+      description: |
+        This value is reported back to the application so that it can discover
+        whether this capture corresponds to the short or long exposure image (or
+        any other image used by the HDR procedure).
+
+      enum:
+        - name: HdrChannelNone
+          value: 0
+          description: |
+            This image does not correspond to any of the captures used to create
+            an HDR image.
+        - name: HdrChannelShort
+          value: 1
+          description: |
+            This is a short exposure image.
+        - name: HdrChannelMedium
+          value: 2
+          description: |
+            This is a medium exposure image.
+        - name: HdrChannelLong
+          value: 3
+          description: |
+            This is a long exposure image.
+        - name: HdrChannel Night
+          value: 4
+          description: |
+            This frame has been used to produce a "night mode" image.
+
   # ----------------------------------------------------------------------------
   # Draft controls section