[v3,21/41] ipa: rksip1: Call libipa::Awb::process() when stats are null
diff mbox series

Message ID 20260914140309.3354666-22-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • rkisp1: pipeline rework for PFC
Related show

Commit Message

Stefan Klug Sept. 14, 2026, 2:02 p.m. UTC
Call process() on the algorithm implementation even without a stats
buffer to ensure that metadata is populated unconditionally.

Print the error only in the case that there was a stats buffer. Having
no stats buffer at all is a legal condition.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/ipa/rkisp1/algorithms/awb.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Barnabás Pőcze Sept. 22, 2026, 2:16 p.m. UTC | #1
2026. 09. 14. 16:02 keltezéssel, Stefan Klug írta:
> Call process() on the algorithm implementation even without a stats
> buffer to ensure that metadata is populated unconditionally.
> 
> Print the error only in the case that there was a stats buffer. Having
> no stats buffer at all is a legal condition.
> 
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
> ---

Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>


>   src/ipa/rkisp1/algorithms/awb.cpp | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
> index cf8dc14308e2..f39153355a12 100644
> --- a/src/ipa/rkisp1/algorithms/awb.cpp
> +++ b/src/ipa/rkisp1/algorithms/awb.cpp
> @@ -195,7 +195,10 @@ void Awb::process(IPAContext &context,
>   		  ControlList &metadata)
>   {
>   	if (!stats || !(stats->meas_type & RKISP1_CIF_ISP_STAT_AWB)) {
> -		LOG(RkISP1Awb, Error) << "AWB data is missing in statistics";
> +		if (stats)
> +			LOG(RkISP1Awb, Error) << "AWB data is missing in statistics";
> +		awbAlgo_.process(context.activeState.awb, frameContext.awb, RkISP1AwbStats({}),
> +				 frameContext.lux.lux, metadata);
>   		return;
>   	}
>

Patch
diff mbox series

diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp
index cf8dc14308e2..f39153355a12 100644
--- a/src/ipa/rkisp1/algorithms/awb.cpp
+++ b/src/ipa/rkisp1/algorithms/awb.cpp
@@ -195,7 +195,10 @@  void Awb::process(IPAContext &context,
 		  ControlList &metadata)
 {
 	if (!stats || !(stats->meas_type & RKISP1_CIF_ISP_STAT_AWB)) {
-		LOG(RkISP1Awb, Error) << "AWB data is missing in statistics";
+		if (stats)
+			LOG(RkISP1Awb, Error) << "AWB data is missing in statistics";
+		awbAlgo_.process(context.activeState.awb, frameContext.awb, RkISP1AwbStats({}),
+				 frameContext.lux.lux, metadata);
 		return;
 	}