[libcamera-devel,v3,1/3] ipa: rkisp1: Add enable field for AWB algorithm in IPA context
diff mbox series

Message ID 20220812223351.22609-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Add DPF tuning support for RkISP1
Related show

Commit Message

Laurent Pinchart Aug. 12, 2022, 10:33 p.m. UTC
From: Florian Sylvestre <fsylvestre@baylibre.com>

Add an enable variable in the awb struct in IPASessionConfiguration which
indicates if the awb algorithm has been configured. This will allow other
algorithms to retrieve this information.

Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/awb.cpp | 2 ++
 src/ipa/rkisp1/ipa_context.cpp    | 3 +++
 src/ipa/rkisp1/ipa_context.h      | 1 +
 3 files changed, 6 insertions(+)

Comments

Umang Jain Aug. 15, 2022, 3:53 p.m. UTC | #1
Hi Laurent, Florian

Thank you for the patch.

On 8/13/22 04:03, Laurent Pinchart via libcamera-devel wrote:
> From: Florian Sylvestre <fsylvestre@baylibre.com>
>
> Add an enable variable in the awb struct in IPASessionConfiguration which
> indicates if the awb algorithm has been configured. This will allow other
> algorithms to retrieve this information.
>
> Signed-off-by: Florian Sylvestre <fsylvestre@baylibre.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   src/ipa/rkisp1/algorithms/awb.cpp | 2 ++
>   src/ipa/rkisp1/ipa_context.cpp    | 3 +++
>   src/ipa/rkisp1/ipa_context.h      | 1 +
>   3 files changed, 6 insertions(+)
>
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index 9f00364d12b1..d1328f011081 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -48,6 +48,8 @@ int Awb::configure(IPAContext &context,
>   	context.configuration.awb.measureWindow.h_size = 3 * configInfo.outputSize.width / 4;
>   	context.configuration.awb.measureWindow.v_size = 3 * configInfo.outputSize.height / 4;
>   
> +	context.configuration.awb.enabled = true;
> +
>   	return 0;
>   }
>   
> diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
> index ef8bb8e931c8..23a63f8c6e25 100644
> --- a/src/ipa/rkisp1/ipa_context.cpp
> +++ b/src/ipa/rkisp1/ipa_context.cpp
> @@ -87,6 +87,9 @@ namespace libcamera::ipa::rkisp1 {
>    *
>    * \var IPASessionConfiguration::awb.measureWindow
>    * \brief AWB measure window
> + *
> + * \var IPASessionConfiguration::awb.enabled
> + * \brief Indicates if the AWB hardware is enabled to apply colour gains
>    */
>   
>   /**
> diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
> index 2bdb6a81d7c9..7f7b3e4d88fa 100644
> --- a/src/ipa/rkisp1/ipa_context.h
> +++ b/src/ipa/rkisp1/ipa_context.h
> @@ -29,6 +29,7 @@ struct IPASessionConfiguration {
>   
>   	struct {
>   		struct rkisp1_cif_isp_window measureWindow;
> +		bool enabled;
>   	} awb;
>   
>   	struct {

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index 9f00364d12b1..d1328f011081 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -48,6 +48,8 @@  int Awb::configure(IPAContext &context,
 	context.configuration.awb.measureWindow.h_size = 3 * configInfo.outputSize.width / 4;
 	context.configuration.awb.measureWindow.v_size = 3 * configInfo.outputSize.height / 4;
 
+	context.configuration.awb.enabled = true;
+
 	return 0;
 }
 
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index ef8bb8e931c8..23a63f8c6e25 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -87,6 +87,9 @@  namespace libcamera::ipa::rkisp1 {
  *
  * \var IPASessionConfiguration::awb.measureWindow
  * \brief AWB measure window
+ *
+ * \var IPASessionConfiguration::awb.enabled
+ * \brief Indicates if the AWB hardware is enabled to apply colour gains
  */
 
 /**
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index 2bdb6a81d7c9..7f7b3e4d88fa 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -29,6 +29,7 @@  struct IPASessionConfiguration {
 
 	struct {
 		struct rkisp1_cif_isp_window measureWindow;
+		bool enabled;
 	} awb;
 
 	struct {