[12/12] ipa: rkisp1: agc: Move AeEnable control to the AGC algorithm
diff mbox series

Message ID 20240616163910.5506-13-laurent.pinchart@ideasonboard.com
State Accepted
Commit 13a8fbeb5c8d10524f357b4f2eb566b7243d0b94
Headers show
Series
  • ipa: rkisp1: Miscellaneous AGC fixes
Related show

Commit Message

Laurent Pinchart June 16, 2024, 4:39 p.m. UTC
The AGC algorithm implements the AeEnable control at runtime. Move the
declaration of the control from the IPA module to the algorithm.

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

Comments

Kieran Bingham June 17, 2024, 9:50 a.m. UTC | #1
Quoting Laurent Pinchart (2024-06-16 17:39:10)
> The AGC algorithm implements the AeEnable control at runtime. Move the
> declaration of the control from the IPA module to the algorithm.
> 

\o/

Progress on removing(reducing) those top level rkisp1Controls


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

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/ipa/rkisp1/algorithms/agc.cpp | 1 +
>  src/ipa/rkisp1/rkisp1.cpp         | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
> index 0018c43f18cf..965030b62de5 100644
> --- a/src/ipa/rkisp1/algorithms/agc.cpp
> +++ b/src/ipa/rkisp1/algorithms/agc.cpp
> @@ -148,6 +148,7 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)
>         if (ret)
>                 return ret;
>  
> +       context.ctrlMap[&controls::AeEnable] = ControlInfo(false, true);
>         context.ctrlMap.merge(controls());
>  
>         return 0;
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index 62d56a3ae44a..d31cdbab020b 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -106,7 +106,6 @@ const IPAHwSettings ipaHwSettingsV12{
>  
>  /* List of controls handled by the RkISP1 IPA */
>  const ControlInfoMap::Map rkisp1Controls{
> -       { &controls::AeEnable, ControlInfo(false, true) },
>         { &controls::AwbEnable, ControlInfo(false, true) },
>         { &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
>         { &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },
> -- 
> Regards,
> 
> Laurent Pinchart
>
Paul Elder June 17, 2024, 10:19 a.m. UTC | #2
On Sun, Jun 16, 2024 at 07:39:10PM +0300, Laurent Pinchart wrote:
> The AGC algorithm implements the AeEnable control at runtime. Move the
> declaration of the control from the IPA module to the algorithm.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  src/ipa/rkisp1/algorithms/agc.cpp | 1 +
>  src/ipa/rkisp1/rkisp1.cpp         | 1 -
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
> index 0018c43f18cf..965030b62de5 100644
> --- a/src/ipa/rkisp1/algorithms/agc.cpp
> +++ b/src/ipa/rkisp1/algorithms/agc.cpp
> @@ -148,6 +148,7 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)
>  	if (ret)
>  		return ret;
>  
> +	context.ctrlMap[&controls::AeEnable] = ControlInfo(false, true);
>  	context.ctrlMap.merge(controls());
>  
>  	return 0;
> diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
> index 62d56a3ae44a..d31cdbab020b 100644
> --- a/src/ipa/rkisp1/rkisp1.cpp
> +++ b/src/ipa/rkisp1/rkisp1.cpp
> @@ -106,7 +106,6 @@ const IPAHwSettings ipaHwSettingsV12{
>  
>  /* List of controls handled by the RkISP1 IPA */
>  const ControlInfoMap::Map rkisp1Controls{
> -	{ &controls::AeEnable, ControlInfo(false, true) },
>  	{ &controls::AwbEnable, ControlInfo(false, true) },
>  	{ &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
>  	{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 0018c43f18cf..965030b62de5 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -148,6 +148,7 @@  int Agc::init(IPAContext &context, const YamlObject &tuningData)
 	if (ret)
 		return ret;
 
+	context.ctrlMap[&controls::AeEnable] = ControlInfo(false, true);
 	context.ctrlMap.merge(controls());
 
 	return 0;
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 62d56a3ae44a..d31cdbab020b 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -106,7 +106,6 @@  const IPAHwSettings ipaHwSettingsV12{
 
 /* List of controls handled by the RkISP1 IPA */
 const ControlInfoMap::Map rkisp1Controls{
-	{ &controls::AeEnable, ControlInfo(false, true) },
 	{ &controls::AwbEnable, ControlInfo(false, true) },
 	{ &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },
 	{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },