21 #include "libcamera/internal/shared_mem_object.h" 22 #include "libcamera/internal/software_isp/swisp_stats.h" 27 struct 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_;
RAII-style wrapper for file descriptors.
Definition: shared_fd.h:16
const Size & patternSize()
Get the pattern size.
Definition: swstats_cpu.h:39
void startFrame()
Reset state to start statistics gathering for a new frame.
Definition: swstats_cpu.cpp:301
void processLine0(unsigned int y, const uint8_t *src[])
Process line 0.
Definition: swstats_cpu.h:46
Class for gathering statistics on the CPU.
Definition: swstats_cpu.h:29
Top-level libcamera namespace.
Definition: backtrace.h:17
int y
The vertical coordinate of the rectangle's top-left corner.
Definition: geometry.h:266
const SharedFD & getStatsFD()
Get the file descriptor for the statistics.
Definition: swstats_cpu.h:37
Describe a two-dimensional size.
Definition: geometry.h:52
Helper class to allocate an object in shareable memory.
Definition: shared_mem_object.h:60
void setWindow(const Rectangle &window)
Specify window coordinates over which to gather statistics.
Definition: swstats_cpu.cpp:418
int configure(const StreamConfiguration &inputCfg)
Configure the statistics object for the passed in input format.
Definition: swstats_cpu.cpp:365
Signal & slot implementation.
bool isValid() const
Gets whether the statistics object is valid.
Definition: swstats_cpu.h:35
Describe a rectangle's position and dimensions.
Definition: geometry.h:242
Generic signal and slot communication mechanism.
Definition: object.h:20
Struct that holds the statistics for the Software ISP.
Definition: swisp_stats.h:22
Data structures related to geometric objects.
Signal statsReady
Signals that the statistics are ready.
Definition: swstats_cpu.h:64
unsigned int height
The distance between the top and bottom sides.
Definition: geometry.h:268
void processLine2(unsigned int y, const uint8_t *src[])
Process line 2 and 3.
Definition: swstats_cpu.h:55
Configuration parameters for a stream.
Definition: stream.h:41
void finishFrame()
Finish statistics calculation for the current frame.
Definition: swstats_cpu.cpp:317