[libcamera-devel,20/22] ipa: ipu3: Send color temperature in the metadata
diff mbox series

Message ID 20211108131350.130665-21-jeanmichel.hautbois@ideasonboard.com
State Superseded
Headers show
Series
  • IPA: IPU3: Introduce per-frame controls
Related show

Commit Message

Jean-Michel Hautbois Nov. 8, 2021, 1:13 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>
---
 src/ipa/ipu3/ipu3.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jacopo Mondi Nov. 8, 2021, 2:12 p.m. UTC | #1
Hi Jean-Michel

On Mon, Nov 08, 2021 at 02:13:48PM +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>
> ---
>  src/ipa/ipu3/ipu3.cpp | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
> index 9b20e8ab..ca3f2417 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -696,6 +696,14 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>  				(sensorInfo_.pixelRate / 1e6);
>  	ctrls.set(controls::FrameDuration, frameDuration);
>
> +	ctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);
> +
> +	/*
> +	 * \todo We should be able to add 'anything' (with a Control) in here to
> +	 * get information to say.
> +	 * It can be for debug purposes (qcam) or for any other HAL.
> +	 */
> +

Is this comment a leftover ?

>  	IPU3Action op;
>  	op.op = ActionMetadataReady;
>  	op.controls = ctrls;
> --
> 2.32.0
>
Jean-Michel Hautbois Nov. 10, 2021, 5:58 p.m. UTC | #2
Hi Jacopo,

On 08/11/2021 15:12, Jacopo Mondi wrote:
> Hi Jean-Michel
> 
> On Mon, Nov 08, 2021 at 02:13:48PM +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>
>> ---
>>   src/ipa/ipu3/ipu3.cpp | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
>> index 9b20e8ab..ca3f2417 100644
>> --- a/src/ipa/ipu3/ipu3.cpp
>> +++ b/src/ipa/ipu3/ipu3.cpp
>> @@ -696,6 +696,14 @@ void IPAIPU3::parseStatistics(unsigned int frame,
>>   				(sensorInfo_.pixelRate / 1e6);
>>   	ctrls.set(controls::FrameDuration, frameDuration);
>>
>> +	ctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);
>> +
>> +	/*
>> +	 * \todo We should be able to add 'anything' (with a Control) in here to
>> +	 * get information to say.
>> +	 * It can be for debug purposes (qcam) or for any other HAL.
>> +	 */
>> +
> 
> Is this comment a leftover ?

Not really, I think it is worth saying this is were controls will be 
updated, but perhaps should I reword it somehow ?

> 
>>   	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 9b20e8ab..ca3f2417 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -696,6 +696,14 @@  void IPAIPU3::parseStatistics(unsigned int frame,
 				(sensorInfo_.pixelRate / 1e6);
 	ctrls.set(controls::FrameDuration, frameDuration);
 
+	ctrls.set(controls::ColourTemperature, context_.frameContext->awb.temperatureK);
+
+	/*
+	 * \todo We should be able to add 'anything' (with a Control) in here to
+	 * get information to say.
+	 * It can be for debug purposes (qcam) or for any other HAL.
+	 */
+
 	IPU3Action op;
 	op.op = ActionMetadataReady;
 	op.controls = ctrls;