libcamera  v0.2.0+150-2031e2f2
Supporting cameras in Linux since 2019
Public Member Functions | Public Attributes | List of all members
libcamera::Debayer Class Referenceabstract

Base debayering class. More...

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

Public Member Functions

virtual int configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration >> &outputCfgs)=0
 Configure the debayer object according to the passed in parameters. More...
 
virtual std::vector< PixelFormatformats (PixelFormat inputFormat)=0
 Get the supported output formats. More...
 
virtual std::tuple< unsigned int, unsigned int > strideAndFrameSize (const PixelFormat &outputFormat, const Size &size)=0
 Get the stride and the frame size. More...
 
virtual void process (FrameBuffer *input, FrameBuffer *output, DebayerParams params)=0
 Process the bayer data into the requested format. More...
 
virtual SizeRange sizes (PixelFormat inputFormat, const Size &inputSize)=0
 Get the supported output sizes for the given input format and size. More...
 

Public Attributes

Signal< FrameBuffer * > inputBufferReady
 Signals when the input buffer is ready.
 
Signal< FrameBuffer * > outputBufferReady
 Signals when the output buffer is ready.
 

Detailed Description

Base debayering class.

Base class that provides functions for setting up the debayering process.

Member Function Documentation

◆ configure()

int libcamera::Debayer::configure ( const StreamConfiguration inputCfg,
const std::vector< std::reference_wrapper< StreamConfiguration >> &  outputCfgs 
)
pure virtual

Configure the debayer object according to the passed in parameters.

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

Implemented in libcamera::DebayerCpu.

◆ formats()

std::vector< PixelFormat > libcamera::Debayer::formats ( PixelFormat  inputFormat)
pure virtual

Get the supported output formats.

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

Implemented in libcamera::DebayerCpu.

◆ process()

void libcamera::Debayer::process ( FrameBuffer input,
FrameBuffer output,
DebayerParams  params 
)
pure virtual

Process the bayer data into the requested format.

Parameters
[in]inputThe input buffer.
[in]outputThe output buffer.
[in]paramsThe parameters to be used in debayering.
Note
DebayerParams is passed by value deliberately so that a copy is passed when this is run in another thread by invokeMethod().

Implemented in libcamera::DebayerCpu.

◆ sizes()

SizeRange libcamera::Debayer::sizes ( PixelFormat  inputFormat,
const Size inputSize 
)
pure 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.

Implemented in libcamera::DebayerCpu.

◆ strideAndFrameSize()

std::tuple< unsigned int, unsigned int > libcamera::Debayer::strideAndFrameSize ( const PixelFormat outputFormat,
const Size size 
)
pure 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.

Implemented in libcamera::DebayerCpu.


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