[libcamera-devel,v4,26/32] ipa: rkisp1: awb: Store color temperature as an integer
diff mbox series

Message ID 20220908014200.28728-27-laurent.pinchart@ideasonboard.com
State Superseded
Headers show
Series
  • ipa: Frame context queue, IPU3 & RkISP consolidation, and RkISP1 improvements
Related show

Commit Message

Laurent Pinchart Sept. 8, 2022, 1:41 a.m. UTC
The color temperature doesn't need floating point precision, and is
calculated by Awb::estimateCCT() as an unsigned integer. Store it with
the same data type in the frame context.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/rkisp1/ipa_context.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kieran Bingham Sept. 20, 2022, 11:20 p.m. UTC | #1
Quoting Laurent Pinchart via libcamera-devel (2022-09-08 02:41:54)
> The color temperature doesn't need floating point precision, and is
> calculated by Awb::estimateCCT() as an unsigned integer. Store it with
> the same data type in the frame context.
> 

Excepting that I suspect we don't need to store the colour temperature
in the FrameContext, but it could go directly to metadata ... this is
fine if we don't want to get there yet.


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/ipa/rkisp1/ipa_context.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
> index c15b908afcc8..53787320e565 100644
> --- a/src/ipa/rkisp1/ipa_context.h
> +++ b/src/ipa/rkisp1/ipa_context.h
> @@ -100,7 +100,7 @@ struct RkISP1FrameContext : public FrameContext {
>                         double blue;
>                 } gains;
>  
> -               double temperatureK;
> +               unsigned int temperatureK;
>                 bool autoEnabled;
>         } awb;
>  
> -- 
> Regards,
> 
> Laurent Pinchart
>
Jacopo Mondi Sept. 22, 2022, 10:26 a.m. UTC | #2
Hi Laurent,

On Thu, Sep 08, 2022 at 04:41:54AM +0300, Laurent Pinchart via libcamera-devel wrote:
> The color temperature doesn't need floating point precision, and is
> calculated by Awb::estimateCCT() as an unsigned integer. Store it with
> the same data type in the frame context.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
  j

> ---
>  src/ipa/rkisp1/ipa_context.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
> index c15b908afcc8..53787320e565 100644
> --- a/src/ipa/rkisp1/ipa_context.h
> +++ b/src/ipa/rkisp1/ipa_context.h
> @@ -100,7 +100,7 @@ struct RkISP1FrameContext : public FrameContext {
>  			double blue;
>  		} gains;
>
> -		double temperatureK;
> +		unsigned int temperatureK;
>  		bool autoEnabled;
>  	} awb;
>
> --
> Regards,
>
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index c15b908afcc8..53787320e565 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -100,7 +100,7 @@  struct RkISP1FrameContext : public FrameContext {
 			double blue;
 		} gains;
 
-		double temperatureK;
+		unsigned int temperatureK;
 		bool autoEnabled;
 	} awb;