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_);