24#include "libcamera/internal/dma_buf_allocator.h"
25#include "libcamera/internal/global_configuration.h"
26#include "libcamera/internal/software_isp/benchmark.h"
27#include "libcamera/internal/software_isp/debayer_params.h"
42 const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,
47 virtual std::tuple<unsigned int, unsigned int>
51 virtual int start() {
return 0; }
Simple builtin benchmark.
Definition benchmark.h:21
Base debayering class.
Definition debayer.h:36
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.
PixelFormat outputPixelFormat_
The output pixel format.
Definition debayer.h:80
DebayerOutputConfig outputConfig_
Output configuration data for the debayered frame.
Definition debayer.h:77
unsigned int frameSize()
Get the output frame size.
Definition debayer.h:58
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 &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 void stop()
Stop the debayering process and perform cleanup.
Definition debayer.h:52
bool swapRedBlueGains_
Flag indicating whether red and blue channel gains should be swapped.
Definition debayer.h:81
virtual std::vector< PixelFormat > formats(PixelFormat inputFormat)=0
Get the supported output formats.
DebayerInputConfig inputConfig_
Input configuration parameters for the current debayer operation.
Definition debayer.h:76
static bool isStandardBayerOrder(BayerFormat::Order order)
Common method to validate standard 2x2 Bayer pattern of 2 Green, 1 Blue, 1 Red pixels.
Definition debayer.cpp:290
PixelFormat inputPixelFormat_
The incoming pixel format.
Definition debayer.h:79
virtual int start()
Execute a start signal in the debayer object from workerthread context.
Definition debayer.h:51
Size outputSize_
Output size object.
Definition debayer.h:78
Signal< FrameBuffer * > outputBufferReady
Signals when the output buffer is ready.
Definition debayer.h:61
void dmaSyncBegin(std::vector< DmaSyncer > &dmaSyncers, FrameBuffer *input, FrameBuffer *output)
Common CPU/GPU Dma Sync Buffer begin.
Definition debayer.cpp:275
Signal< FrameBuffer * > inputBufferReady
Signals when the input buffer is ready.
Definition debayer.h:60
Benchmark bench_
Benchmarking utility instance for performance measurements.
Definition debayer.h:82
virtual const SharedFD & getStatsFD()=0
Get the file descriptor for the statistics.
Debayer(const GlobalConfiguration &configuration)
Construct a Debayer object.
Definition debayer.cpp:61
Frame buffer data and its associated dynamic metadata.
Definition framebuffer.h:50
Support for global libcamera configuration.
Definition global_configuration.h:22
Object(Object *parent=nullptr)
Construct an Object instance.
Definition object.cpp:69
RAII-style wrapper for file descriptors.
Definition shared_fd.h:17
Generic signal and slot communication mechanism.
Definition signal.h:39
Describe a range of sizes.
Definition geometry.h:205
Describe a two-dimensional size.
Definition geometry.h:51
Data structures related to geometric objects.
#define LOG_DECLARE_CATEGORY(name)
Declare a category of log messages.
Definition log.h:51
Top-level libcamera namespace.
Definition backtrace.h:17
Base object to support automatic signal disconnection.
Signal & slot implementation.
Video stream for a Camera.
Struct to hold the debayer parameters.
Definition debayer_params.h:20
Structure describing the output frame configuration.
Definition debayer.h:70
unsigned int bpp
Definition debayer.h:71
unsigned int stride
Definition debayer.h:72
unsigned int frameSize
Definition debayer.h:73
Configuration parameters for a stream.
Definition stream.h:40