|
libcamera v0.7.0+1-4ceceb68
Supporting cameras in Linux since 2019
|
Base debayering class. More...


Classes | |
| struct | DebayerInputConfig |
| Structure describing the incoming Bayer parameters. More... | |
| struct | DebayerOutputConfig |
| Structure describing the output frame configuration. More... | |
Public Member Functions | |
| Debayer (const GlobalConfiguration &configuration) | |
| Construct a Debayer object. | |
| virtual int | configure (const StreamConfiguration &inputCfg, const std::vector< std::reference_wrapper< StreamConfiguration > > &outputCfgs, bool ccmEnabled)=0 |
| Configure the debayer object according to the passed in parameters. | |
| virtual std::vector< PixelFormat > | formats (PixelFormat inputFormat)=0 |
| Get the supported output formats. | |
| virtual std::tuple< unsigned int, unsigned int > | strideAndFrameSize (const PixelFormat &outputFormat, const Size &size)=0 |
| Get the stride and the frame size. | |
| virtual void | process (uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)=0 |
| Process the bayer data into the requested format. | |
| virtual int | start () |
| Execute a start signal in the debayer object from workerthread context. | |
| virtual void | stop () |
| Stop the debayering process and perform cleanup. | |
| virtual SizeRange | sizes (PixelFormat inputFormat, const Size &inputSize)=0 |
| Get the supported output sizes for the given input format and size. | |
| virtual const SharedFD & | getStatsFD ()=0 |
| Get the file descriptor for the statistics. | |
| unsigned int | frameSize () |
| Get the output frame size. | |
Public Member Functions inherited from libcamera::Object | |
| Object (Object *parent=nullptr) | |
| Construct an Object instance. | |
| virtual | ~Object () |
| Destroy an Object instance. | |
| void | deleteLater () |
| Schedule deletion of the instance in the thread it belongs to. | |
| void | postMessage (std::unique_ptr< Message > msg) |
| Post a message to the object's thread. | |
| 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. | |
| Thread * | thread () const |
| Retrieve the thread the object is bound to. | |
| void | moveToThread (Thread *thread) |
| Move the object and all its children to a different thread. | |
| Object * | parent () const |
| Retrieve the object's parent. | |
Public Attributes | |
| Signal< FrameBuffer * > | inputBufferReady |
| Signals when the input buffer is ready. | |
| Signal< FrameBuffer * > | outputBufferReady |
| Signals when the output buffer is ready. | |
| DebayerInputConfig | inputConfig_ |
| Input configuration parameters for the current debayer operation. | |
| DebayerOutputConfig | outputConfig_ |
| Output configuration data for the debayered frame. | |
| Size | outputSize_ |
| Output size object. | |
| PixelFormat | inputPixelFormat_ |
| The incoming pixel format. | |
| PixelFormat | outputPixelFormat_ |
| The output pixel format. | |
| bool | swapRedBlueGains_ |
| Flag indicating whether red and blue channel gains should be swapped. | |
| Benchmark | bench_ |
| Benchmarking utility instance for performance measurements. | |
Protected Member Functions | |
| void | dmaSyncBegin (std::vector< DmaSyncer > &dmaSyncers, FrameBuffer *input, FrameBuffer *output) |
| Common CPU/GPU Dma Sync Buffer begin. | |
Protected Member Functions inherited from libcamera::Object | |
| virtual void | message (Message *msg) |
| Message handler for the object. | |
| bool | assertThreadBound (const char *message) |
| Check if the caller complies with thread-bound constraints. | |
Static Protected Member Functions | |
| static bool | isStandardBayerOrder (BayerFormat::Order order) |
| Common method to validate standard 2x2 Bayer pattern of 2 Green, 1 Blue, 1 Red pixels. | |
Base debayering class.
Base class that provides functions for setting up the debayering process.
| libcamera::Debayer::Debayer | ( | const GlobalConfiguration & | configuration | ) |
Construct a Debayer object.
| [in] | configuration | Global configuration reference |
|
pure virtual |
Configure the debayer object according to the passed in parameters.
| [in] | inputCfg | The input configuration |
| [in] | outputCfgs | The output configurations |
| [in] | ccmEnabled | Whether a color correction matrix is applied |
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
|
pure virtual |
Get the supported output formats.
| [in] | inputFormat | The input format |
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
|
inline |
Get the output frame size.
|
pure virtual |
Get the file descriptor for the statistics.
This file descriptor provides access to the output statistics buffer associated with the current debayering process.
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
|
pure virtual |
Process the bayer data into the requested format.
| [in] | frame | The frame number |
| [in] | input | The input buffer |
| [in] | output | The output buffer |
| [in] | params | The parameters to be used in debayering |
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
|
pure virtual |
Get the supported output sizes for the given input format and size.
| [in] | inputFormat | The input format |
| [in] | inputSize | The input size |
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
|
inlinevirtual |
Execute a start signal in the debayer object from workerthread context.
The start() method is invoked so that a Debayer object can initialise internal variables or data. It is called from the software_isp::start method.
This method is particularly useful with DebayerEGL as it allows for the initialisation of the EGL stack after configure in a thread-safe manner.
Reimplemented in libcamera::DebayerEGL.
|
inlinevirtual |
Stop the debayering process and perform cleanup.
The stop() method is invoked as the logically corollary of start(). Debayer::stop() will be called by software_isp::stop() allowing for any cleanup which should happend with stop().
The stop method similar to start() is useful for DebayerEGL as it allows for cleanup of EGL context and/or data that happens in DebayerEGL::start.
Reimplemented in libcamera::DebayerEGL.
|
pure virtual |
Get the stride and the frame size.
| [in] | outputFormat | The output format |
| [in] | size | The output size |
Implemented in libcamera::DebayerCpu, and libcamera::DebayerEGL.
| libcamera::Debayer::bench_ |
Benchmarking utility instance for performance measurements.
Used internally to track timing and performance metrics during debayer processing.
| libcamera::Debayer::inputConfig_ |
Input configuration parameters for the current debayer operation.
Holds metadata describing the incoming Bayer image layout, including pattern size, bytes per pixel, stride, and supported output formats. Populated during configuration.
| libcamera::Debayer::outputConfig_ |
Output configuration data for the debayered frame.
Contains bytes per pixel, stride, and total frame size for the output image buffer. Set during stream configuration.
| libcamera::Debayer::swapRedBlueGains_ |
Flag indicating whether red and blue channel gains should be swapped.
Used when the Bayer pattern order indicates that red/blue color channels are reversed.