21#include "libcamera/internal/shared_mem_object.h"
22#include "libcamera/internal/software_isp/swisp_stats.h"
27struct StreamConfiguration;
40 bool isValid()
const {
return sharedStats_.fd().isValid(); }
78 if ((y & ySkipMask_) || y < (
unsigned int)window_.
y ||
79 y >= (window_.
y + window_.
height))
82 (this->*stats0_)(src);
95 if ((y & ySkipMask_) || y < (
unsigned int)window_.
y ||
96 y >= (window_.
y + window_.
height))
99 (this->*stats2_)(src);
121 typedef void (
SwStatsCpu::*statsProcessFn)(
const uint8_t *src[]);
125 void statsBGGR8Line0(
const uint8_t *src[]);
127 void statsBGGR10Line0(
const uint8_t *src[]);
129 void statsBGGR12Line0(
const uint8_t *src[]);
131 void statsBGGR10PLine0(
const uint8_t *src[]);
132 void statsGBRG10PLine0(
const uint8_t *src[]);
135 statsProcessFn stats0_;
136 statsProcessFn stats2_;
142 unsigned int ySkipMask_;
161 unsigned int xShift_;
Describe a rectangle's position and dimensions.
Definition: geometry.h:243
int y
The vertical coordinate of the rectangle's top-left corner.
Definition: geometry.h:266
unsigned int height
The distance between the top and bottom sides.
Definition: geometry.h:268
RAII-style wrapper for file descriptors.
Definition: shared_fd.h:17
Helper class for allocating objects in shared memory.
Definition: shared_mem_object.h:74
Describe a two-dimensional size.
Definition: geometry.h:53
Class for gathering statistics on the CPU.
Definition: swstats_cpu.h:30
const SharedFD & getStatsFD()
Get the file descriptor for the statistics.
Definition: swstats_cpu.h:47
Signal< int > statsReady
Signals that the statistics are ready.
Definition: swstats_cpu.h:107
int configure(const StreamConfiguration &inputCfg)
Configure the statistics object for the passed in input format.
Definition: swstats_cpu.cpp:269
void startFrame()
Reset state to start statistics gathering for a new frame.
Definition: swstats_cpu.cpp:208
void setWindow(Rectangle window)
Specify window coordinates over which to gather statistics.
Definition: swstats_cpu.cpp:322
void processLine0(unsigned int y, const uint8_t *src[])
Process line 0.
Definition: swstats_cpu.h:76
void finishFrame()
Finish statistics calculation for the current frame.
Definition: swstats_cpu.cpp:221
void processLine2(unsigned int y, const uint8_t *src[])
Process line 2 and 3.
Definition: swstats_cpu.h:93
bool isValid() const
Gets wether the statistics object is valid.
Definition: swstats_cpu.h:40
const Size & patternSize()
Get the pattern size.
Definition: swstats_cpu.h:60
Data structures related to geometric objects.
Top-level libcamera namespace.
Definition: backtrace.h:17
Signal & slot implementation.
Configuration parameters for a stream.
Definition: stream.h:41
Struct that holds the statistics for the Software ISP.
Definition: swisp_stats.h:15