21#include "libcamera/internal/shared_mem_object.h"
22#include "libcamera/internal/software_isp/swisp_stats.h"
27struct StreamConfiguration;
35 bool isValid()
const {
return sharedStats_.fd().isValid(); }
48 if ((y & ySkipMask_) || y <
static_cast<unsigned int>(window_.
y) ||
49 y >= (window_.
y + window_.
height))
52 (this->*stats0_)(src);
57 if ((y & ySkipMask_) || y <
static_cast<unsigned int>(window_.
y) ||
58 y >= (window_.
y + window_.
height))
61 (this->*stats2_)(src);
67 using statsProcessFn = void (
SwStatsCpu::*)(
const uint8_t *src[]);
71 void statsBGGR8Line0(
const uint8_t *src[]);
73 void statsBGGR10Line0(
const uint8_t *src[]);
75 void statsBGGR12Line0(
const uint8_t *src[]);
77 void statsBGGR10PLine0(
const uint8_t *src[]);
78 void statsGBRG10PLine0(
const uint8_t *src[]);
81 statsProcessFn stats0_;
82 statsProcessFn stats2_;
85 unsigned int ySkipMask_;
Describe a rectangle's position and dimensions.
Definition geometry.h:243
unsigned int height
The distance between the top and bottom sides.
Definition geometry.h:268
int y
The vertical coordinate of the rectangle's top-left corner.
Definition geometry.h:266
RAII-style wrapper for file descriptors.
Definition shared_fd.h:17
Helper class to allocate an object in shareable memory.
Definition shared_mem_object.h:60
Generic signal and slot communication mechanism.
Definition signal.h:39
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:37
int configure(const StreamConfiguration &inputCfg)
Configure the statistics object for the passed in input format.
Definition swstats_cpu.cpp:365
Signal statsReady
Signals that the statistics are ready.
Definition swstats_cpu.h:64
void startFrame()
Reset state to start statistics gathering for a new frame.
Definition swstats_cpu.cpp:301
void setWindow(const Rectangle &window)
Specify window coordinates over which to gather statistics.
Definition swstats_cpu.cpp:418
void processLine0(unsigned int y, const uint8_t *src[])
Process line 0.
Definition swstats_cpu.h:46
void finishFrame()
Finish statistics calculation for the current frame.
Definition swstats_cpu.cpp:317
void processLine2(unsigned int y, const uint8_t *src[])
Process line 2 and 3.
Definition swstats_cpu.h:55
bool isValid() const
Gets whether the statistics object is valid.
Definition swstats_cpu.h:35
const Size & patternSize()
Get the pattern size.
Definition swstats_cpu.h:39
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:40
Struct that holds the statistics for the Software ISP.
Definition swisp_stats.h:22