libcamera v0.2.0+3-70b69666-nvm
Supporting cameras in Linux since 2019
|
Base class for the software ISP statistics. More...
#include <swstats.h>
Public Member Functions | |
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 SharedFD & | getStatsFD ()=0 |
Get the file descriptor for the statistics. | |
const Size & | patternSize () |
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. | |
Public Attributes | |
Signal< int > | statsReady |
Signals that the statistics are ready. | |
Protected Types | |
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 | |
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. | |
Base class for the software ISP statistics.
Base class for the software ISP statistics.
|
protected |
Called when there is data to get statistics from.
[in] | src | The input data |
|
pure virtual |
Configure the statistics object for the passed in input format.
[in] | inputCfg | The input format |
Implemented in libcamera::SwStatsCpu.
|
inline |
Finish statistics calculation for the current frame.
This may only be called after a successful setWindow() call.
|
pure virtual |
Get the file descriptor for the statistics.
Implemented in libcamera::SwStatsCpu.
|
pure virtual |
Gets wether the statistics object is valid.
Implemented in libcamera::SwStatsCpu.
|
inline |
Get the pattern size.
For some input-formats, e.g. Bayer data, processing is done multiple lines and/or columns at a time. Get width and height at which the (bayer) pattern repeats. Window values are rounded down to a multiple of this and the height also indicates if processLine2() should be called or not. This may only be called after a successful configure() call.
|
inline |
Process line 0.
[in] | y | The y coordinate. |
[in] | src | The input data. |
This function processes line 0 for input formats with patternSize height == 1. It'll process line 0 and 1 for input formats with patternSize height >= 2. This function may only be called after a successful setWindow() call.
|
inline |
Process line 2 and 3.
[in] | y | The y coordinate. |
[in] | src | The input data. |
This function processes line 2 and 3 for input formats with patternSize height == 4. This function may only be called after a successful setWindow() call.
|
inline |
Specify window coordinates over which to gather statistics.
[in] | window | The window object. |
|
inline |
Reset state to start statistics gathering for a new frame.
This may only be called after a successful setWindow() call.
|
protected |
The size of the bayer pattern.
Valid sizes are: 2x2, 4x2 or 4x4.
|
protected |
The function called when a line is ready for statistics processing.
Used for line 0 and 1, repeating if there isn't a 3rd and a 4th line in the bayer order.
|
protected |
The function called when a line is ready for statistics processing.
Used for line 3 and 4, only needed if the bayer order has 4 different lines.
Signal<int> libcamera::SwStats::statsReady |
Signals that the statistics are ready.
The int parameter isn't actually used.
|
protected |
The offset of x, applied to window_.x for bayer variants.
This can either be 0 or 1.