libcamera
v0.4.0+139-39419ce4
Supporting cameras in Linux since 2019
|
Class for the Software ISP. More...
Public Member Functions | |
SoftwareIsp (PipelineHandler *pipe, const CameraSensor *sensor, ControlInfoMap *ipaControls) | |
Constructs SoftwareIsp object. More... | |
int | loadConfiguration ([[maybe_unused]] const std::string &filename) |
Load a configuration from a file. More... | |
bool | isValid () const |
Check the validity of Software Isp object. More... | |
std::vector< PixelFormat > | formats (PixelFormat input) |
Get the output formats supported for the given input format. More... | |
SizeRange | sizes (PixelFormat inputFormat, const Size &inputSize) |
Get the supported output sizes for the given input format and size. More... | |
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 ipa::soft::IPAConfigInfo &configInfo) |
Configure the SoftwareIsp object according to the passed in parameters. More... | |
int | exportBuffers (const Stream *stream, unsigned int count, std::vector< std::unique_ptr< FrameBuffer >> *buffers) |
Export the buffers from the Software ISP. More... | |
void | processStats (const uint32_t frame, const uint32_t bufferId, const ControlList &sensorControls) |
Process the statistics gathered. More... | |
int | start () |
Starts the Software ISP streaming operation. More... | |
void | stop () |
Stops the Software ISP streaming operation. More... | |
void | queueRequest (const uint32_t frame, const ControlList &controls) |
Queue a request and process the control list from the application. More... | |
int | queueBuffers (uint32_t frame, FrameBuffer *input, const std::map< const Stream *, FrameBuffer *> &outputs) |
Queue buffers to Software ISP. More... | |
void | process (uint32_t frame, FrameBuffer *input, FrameBuffer *output) |
Passes the input framebuffer to the ISP worker to process. More... | |
![]() | |
Object (Object *parent=nullptr) | |
Construct an Object instance. More... | |
virtual | ~Object () |
Destroy an Object instance. More... | |
void | deleteLater () |
Schedule deletion of the instance in the thread it belongs to. More... | |
void | postMessage (std::unique_ptr< Message > msg) |
Post a message to the object's thread. More... | |
template<typename T , typename R , typename... FuncArgs, typename... Args, std::enable_if_t< std::is_base_of< Object, T >::value > * = nullptr> | |
R | invokeMethod (R(T::*func)(FuncArgs...), ConnectionType type, Args &&... args) |
Invoke a method asynchronously on an Object instance. More... | |
Thread * | thread () const |
Retrieve the thread the object is bound to. More... | |
void | moveToThread (Thread *thread) |
Move the object and all its children to a different thread. More... | |
Object * | parent () const |
Retrieve the object's parent. More... | |
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< uint32_t, uint32_t > | 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. | |
Additional Inherited Members | |
![]() | |
virtual void | message (Message *msg) |
Message handler for the object. More... | |
bool | assertThreadBound (const char *message) |
Check if the caller complies with thread-bound constraints. More... | |
Class for the Software ISP.
libcamera::SoftwareIsp::SoftwareIsp | ( | PipelineHandler * | pipe, |
const CameraSensor * | sensor, | ||
ControlInfoMap * | ipaControls | ||
) |
Constructs SoftwareIsp object.
[in] | pipe | The pipeline handler in use |
[in] | sensor | Pointer to the CameraSensor instance owned by the pipeline |
[out] | ipaControls | The IPA controls to update handler |
int libcamera::SoftwareIsp::configure | ( | const StreamConfiguration & | inputCfg, |
const std::vector< std::reference_wrapper< StreamConfiguration >> & | outputCfgs, | ||
const ipa::soft::IPAConfigInfo & | configInfo | ||
) |
Configure the SoftwareIsp object according to the passed in parameters.
[in] | inputCfg | The input configuration |
[in] | outputCfgs | The output configurations |
[in] | configInfo | The IPA configuration data, received from the pipeline handler |
int libcamera::SoftwareIsp::exportBuffers | ( | const Stream * | stream, |
unsigned int | count, | ||
std::vector< std::unique_ptr< FrameBuffer >> * | buffers | ||
) |
Export the buffers from the Software ISP.
[in] | stream | Output stream exporting the buffers |
[in] | count | Number of buffers to allocate |
[out] | buffers | Vector to store the allocated buffers |
std::vector< PixelFormat > libcamera::SoftwareIsp::formats | ( | PixelFormat | inputFormat | ) |
Get the output formats supported for the given input format.
[in] | inputFormat | The input format |
bool libcamera::SoftwareIsp::isValid | ( | ) | const |
Check the validity of Software Isp object.
|
inline |
Load a configuration from a file.
[in] | filename | The file to load the configuration data from |
Currently is a stub doing nothing and always returning "success".
void libcamera::SoftwareIsp::process | ( | uint32_t | frame, |
FrameBuffer * | input, | ||
FrameBuffer * | output | ||
) |
Passes the input framebuffer to the ISP worker to process.
[in] | frame | The frame number |
[in] | input | The input framebuffer |
[out] | output | The framebuffer to write the processed frame to |
void libcamera::SoftwareIsp::processStats | ( | const uint32_t | frame, |
const uint32_t | bufferId, | ||
const ControlList & | sensorControls | ||
) |
Process the statistics gathered.
[in] | frame | The frame number |
[in] | bufferId | ID of the statistics buffer |
[in] | sensorControls | The sensor controls |
Requests the IPA to calculate new parameters for ISP and new control values for the sensor.
int libcamera::SoftwareIsp::queueBuffers | ( | uint32_t | frame, |
FrameBuffer * | input, | ||
const std::map< const Stream *, FrameBuffer *> & | outputs | ||
) |
Queue buffers to Software ISP.
[in] | frame | The frame number |
[in] | input | The input framebuffer |
[in] | outputs | The container holding the output stream pointers and their respective frame buffer outputs |
void libcamera::SoftwareIsp::queueRequest | ( | const uint32_t | frame, |
const ControlList & | controls | ||
) |
Queue a request and process the control list from the application.
[in] | frame | The number of the frame which will be processed next |
[in] | controls | The controls for the frame |
SizeRange libcamera::SoftwareIsp::sizes | ( | PixelFormat | inputFormat, |
const Size & | inputSize | ||
) |
Get the supported output sizes for the given input format and size.
[in] | inputFormat | The input format |
[in] | inputSize | The input frame size |
int libcamera::SoftwareIsp::start | ( | ) |
Starts the Software ISP streaming operation.
void libcamera::SoftwareIsp::stop | ( | ) |
Stops the Software ISP streaming operation.
All pending buffers are returned back as canceled before this function returns.
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
[in] | outputFormat | The output format |
[in] | size | The output size (width and height in pixels) |