libcamera v0.2.0+3-c630fdf5-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
Public Member Functions | List of all members
libcamera::SwStatsCpu Class Reference

Implementation for the Software statistics on the CPU. More...

#include <swstats_cpu.h>

Inheritance diagram for libcamera::SwStatsCpu:
Inheritance graph
[legend]
Collaboration diagram for libcamera::SwStatsCpu:
Collaboration graph
[legend]

Public Member Functions

bool isValid () const
 Gets wether the statistics object is valid.
 
const SharedFDgetStatsFD ()
 Get the file descriptor for the statistics.
 
int configure (const StreamConfiguration &inputCfg)
 Configure the statistics object for the passed in input format.
 
- Public Member Functions inherited from libcamera::SwStats
virtual bool isValid () const =0
 Gets wether the statistics object is valid.
 
virtual int configure (const StreamConfiguration &inputCfg)=0
 Configure the statistics object for the passed in input format.
 
virtual const SharedFDgetStatsFD ()=0
 Get the file descriptor for the statistics.
 
const SizepatternSize ()
 Get the pattern size.
 
void setWindow (Rectangle window)
 Specify window coordinates over which to gather statistics.
 
void startFrame ()
 Reset state to start statistics gathering for a new frame.
 
void processLine0 (unsigned int y, const uint8_t *src[])
 Process line 0.
 
void processLine2 (unsigned int y, const uint8_t *src[])
 Process line 2 and 3.
 
void finishFrame ()
 Finish statistics calculation for the current frame.
 

Additional Inherited Members

- Public Attributes inherited from libcamera::SwStats
Signal< int > statsReady
 Signals that the statistics are ready.
 
- Protected Types inherited from libcamera::SwStats
typedef void(SwStats::* statsProcessFn) (const uint8_t *src[])
 Called when there is data to get statistics from.
 
typedef void(SwStats::* statsVoidFn) ()
 Called when the statistics gathering is done or when a new frame starts.
 
- Protected Attributes inherited from libcamera::SwStats
statsProcessFn stats0_
 The function called when a line is ready for statistics processing.
 
statsProcessFn stats2_
 The function called when a line is ready for statistics processing.
 
unsigned int bpp_
 The memory used per pixel in bits.
 
unsigned int y_skip_mask_
 Skip lines where this bitmask is set in y.
 
Rectangle window_
 Statistics window, set by setWindow(), used ever line.
 
statsVoidFn startFrame_
 The function called at the start of a frame.
 
statsVoidFn finishFrame_
 The function called at the end of a frame.
 
Size patternSize_
 The size of the bayer pattern.
 
unsigned int x_shift_
 The offset of x, applied to window_.x for bayer variants.
 

Detailed Description

Implementation for the Software statistics on the CPU.

Member Function Documentation

◆ configure()

int libcamera::SwStatsCpu::configure ( const StreamConfiguration inputCfg)
virtual

Configure the statistics object for the passed in input format.

Parameters
[in]inputCfgThe input format
Returns
0 on success, a negative errno value on failure.

Implements libcamera::SwStats.

◆ getStatsFD()

const SharedFD & libcamera::SwStatsCpu::getStatsFD ( )
inlinevirtual

Get the file descriptor for the statistics.

Returns
the file descriptor

Implements libcamera::SwStats.

◆ isValid()

bool libcamera::SwStatsCpu::isValid ( ) const
inlinevirtual

Gets wether the statistics object is valid.

Returns
true if it's valid, false otherwise.

Implements libcamera::SwStats.


The documentation for this class was generated from the following files: