libcamera: software_isp: Add a clarification comment to AWB
diff mbox series

Message ID 20250403125355.76062-1-mzamazal@redhat.com
State Accepted
Commit 21088e605c08c3615ed54f234e0333c6d1c8c0e5
Headers show
Series
  • libcamera: software_isp: Add a clarification comment to AWB
Related show

Commit Message

Milan Zamazal April 3, 2025, 12:53 p.m. UTC
The computed AWB gains are applied when constructing LUT tables rather
than in awb.cpp itself.  This can look confusing when reading awb.cpp,
let's add a clarifying comment.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 src/ipa/simple/algorithms/awb.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Kieran Bingham April 4, 2025, 3:44 p.m. UTC | #1
Quoting Milan Zamazal (2025-04-03 13:53:55)
> The computed AWB gains are applied when constructing LUT tables rather
> than in awb.cpp itself.  This can look confusing when reading awb.cpp,
> let's add a clarifying comment.
> 
> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>

I don't object:


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

> ---
>  src/ipa/simple/algorithms/awb.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
> index 55719059..cf567e89 100644
> --- a/src/ipa/simple/algorithms/awb.cpp
> +++ b/src/ipa/simple/algorithms/awb.cpp
> @@ -40,6 +40,7 @@ void Awb::prepare(IPAContext &context,
>                   [[maybe_unused]] DebayerParams *params)
>  {
>         auto &gains = context.activeState.awb.gains;
> +       /* Just report, the gains are applied in LUT algorithm. */
>         frameContext.gains.red = gains.r();
>         frameContext.gains.blue = gains.b();
>  }
> -- 
> 2.49.0
>
Laurent Pinchart April 4, 2025, 5:24 p.m. UTC | #2
On Fri, Apr 04, 2025 at 04:44:43PM +0100, Kieran Bingham wrote:
> Quoting Milan Zamazal (2025-04-03 13:53:55)
> > The computed AWB gains are applied when constructing LUT tables rather
> > than in awb.cpp itself.  This can look confusing when reading awb.cpp,
> > let's add a clarifying comment.
> > 
> > Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
> 
> I don't object:
> 
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

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

> > ---
> >  src/ipa/simple/algorithms/awb.cpp | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
> > index 55719059..cf567e89 100644
> > --- a/src/ipa/simple/algorithms/awb.cpp
> > +++ b/src/ipa/simple/algorithms/awb.cpp
> > @@ -40,6 +40,7 @@ void Awb::prepare(IPAContext &context,
> >                   [[maybe_unused]] DebayerParams *params)
> >  {
> >         auto &gains = context.activeState.awb.gains;
> > +       /* Just report, the gains are applied in LUT algorithm. */
> >         frameContext.gains.red = gains.r();
> >         frameContext.gains.blue = gains.b();
> >  }

Patch
diff mbox series

diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
index 55719059..cf567e89 100644
--- a/src/ipa/simple/algorithms/awb.cpp
+++ b/src/ipa/simple/algorithms/awb.cpp
@@ -40,6 +40,7 @@  void Awb::prepare(IPAContext &context,
 		  [[maybe_unused]] DebayerParams *params)
 {
 	auto &gains = context.activeState.awb.gains;
+	/* Just report, the gains are applied in LUT algorithm. */
 	frameContext.gains.red = gains.r();
 	frameContext.gains.blue = gains.b();
 }