libcamera: libcamera::SoftwareIsp Class Reference

libcamera v0.3.2 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
libcamera::SoftwareIsp Class Reference

Class for the Software ISP. More...

Collaboration diagram for libcamera::SoftwareIsp:
[legend]

## Public Member Functions
| SoftwareIsp (PipelineHandler *pipe, const CameraSensor *sensor)
| Constructs SoftwareIsp object.
int | loadConfiguration (const std::string &filename)
| Load a configuration from a file.
bool | isValid () const
| Check the validity of Software Isp object.
std::vector< PixelFormat > | formats (PixelFormat input)
| Get the output formats supported for the given input format.
SizeRange | sizes (PixelFormat inputFormat, const Size &inputSize)
| Get the supported output sizes for the given input format and size.
std::tuple< unsigned int, unsigned int > | strideAndFrameSize (const PixelFormat &outputFormat, const Size &size)
int | configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration > > &outputCfgs, const ControlInfoMap &sensorControls)
| Configure the SoftwareIsp object according to the passed in parameters.
int | exportBuffers (const Stream *stream, unsigned int count, std::vector< std::unique_ptr< FrameBuffer > > *buffers)
| Export the buffers from the Software ISP.
void | processStats (const ControlList &sensorControls)
| Process the statistics gathered.
int | start ()
| Starts the Software ISP streaming operation.
void | stop ()
| Stops the Software ISP streaming operation.
int | queueBuffers (FrameBuffer *input, const std::map< const Stream *, FrameBuffer * > &outputs)
| Queue buffers to Software ISP.
void | process (FrameBuffer *input, FrameBuffer *output)
| Passes the input framebuffer to the ISP worker to process.

## Public Attributes
Signal< FrameBuffer * > | inputBufferReady
| A signal emitted when the input frame buffer completes.
Signal< FrameBuffer * > | outputBufferReady
| A signal emitted when the output frame buffer completes.
Signal | ispStatsReady
| A signal emitted when the statistics for IPA are ready.
Signal< const ControlList & > | setSensorControls
| A signal emitted when the values to write to the sensor controls are ready.

## Detailed Description

Class for the Software ISP.

## Constructor & Destructor Documentation

## ◆ SoftwareIsp()

libcamera::SoftwareIsp::SoftwareIsp | ( | PipelineHandler * | pipe,
|  | const CameraSensor * | sensor )

Constructs SoftwareIsp object.

Parameters

  [in] | pipe | The pipeline handler in use
  [in] | sensor | Pointer to the CameraSensor instance owned by the pipeline handler

## Member Function Documentation

## ◆ configure()

int libcamera::SoftwareIsp::configure | ( | const StreamConfiguration & | inputCfg,
|  | const std::vector< std::reference_wrapper< StreamConfiguration > > & | outputCfgs,
|  | const ControlInfoMap & | sensorControls )

Configure the SoftwareIsp object according to the passed in parameters.

Parameters

  [in] | inputCfg | The input configuration
  [in] | outputCfgs | The output configurations
  [in] | sensorControls | ControlInfoMap of the controls supported by the sensor

Returns
  0 on success, a negative errno on failure

## ◆ exportBuffers()

int libcamera::SoftwareIsp::exportBuffers | ( | const Stream * | stream,
|  | unsigned int | count,
|  | std::vector< std::unique_ptr< FrameBuffer > > * | buffers )

Export the buffers from the Software ISP.

Parameters

  [in] | stream | Output stream exporting the buffers
  [in] | count | Number of buffers to allocate
  [out] | buffers | Vector to store the allocated buffers

Returns
  The number of allocated buffers on success or a negative error code otherwise

## ◆ formats()

std::vector< PixelFormat > libcamera::SoftwareIsp::formats | ( | PixelFormat | inputFormat | ) |

Get the output formats supported for the given input format.

Parameters

  [in] | inputFormat | The input format

Returns
  All the supported output formats or an empty vector if there are none

## ◆ isValid()

bool libcamera::SoftwareIsp::isValid | ( |  | ) | const

Check the validity of Software Isp object.

Returns
  True if Software Isp is valid, false otherwise

## ◆ loadConfiguration()

int libcamera::SoftwareIsp::loadConfiguration | ( | const std::string & | filename | ) |
| inline

Load a configuration from a file.

Parameters

  [in] | filename | The file to load the configuration data from

Currently is a stub doing nothing and always returning "success".

Returns
  0 on success

## ◆ process()

void libcamera::SoftwareIsp::process | ( | FrameBuffer * | input,
|  | FrameBuffer * | output )

Passes the input framebuffer to the ISP worker to process.

Parameters

  [in] | input | The input framebuffer
  [out] | output | The framebuffer to write the processed frame to

## ◆ processStats()

void libcamera::SoftwareIsp::processStats | ( | const ControlList & | sensorControls | ) |

Process the statistics gathered.

Parameters

  [in] | sensorControls | The sensor controls

Requests the IPA to calculate new parameters for ISP and new control values for the sensor.

## ◆ queueBuffers()

int libcamera::SoftwareIsp::queueBuffers | ( | FrameBuffer * | input,
|  | const std::map< const Stream *, FrameBuffer * > & | outputs )

Queue buffers to Software ISP.

Parameters

  [in] | input | The input framebuffer
  [in] | outputs | The container holding the output stream pointers and their respective frame buffer outputs

Returns
  0 on success, a negative errno on failure

## ◆ sizes()

SizeRange libcamera::SoftwareIsp::sizes | ( | PixelFormat | inputFormat,
|  | const Size & | inputSize )

Get the supported output sizes for the given input format and size.

Parameters

  [in] | inputFormat | The input format
  [in] | inputSize | The input frame size

Returns
  The valid size range or an empty range if there are none

## ◆ start()

int libcamera::SoftwareIsp::start | ( |  | ) |

Starts the Software ISP streaming operation.

Returns
  0 on success, any other value indicates an error

## ◆ strideAndFrameSize()

std::tuple< unsigned int, unsigned int > libcamera::SoftwareIsp::strideAndFrameSize | ( | const PixelFormat & | outputFormat,
|  | const Size & | size )

Get the output stride and the frame size in bytes for the given output format and size

Parameters

  [in] | outputFormat | The output format
  [in] | size | The output size (width and height in pixels)

Returns
  A tuple of the stride and the frame size in bytes, or a tuple of 0,0 if there is no valid output config

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

- include/libcamera/internal/software_isp/software_isp.h
- src/libcamera/software_isp/software_isp.cpp