[libcamera-devel,v4,11/14] ipa: ipu3: Send color temperature in the metadata
diff mbox series

Message ID 20211111140928.136111-12-jeanmichel.hautbois@ideasonboard.com
State Accepted
Headers show
Series
  • IPA: IPU3: Introduce per-frame controls
Related show

Commit Message

Jean-Michel Hautbois Nov. 11, 2021, 2:09 p.m. UTC
Now that the color temperature is updated per-frame, use the value and
set the corresponding controls::ColourTemperature.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/ipa/ipu3/ipu3.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Umang Jain Nov. 12, 2021, 9:45 a.m. UTC | #1
Hi JM

Thank you for the patch.

On 11/11/21 7:39 PM, Jean-Michel Hautbois wrote:
> Now that the color temperature is updated per-frame, use the value and
> set the corresponding controls::ColourTemperature.
>
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>   src/ipa/ipu3/ipu3.cpp | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 38e86e58..d3195de6 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -631,6 +631,16 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>   				(sensorInfo_.pixelRate / 1e6);
>   	ctrls.set(controls::FrameDuration, frameDuration);
>   
> +	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
> +
> +	/*
> +	 * \todo The Metadata provides a path to getting extended data
> +	 * out to the application. Further data such as a simplifed Histogram
> +	 * might have value to be exposed, however such data may be
> +	 * difficult to report in a generically parsable way and we
> +	 * likely want to avoid putting platform specific metadata in.
> +	 */
> +


Should we cover this addition of \todo as part of commit message too, 
not sure.

Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>

>   	IPU3Action op;
>   	op.op = ActionMetadataReady;
>   	op.controls = ctrls;
Paul Elder Nov. 12, 2021, 11:21 p.m. UTC | #2
Hi Jean-Michel,

On Thu, Nov 11, 2021 at 03:09:25PM +0100, Jean-Michel Hautbois wrote:
> Now that the color temperature is updated per-frame, use the value and
> set the corresponding controls::ColourTemperature.
> 
> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

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

> ---
>  src/ipa/ipu3/ipu3.cpp | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 38e86e58..d3195de6 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -631,6 +631,16 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>  				(sensorInfo_.pixelRate / 1e6);
>  	ctrls.set(controls::FrameDuration, frameDuration);
>  
> +	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
> +
> +	/*
> +	 * \todo The Metadata provides a path to getting extended data
> +	 * out to the application. Further data such as a simplifed Histogram
> +	 * might have value to be exposed, however such data may be
> +	 * difficult to report in a generically parsable way and we
> +	 * likely want to avoid putting platform specific metadata in.
> +	 */
> +
>  	IPU3Action op;
>  	op.op = ActionMetadataReady;
>  	op.controls = ctrls;
> -- 
> 2.32.0
>

Patch
diff mbox series

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 38e86e58..d3195de6 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -631,6 +631,16 @@  void IPAIPU3::parseStatistics(unsigned int frame,
 				(sensorInfo_.pixelRate / 1e6);
 	ctrls.set(controls::FrameDuration, frameDuration);
 
+	ctrls.set(controls::ColourTemperature, context_.frameContext.awb.temperatureK);
+
+	/*
+	 * \todo The Metadata provides a path to getting extended data
+	 * out to the application. Further data such as a simplifed Histogram
+	 * might have value to be exposed, however such data may be
+	 * difficult to report in a generically parsable way and we
+	 * likely want to avoid putting platform specific metadata in.
+	 */
+
 	IPU3Action op;
 	op.op = ActionMetadataReady;
 	op.controls = ctrls;