[v2,1/2] software_isp: benchmark: Add missing _ postfix to measure data member
diff mbox series

Message ID 20260215094418.18642-1-johannes.goede@oss.qualcomm.com
State Accepted
Commit f0a79dd68b062a0a01da2b98257fdeae8710363d
Headers show
Series
  • [v2,1/2] software_isp: benchmark: Add missing _ postfix to measure data member
Related show

Commit Message

Hans de Goede Feb. 15, 2026, 9:44 a.m. UTC
All class data members should have a _ postifx, add the missing _ postfix
to the Benchmark::measure_ data member.

Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
---
 include/libcamera/internal/software_isp/benchmark.h |  2 +-
 src/libcamera/software_isp/benchmark.cpp            | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Kieran Bingham Feb. 15, 2026, 2:38 p.m. UTC | #1
Quoting Hans de Goede (2026-02-15 09:44:17)
> All class data members should have a _ postifx, add the missing _ postfix
> to the Benchmark::measure_ data member.
> 

Thanks, this fixes the coding style indeed.

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

> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> ---
>  include/libcamera/internal/software_isp/benchmark.h |  2 +-
>  src/libcamera/software_isp/benchmark.cpp            | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h
> index 0680d6cd..46bdb86d 100644
> --- a/include/libcamera/internal/software_isp/benchmark.h
> +++ b/include/libcamera/internal/software_isp/benchmark.h
> @@ -28,7 +28,7 @@ public:
>  
>  private:
>         timespec frameStartTime_;
> -       bool measure;
> +       bool measure_;
>         /* Skip 30 frames for things to stabilize then measure 30 frames */
>         unsigned int encounteredFrames_ = 0;
>         int64_t frameProcessTime_ = 0;
> diff --git a/src/libcamera/software_isp/benchmark.cpp b/src/libcamera/software_isp/benchmark.cpp
> index 1a00ae56..4ffb6773 100644
> --- a/src/libcamera/software_isp/benchmark.cpp
> +++ b/src/libcamera/software_isp/benchmark.cpp
> @@ -54,11 +54,11 @@ static inline int64_t timeDiff(timespec &after, timespec &before)
>   */
>  void Benchmark::startFrame(void)
>  {
> -       measure = framesToMeasure_ > 0 &&
> -                 encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
> -                 ++encounteredFrames_ > skipBeforeMeasure_;
> +       measure_ = framesToMeasure_ > 0 &&
> +                  encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
> +                  ++encounteredFrames_ > skipBeforeMeasure_;
>  
> -       if (measure) {
> +       if (measure_) {
>                 frameStartTime_ = {};
>                 clock_gettime(CLOCK_MONOTONIC_RAW, &frameStartTime_);
>         }
> @@ -75,7 +75,7 @@ void Benchmark::startFrame(void)
>   */
>  void Benchmark::finishFrame(void)
>  {
> -       if (measure) {
> +       if (measure_) {
>                 timespec frameEndTime = {};
>                 clock_gettime(CLOCK_MONOTONIC_RAW, &frameEndTime);
>                 frameProcessTime_ += timeDiff(frameEndTime, frameStartTime_);
> -- 
> 2.52.0
>
Milan Zamazal Feb. 16, 2026, 9:14 a.m. UTC | #2
Hans de Goede <johannes.goede@oss.qualcomm.com> writes:

> All class data members should have a _ postifx, add the missing _ postfix
> to the Benchmark::measure_ data member.
>
> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

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

> ---
>  include/libcamera/internal/software_isp/benchmark.h |  2 +-
>  src/libcamera/software_isp/benchmark.cpp            | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h
> index 0680d6cd..46bdb86d 100644
> --- a/include/libcamera/internal/software_isp/benchmark.h
> +++ b/include/libcamera/internal/software_isp/benchmark.h
> @@ -28,7 +28,7 @@ public:
>  
>  private:
>  	timespec frameStartTime_;
> -	bool measure;
> +	bool measure_;
>  	/* Skip 30 frames for things to stabilize then measure 30 frames */
>  	unsigned int encounteredFrames_ = 0;
>  	int64_t frameProcessTime_ = 0;
> diff --git a/src/libcamera/software_isp/benchmark.cpp b/src/libcamera/software_isp/benchmark.cpp
> index 1a00ae56..4ffb6773 100644
> --- a/src/libcamera/software_isp/benchmark.cpp
> +++ b/src/libcamera/software_isp/benchmark.cpp
> @@ -54,11 +54,11 @@ static inline int64_t timeDiff(timespec &after, timespec &before)
>   */
>  void Benchmark::startFrame(void)
>  {
> -	measure = framesToMeasure_ > 0 &&
> -		  encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
> -		  ++encounteredFrames_ > skipBeforeMeasure_;
> +	measure_ = framesToMeasure_ > 0 &&
> +		   encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
> +		   ++encounteredFrames_ > skipBeforeMeasure_;
>  
> -	if (measure) {
> +	if (measure_) {
>  		frameStartTime_ = {};
>  		clock_gettime(CLOCK_MONOTONIC_RAW, &frameStartTime_);
>  	}
> @@ -75,7 +75,7 @@ void Benchmark::startFrame(void)
>   */
>  void Benchmark::finishFrame(void)
>  {
> -	if (measure) {
> +	if (measure_) {
>  		timespec frameEndTime = {};
>  		clock_gettime(CLOCK_MONOTONIC_RAW, &frameEndTime);
>  		frameProcessTime_ += timeDiff(frameEndTime, frameStartTime_);

Patch
diff mbox series

diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h
index 0680d6cd..46bdb86d 100644
--- a/include/libcamera/internal/software_isp/benchmark.h
+++ b/include/libcamera/internal/software_isp/benchmark.h
@@ -28,7 +28,7 @@  public:
 
 private:
 	timespec frameStartTime_;
-	bool measure;
+	bool measure_;
 	/* Skip 30 frames for things to stabilize then measure 30 frames */
 	unsigned int encounteredFrames_ = 0;
 	int64_t frameProcessTime_ = 0;
diff --git a/src/libcamera/software_isp/benchmark.cpp b/src/libcamera/software_isp/benchmark.cpp
index 1a00ae56..4ffb6773 100644
--- a/src/libcamera/software_isp/benchmark.cpp
+++ b/src/libcamera/software_isp/benchmark.cpp
@@ -54,11 +54,11 @@  static inline int64_t timeDiff(timespec &after, timespec &before)
  */
 void Benchmark::startFrame(void)
 {
-	measure = framesToMeasure_ > 0 &&
-		  encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
-		  ++encounteredFrames_ > skipBeforeMeasure_;
+	measure_ = framesToMeasure_ > 0 &&
+		   encounteredFrames_ < skipBeforeMeasure_ + framesToMeasure_ &&
+		   ++encounteredFrames_ > skipBeforeMeasure_;
 
-	if (measure) {
+	if (measure_) {
 		frameStartTime_ = {};
 		clock_gettime(CLOCK_MONOTONIC_RAW, &frameStartTime_);
 	}
@@ -75,7 +75,7 @@  void Benchmark::startFrame(void)
  */
 void Benchmark::finishFrame(void)
 {
-	if (measure) {
+	if (measure_) {
 		timespec frameEndTime = {};
 		clock_gettime(CLOCK_MONOTONIC_RAW, &frameEndTime);
 		frameProcessTime_ += timeDiff(frameEndTime, frameStartTime_);