[v3,20/39] libcamera: software_isp: awb Populate AWB gains to Debayer params structure
diff mbox series

Message ID 20251015012251.17508-21-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • Add GLES 2.0 GPUISP to libcamera
Related show

Commit Message

Bryan O'Donoghue Oct. 15, 2025, 1:22 a.m. UTC
Populate the white-balance gains table in  awb::prepare(). A copy is made
of the gains in the DebayerParams structure.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/ipa/simple/algorithms/awb.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Kieran Bingham Oct. 15, 2025, 10:47 p.m. UTC | #1
Quoting Bryan O'Donoghue (2025-10-15 02:22:32)
> Populate the white-balance gains table in  awb::prepare(). A copy is made
> of the gains in the DebayerParams structure.
> 

And I think this can be squashed into :

[PATCH v3 19/39] libcamera: software_isp: debayer: Extend DebayerParams to hold a copy of per-frame AWB values

Keeping the order of 18, then 19 so theres' no merge conflict on the
debayer_params.h

With that I think that's 

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

for the combined new patch.



> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>  src/ipa/simple/algorithms/awb.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
> index cf78e980..3c4e5d09 100644
> --- a/src/ipa/simple/algorithms/awb.cpp
> +++ b/src/ipa/simple/algorithms/awb.cpp
> @@ -38,12 +38,14 @@ int Awb::configure(IPAContext &context,
>  void Awb::prepare(IPAContext &context,
>                   [[maybe_unused]] const uint32_t frame,
>                   IPAFrameContext &frameContext,
> -                 [[maybe_unused]] DebayerParams *params)
> +                 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();
> +       /* Latch the AWB gains so GPUISP can consume them. */
> +       params->gains = gains;
>  }
>  
>  void Awb::process(IPAContext &context,
> -- 
> 2.51.0
>
Milan Zamazal Oct. 16, 2025, 9:17 a.m. UTC | #2
Bryan O'Donoghue <bryan.odonoghue@linaro.org> writes:

> Populate the white-balance gains table in  awb::prepare(). A copy is made
> of the gains in the DebayerParams structure.
>
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>

> ---
>  src/ipa/simple/algorithms/awb.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
> index cf78e980..3c4e5d09 100644
> --- a/src/ipa/simple/algorithms/awb.cpp
> +++ b/src/ipa/simple/algorithms/awb.cpp
> @@ -38,12 +38,14 @@ int Awb::configure(IPAContext &context,
>  void Awb::prepare(IPAContext &context,
>  		  [[maybe_unused]] const uint32_t frame,
>  		  IPAFrameContext &frameContext,
> -		  [[maybe_unused]] DebayerParams *params)
> +		  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();
> +	/* Latch the AWB gains so GPUISP can consume them. */
> +	params->gains = gains;
>  }
>  
>  void Awb::process(IPAContext &context,

Patch
diff mbox series

diff --git a/src/ipa/simple/algorithms/awb.cpp b/src/ipa/simple/algorithms/awb.cpp
index cf78e980..3c4e5d09 100644
--- a/src/ipa/simple/algorithms/awb.cpp
+++ b/src/ipa/simple/algorithms/awb.cpp
@@ -38,12 +38,14 @@  int Awb::configure(IPAContext &context,
 void Awb::prepare(IPAContext &context,
 		  [[maybe_unused]] const uint32_t frame,
 		  IPAFrameContext &frameContext,
-		  [[maybe_unused]] DebayerParams *params)
+		  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();
+	/* Latch the AWB gains so GPUISP can consume them. */
+	params->gains = gains;
 }
 
 void Awb::process(IPAContext &context,