[v2,2/2] libcamera: software_isp: Use Vector operator>>= in finishFrame
diff mbox series

Message ID 20260508223736.0B7291EA006C@mailuser.phl.internal
State Superseded
Headers show
Series
  • libcamera: Vector right-shift operators and SwStatsCpu use site
Related show

Commit Message

Javier Tia May 8, 2026, 9:35 p.m. UTC
Replace the three per-component right-shift assignments with a single
sum_ >>= sumShift_ call now that Vector provides the operator.

Signed-off-by: Javier Tia <floss@jetm.me>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/software_isp/swstats_cpu.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Barnabás Pőcze May 11, 2026, 9:16 a.m. UTC | #1
2026. 05. 08. 23:35 keltezéssel, Javier Tia írta:
> Replace the three per-component right-shift assignments with a single
> sum_ >>= sumShift_ call now that Vector provides the operator.
> 
> Signed-off-by: Javier Tia <floss@jetm.me>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

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


>   src/libcamera/software_isp/swstats_cpu.cpp | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp
> index 2e020e62..0815ec9a 100644
> --- a/src/libcamera/software_isp/swstats_cpu.cpp
> +++ b/src/libcamera/software_isp/swstats_cpu.cpp
> @@ -363,9 +363,7 @@ void SwStatsCpu::finishFrame(uint32_t frame, uint32_t bufferId)
>   				sharedStats_->yHistogram[j] += s.yHistogram[j];
>   		}
>   
> -		sharedStats_->sum_.r() >>= sumShift_;
> -		sharedStats_->sum_.g() >>= sumShift_;
> -		sharedStats_->sum_.b() >>= sumShift_;
> +		sharedStats_->sum_ >>= sumShift_;
>   	}
>   
>   	sharedStats_->valid = valid;

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/swstats_cpu.cpp b/src/libcamera/software_isp/swstats_cpu.cpp
index 2e020e62..0815ec9a 100644
--- a/src/libcamera/software_isp/swstats_cpu.cpp
+++ b/src/libcamera/software_isp/swstats_cpu.cpp
@@ -363,9 +363,7 @@  void SwStatsCpu::finishFrame(uint32_t frame, uint32_t bufferId)
 				sharedStats_->yHistogram[j] += s.yHistogram[j];
 		}
 
-		sharedStats_->sum_.r() >>= sumShift_;
-		sharedStats_->sum_.g() >>= sumShift_;
-		sharedStats_->sum_.b() >>= sumShift_;
+		sharedStats_->sum_ >>= sumShift_;
 	}
 
 	sharedStats_->valid = valid;