Class for gathering statistics on the CPU. More...

Public Member Functions | |
| bool | isValid () const |
| Gets whether the statistics object is valid. | |
| const SharedFD & | getStatsFD () |
| Get the file descriptor for the statistics. | |
| const Size & | patternSize () |
| Get the pattern size. | |
| int | configure (const StreamConfiguration &inputCfg) |
| Configure the statistics object for the passed in input format. | |
| void | setWindow (const Rectangle &window) |
| Specify window coordinates over which to gather statistics. | |
| void | startFrame () |
| Reset state to start statistics gathering for a new frame. | |
| void | finishFrame (uint32_t frame, uint32_t bufferId) |
| Finish statistics calculation for the current 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. | |
Public Attributes | |
| Signal< uint32_t, uint32_t > | statsReady |
| Signals that the statistics are ready. | |
Class for gathering statistics on the CPU.
CPU based software ISP statistics implementation.
This class offers a configure function + functions to gather statistics on a line by line basis. This allows CPU based software debayering to interleave debayering and statistics gathering on a line by line basis while the input data is still hot in the cache.
It is also possible to specify a window over which to gather statistics instead of processing the whole frame.
| int libcamera::SwStatsCpu::configure | ( | const StreamConfiguration & | inputCfg | ) |
Configure the statistics object for the passed in input format.
| [in] | inputCfg | The input format |
| void libcamera::SwStatsCpu::finishFrame | ( | uint32_t | frame, |
| uint32_t | bufferId ) |
Finish statistics calculation for the current frame.
| [in] | frame | The frame number |
| [in] | bufferId | ID of the statistics buffer |
This may only be called after a successful setWindow() call.
|
inline |
Get the file descriptor for the statistics.
|
inline |
Gets whether the statistics object is valid.
|
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.
| void libcamera::SwStatsCpu::setWindow | ( | const Rectangle & | window | ) |
Specify window coordinates over which to gather statistics.
| [in] | window | The window object. |
| void libcamera::SwStatsCpu::startFrame | ( | void | ) |
Reset state to start statistics gathering for a new frame.
This may only be called after a successful setWindow() call.