25struct StreamConfiguration;
67 typedef void (
SwStats::*statsProcessFn)(const uint8_t *src[]);
144 window_.
x &= ~(patternSize_.
width - 1);
145 window_.
x += x_shift_;
146 window_.
y &= ~(patternSize_.
height - 1);
149 window_.
width -= x_shift_;
161 (this->*startFrame_)();
175 if ((y & y_skip_mask_) || y < (
unsigned int)window_.
y ||
176 y >= (window_.
y + window_.
height))
179 (this->*stats0_)(src);
192 if ((y & y_skip_mask_) || y < (
unsigned int)window_.
y ||
193 y >= (window_.
y + window_.
height))
196 (this->*stats2_)(src);
206 (this->*finishFrame_)();
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
unsigned int width
The distance between the left and right sides.
Definition geometry.h:267
int x
The horizontal coordinate of the rectangle's top-left corner.
Definition geometry.h:265
RAII-style wrapper for file descriptors.
Definition shared_fd.h:17
Generic signal and slot communication mechanism.
Definition signal.h:39
Describe a two-dimensional size.
Definition geometry.h:53
unsigned int width
The Size width.
Definition geometry.h:65
unsigned int height
The Size height.
Definition geometry.h:66
Base class for the software ISP statistics.
Definition swstats.h:36
statsVoidFn finishFrame_
The function called at the end of a frame.
Definition swstats.h:108
void processLine2(unsigned int y, const uint8_t *src[])
Process line 2 and 3.
Definition swstats.h:190
void processLine0(unsigned int y, const uint8_t *src[])
Process line 0.
Definition swstats.h:173
statsProcessFn stats2_
The function called when a line is ready for statistics processing.
Definition swstats.h:85
Signal< int > statsReady
Signals that the statistics are ready.
Definition swstats.h:214
Size patternSize_
The size of the bayer pattern.
Definition swstats.h:114
unsigned int y_skip_mask_
Skip lines where this bitmask is set in y.
Definition swstats.h:94
virtual int configure(const StreamConfiguration &inputCfg)=0
Configure the statistics object for the passed in input format.
virtual const SharedFD & getStatsFD()=0
Get the file descriptor for the statistics.
virtual bool isValid() const =0
Gets wether the statistics object is valid.
void setWindow(Rectangle window)
Specify window coordinates over which to gather statistics.
Definition swstats.h:140
void startFrame()
Reset state to start statistics gathering for a new frame.
Definition swstats.h:159
unsigned int x_shift_
The offset of x, applied to window_.x for bayer variants.
Definition swstats.h:120
unsigned int bpp_
The memory used per pixel in bits.
Definition swstats.h:90
void finishFrame()
Finish statistics calculation for the current frame.
Definition swstats.h:204
const Size & patternSize()
Get the pattern size.
Definition swstats.h:134
statsProcessFn stats0_
The function called when a line is ready for statistics processing.
Definition swstats.h:79
Rectangle window_
Statistics window, set by setWindow(), used ever line.
Definition swstats.h:99
statsVoidFn startFrame_
The function called at the start of a frame.
Definition swstats.h:104
Data structures related to geometric objects.
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Definition log.h:47
Top-level libcamera namespace.
Definition backtrace.h:17
Signal & slot implementation.
Configuration parameters for a stream.
Definition stream.h:41