[v2,15/17] ipa: rkisp1: awb: Set rgb mean limits to 180
diff mbox series

Message ID 20250319161152.63625-16-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • Some rkisp1 awb improvements
Related show

Commit Message

Stefan Klug March 19, 2025, 4:11 p.m. UTC
Set the mean limits to 180 to get reasonably good results from the rgb
estimations. This is only for internal development as there is no code
path to enable rgb estimations at runtime.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

---

Changes in v2:
- None
---
 src/ipa/rkisp1/algorithms/awb.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kieran Bingham March 31, 2025, 5:51 p.m. UTC | #1
Quoting Stefan Klug (2025-03-19 16:11:20)
> Set the mean limits to 180 to get reasonably good results from the rgb
> estimations. This is only for internal development as there is no code
> path to enable rgb estimations at runtime.
> 

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

> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> 
> ---
> 
> Changes in v2:
> - None
> ---
>  src/ipa/rkisp1/algorithms/awb.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index 149c6aa59c8d..324bc14b42a0 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -261,9 +261,9 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,
>                  * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other
>                  * values are not used, set them to 0.
>                  */
> -               awbConfig->awb_ref_cr = 250;
> -               awbConfig->min_y = 250;
> -               awbConfig->awb_ref_cb = 250;
> +               awbConfig->awb_ref_cr = 180;
> +               awbConfig->min_y = 180;
> +               awbConfig->awb_ref_cb = 180;
>  
>                 awbConfig->max_y = 0;
>                 awbConfig->min_c = 0;
> -- 
> 2.43.0
>
Laurent Pinchart April 1, 2025, 1:43 a.m. UTC | #2
Hi Stefan,

Thank you for the patch.

On Wed, Mar 19, 2025 at 05:11:20PM +0100, Stefan Klug wrote:
> Set the mean limits to 180 to get reasonably good results from the rgb
> estimations. This is only for internal development as there is no code
> path to enable rgb estimations at runtime.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

Could you add a short explanation here about why 180 is better than 250
?

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
> Changes in v2:
> - None
> ---
>  src/ipa/rkisp1/algorithms/awb.cpp | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index 149c6aa59c8d..324bc14b42a0 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -261,9 +261,9 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,
>  		 * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other
>  		 * values are not used, set them to 0.
>  		 */
> -		awbConfig->awb_ref_cr = 250;
> -		awbConfig->min_y = 250;
> -		awbConfig->awb_ref_cb = 250;
> +		awbConfig->awb_ref_cr = 180;
> +		awbConfig->min_y = 180;
> +		awbConfig->awb_ref_cb = 180;
>  
>  		awbConfig->max_y = 0;
>  		awbConfig->min_c = 0;

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index 149c6aa59c8d..324bc14b42a0 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -261,9 +261,9 @@  void Awb::prepare(IPAContext &context, const uint32_t frame,
 		 * awb_ref_cr, awb_min_y and awb_ref_cb respectively. The other
 		 * values are not used, set them to 0.
 		 */
-		awbConfig->awb_ref_cr = 250;
-		awbConfig->min_y = 250;
-		awbConfig->awb_ref_cb = 250;
+		awbConfig->awb_ref_cr = 180;
+		awbConfig->min_y = 180;
+		awbConfig->awb_ref_cb = 180;
 
 		awbConfig->max_y = 0;
 		awbConfig->min_c = 0;