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

Class for the Simple Software ISP. More...

#include <swisp_simple.h>

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

Public Member Functions

 SwIspSimple (PipelineHandler *pipe, const ControlInfoMap &sensorControls)
 Constructor for the SwIspSimple object.
 
int loadConfiguration (const std::string &filename)
 Load a configuration from a file.
 
bool isValid () const
 Gets if there is a valid debayer object.
 
std::vector< PixelFormatformats (PixelFormat input)
 Get the supported output formats.
 
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)
 Get the stride and the frame size.
 
int configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration > > &outputCfgs, const ControlInfoMap &sensorControls)
 Configure the SwIspSimple object according to the passed in parameters.
 
int exportBuffers (unsigned int output, unsigned int count, std::vector< std::unique_ptr< FrameBuffer > > *buffers)
 Exports the buffers for use in processing.
 
void processStats (const ControlList &sensorControls)
 Process the statistics gathered.
 
int start ()
 Starts the Software ISP worker.
 
void stop ()
 Stops the Software ISP worker.
 
int queueBuffers (FrameBuffer *input, const std::map< unsigned int, FrameBuffer * > &outputs)
 Queues buffers for processing.
 
Signal< const ControlList & > & getSignalSetSensorControls ()
 Get the signal for when the sensor controls are set.
 
void process (FrameBuffer *input, FrameBuffer *output)
 Process the input framebuffer.
 
- Public Member Functions inherited from libcamera::SoftwareIsp
 SoftwareIsp (PipelineHandler *pipe, const ControlInfoMap &sensorControls)
 Constructor for the SoftwareIsp object.
 
virtual int loadConfiguration (const std::string &filename)=0
 Load a configuration from a file.
 
virtual bool isValid () const =0
 Gets if there is a valid debayer object.
 
virtual std::vector< PixelFormatformats (PixelFormat input)=0
 Get the supported output formats.
 
virtual SizeRange sizes (PixelFormat inputFormat, const Size &inputSize)=0
 Get the supported output sizes for the given input format and size.
 
virtual std::tuple< unsigned int, unsigned int > strideAndFrameSize (const PixelFormat &pixelFormat, const Size &size)=0
 Get the stride and the frame size.
 
virtual int configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration > > &outputCfgs, const ControlInfoMap &sensorControls)=0
 Configure the SwIspSimple object according to the passed in parameters.
 
virtual int exportBuffers (unsigned int output, unsigned int count, std::vector< std::unique_ptr< FrameBuffer > > *buffers)=0
 Exports the buffers for use in processing.
 
virtual int start ()=0
 Starts the Software ISP worker.
 
virtual void stop ()=0
 Stops the Software ISP worker.
 
virtual int queueBuffers (FrameBuffer *input, const std::map< unsigned int, FrameBuffer * > &outputs)=0
 Queues buffers for processing.
 
virtual void processStats (const ControlList &sensorControls)=0
 Process the statistics gathered.
 
virtual Signal< const ControlList & > & getSignalSetSensorControls ()=0
 Get the signal for when the sensor controls are set.
 

Additional Inherited Members

- Public Attributes inherited from libcamera::SoftwareIsp
Signal< FrameBuffer * > inputBufferReady
 Signals that the input buffer is ready.
 
Signal< FrameBuffer * > outputBufferReady
 Signals that the output buffer is ready.
 
Signal< int > ispStatsReady
 Signals that the ISP stats are ready.
 

Detailed Description

Class for the Simple Software ISP.

Implementation of the SoftwareIsp interface.

Constructor & Destructor Documentation

◆ SwIspSimple()

libcamera::SwIspSimple::SwIspSimple ( PipelineHandler pipe,
const ControlInfoMap sensorControls 
)

Constructor for the SwIspSimple object.

Parameters
[in]pipeThe pipeline handler in use.
[in]sensorControlsThe sensor controls.

Member Function Documentation

◆ configure()

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

Configure the SwIspSimple object according to the passed in parameters.

Parameters
[in]inputCfgThe input configuration.
[in]outputCfgsThe output configurations.
[in]sensorControlsThe sensor controls.
Returns
0 on success, a negative errno on failure.

Implements libcamera::SoftwareIsp.

◆ exportBuffers()

int libcamera::SwIspSimple::exportBuffers ( unsigned int  output,
unsigned int  count,
std::vector< std::unique_ptr< FrameBuffer > > *  buffers 
)
virtual

Exports the buffers for use in processing.

Parameters
[in]outputThe number of outputs requested.
[in]countThe number of planes.
[out]buffersThe exported buffers.
Returns
count when successful, a negative return value if an error occurred.

Implements libcamera::SoftwareIsp.

◆ formats()

std::vector< PixelFormat > libcamera::SwIspSimple::formats ( PixelFormat  input)
virtual

Get the supported output formats.

Parameters
[in]inputThe input format.
Returns
all supported output formats or an empty vector if there are none.

Implements libcamera::SoftwareIsp.

◆ getSignalSetSensorControls()

Signal< const ControlList & > & libcamera::SwIspSimple::getSignalSetSensorControls ( )
virtual

Get the signal for when the sensor controls are set.

Returns
The control list of the sensor controls.

Implements libcamera::SoftwareIsp.

◆ isValid()

bool libcamera::SwIspSimple::isValid ( ) const
virtual

Gets if there is a valid debayer object.

Returns
true if there is, false otherwise.

Implements libcamera::SoftwareIsp.

◆ loadConfiguration()

int libcamera::SwIspSimple::loadConfiguration ( const std::string &  filename)
inlinevirtual

Load a configuration from a file.

Parameters
[in]filenameThe file to load from.
Returns
0 on success.

Implements libcamera::SoftwareIsp.

◆ process()

void libcamera::SwIspSimple::process ( FrameBuffer input,
FrameBuffer output 
)

Process the input framebuffer.

Parameters
[in]inputThe input framebuffer.
[out]outputThe output framebuffer.

◆ processStats()

void libcamera::SwIspSimple::processStats ( const ControlList sensorControls)
virtual

Process the statistics gathered.

Parameters
[in]sensorControlsThe sensor controls.

Implements libcamera::SoftwareIsp.

◆ queueBuffers()

int libcamera::SwIspSimple::queueBuffers ( FrameBuffer input,
const std::map< unsigned int, FrameBuffer * > &  outputs 
)
virtual

Queues buffers for processing.

Parameters
[in]inputThe input framebuffer.
[in]outputsThe output framebuffers.
Returns
0 on success, a negative errno on failure

Implements libcamera::SoftwareIsp.

◆ sizes()

SizeRange libcamera::SwIspSimple::sizes ( PixelFormat  inputFormat,
const Size inputSize 
)
virtual

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

Parameters
[in]inputFormatThe input format.
[in]inputSizeThe input size.
Returns
The valid size ranges or an empty range if there are none.

Implements libcamera::SoftwareIsp.

◆ start()

int libcamera::SwIspSimple::start ( )
virtual

Starts the Software ISP worker.

Returns
0 on success, any other value indicates an error.

Implements libcamera::SoftwareIsp.

◆ stop()

void libcamera::SwIspSimple::stop ( )
virtual

Stops the Software ISP worker.

Implements libcamera::SoftwareIsp.

◆ strideAndFrameSize()

std::tuple< unsigned int, unsigned int > libcamera::SwIspSimple::strideAndFrameSize ( const PixelFormat outputFormat,
const Size size 
)
virtual

Get the stride and the frame size.

Parameters
[in]outputFormatThe output format.
[in]sizeThe output size.
Returns
a tuple of the stride and the frame size, or a tuple with 0,0 if there is no valid output config.

Implements libcamera::SoftwareIsp.


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