ipa: rkisp1: algorithms: awb: Fix AWB means vector order in RGB mode
diff mbox series

Message ID 20250213193635.114097-1-stefan.klug@ideasonboard.com
State Accepted
Commit d4545edb38e2e58d4231fe83f61d766ca2b730fc
Headers show
Series
  • ipa: rkisp1: algorithms: awb: Fix AWB means vector order in RGB mode
Related show

Commit Message

Stefan Klug Feb. 13, 2025, 7:35 p.m. UTC
Fix the order of the rgbMeans vector that got broken accidentally
during refactoring.  As there is currently no way to enable rgb mode at
runtime it went unnoticed.

Fixes: 29892f1c56c6 ("ipa: libipa: colour: Use the RGB class to model RGB values")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Feb. 13, 2025, 7:41 p.m. UTC | #1
Hi Stefan,

Thank you for the patch.

On Thu, Feb 13, 2025 at 08:35:56PM +0100, Stefan Klug wrote:
> Fix the order of the rgbMeans vector that got broken accidentally
> during refactoring.  As there is currently no way to enable rgb mode at
> runtime it went unnoticed.
> 
> Fixes: 29892f1c56c6 ("ipa: libipa: colour: Use the RGB class to model RGB values")
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

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

> ---
>  src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index cffaa06a22c1..16e829469313 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -245,8 +245,8 @@ void Awb::process(IPAContext &context,
>  
>  	if (rgbMode_) {
>  		rgbMeans = {{
> -			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
>  			static_cast<double>(awb->awb_mean[0].mean_cr_or_r),
> +			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
>  			static_cast<double>(awb->awb_mean[0].mean_cb_or_b)
>  		}};
>  	} else {
Kieran Bingham Feb. 24, 2025, 8:57 p.m. UTC | #2
Quoting Laurent Pinchart (2025-02-13 19:41:38)
> Hi Stefan,
> 
> Thank you for the patch.
> 
> On Thu, Feb 13, 2025 at 08:35:56PM +0100, Stefan Klug wrote:
> > Fix the order of the rgbMeans vector that got broken accidentally
> > during refactoring.  As there is currently no way to enable rgb mode at
> > runtime it went unnoticed.
> > 
> > Fixes: 29892f1c56c6 ("ipa: libipa: colour: Use the RGB class to model RGB values")
> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> 
> > ---
> >  src/ipa/rkisp1/algorithms/awb.cpp | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> > index cffaa06a22c1..16e829469313 100644
> > --- a/src/ipa/rkisp1/algorithms/awb.cpp
> > +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> > @@ -245,8 +245,8 @@ void Awb::process(IPAContext &context,
> >  
> >       if (rgbMode_) {
> >               rgbMeans = {{
> > -                     static_cast<double>(awb->awb_mean[0].mean_y_or_g),
> >                       static_cast<double>(awb->awb_mean[0].mean_cr_or_r),
> > +                     static_cast<double>(awb->awb_mean[0].mean_y_or_g),
> >                       static_cast<double>(awb->awb_mean[0].mean_cb_or_b)
> >               }};
> >       } else {
> 
> -- 
> Regards,
> 
> Laurent Pinchart

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index cffaa06a22c1..16e829469313 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -245,8 +245,8 @@  void Awb::process(IPAContext &context,
 
 	if (rgbMode_) {
 		rgbMeans = {{
-			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
 			static_cast<double>(awb->awb_mean[0].mean_cr_or_r),
+			static_cast<double>(awb->awb_mean[0].mean_y_or_g),
 			static_cast<double>(awb->awb_mean[0].mean_cb_or_b)
 		}};
 	} else {