libcamera v0.7.0+1-4ceceb68
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
libcamera::ipa::V4L2ParamsBlock< T > Class Template Reference

Helper class that represents an ISP configuration block. More...

Public Member Functions

 V4L2ParamsBlock (const Span< uint8_t > data)
 Construct a V4L2ParamsBlock with memory represented by data.
 
virtual void setEnabled (bool enabled)
 Enable/disable an ISP configuration block.
 
virtual const T * operator-> () const
 Access the ISP configuration block casting it to the kernel-defined ISP configuration type.
 
virtual T * operator-> ()
 Access the ISP configuration block casting it to the kernel-defined ISP configuration type.
 
virtual const T & operator* () const
 Access the ISP configuration block casting it to the kernel-defined ISP configuration type.
 
virtual T & operator* ()
 Access the ISP configuration block casting it to the kernel-defined ISP configuration type.
 

Protected Attributes

Span< uint8_t > data_
 Memory area reserved for the ISP configuration block.
 

Detailed Description

template<typename T>
class libcamera::ipa::V4L2ParamsBlock< T >

Helper class that represents an ISP configuration block.

Each ISP function is associated with a set of configuration parameters defined by the kernel interface.

This class represents an ISP block configuration entry. It is constructed with a reference to the memory area where the block configuration will be stored in the parameters buffer. The template parameter represents the underlying kernel-defined ISP block configuration type and allows its user to easily cast it to said type to populate and read the configuration parameters.

See also
V4L2Params::block()

Constructor & Destructor Documentation

◆ V4L2ParamsBlock()

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::V4L2ParamsBlock ( const Span< uint8_t >  data)
inline

Construct a V4L2ParamsBlock with memory represented by data.

Parameters
[in]dataThe memory area where the ISP block is located

Member Function Documentation

◆ operator*() [1/2]

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::operator* ( )
inlinevirtual

Access the ISP configuration block casting it to the kernel-defined ISP configuration type.

The V4L2ParamsBlock is templated with the kernel defined ISP configuration block type. This function allows users to easily cast a V4L2ParamsBlock to the underlying kernel-defined type in order to easily populate or read the ISP configuration data.

// The kernel header defines the ISP configuration types, in example
// struct my_isp_awb_config_data {
// u16 gain_ch00;
// u16 gain_ch01;
// u16 gain_ch10;
// u16 gain_ch11;
// }
awbBlock->gain_ch00 = ...;
awbBlock->gain_ch01 = ...;
awbBlock->gain_ch10 = ...;
awbBlock->gain_ch11 = ...;
Helper class that represents an ISP configuration block.
Definition v4l2_params.h:27

Users of this class shall not create a V4L2ParamsBlock manually but should use V4L2Params::block().

◆ operator*() [2/2]

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::operator* ( ) const
inlinevirtual

Access the ISP configuration block casting it to the kernel-defined ISP configuration type.

The V4L2ParamsBlock is templated with the kernel defined ISP configuration block type. This function allows users to easily cast a V4L2ParamsBlock to the underlying kernel-defined type in order to easily populate or read the ISP configuration data.

// The kernel header defines the ISP configuration types, in example
// struct my_isp_awb_config_data {
// u16 gain_ch00;
// u16 gain_ch01;
// u16 gain_ch10;
// u16 gain_ch11;
// }
awbBlock->gain_ch00 = ...;
awbBlock->gain_ch01 = ...;
awbBlock->gain_ch10 = ...;
awbBlock->gain_ch11 = ...;

Users of this class shall not create a V4L2ParamsBlock manually but should use V4L2Params::block().

◆ operator->() [1/2]

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::operator-> ( )
inlinevirtual

Access the ISP configuration block casting it to the kernel-defined ISP configuration type.

The V4L2ParamsBlock is templated with the kernel defined ISP configuration block type. This function allows users to easily cast a V4L2ParamsBlock to the underlying kernel-defined type in order to easily populate or read the ISP configuration data.

// The kernel header defines the ISP configuration types, in example
// struct my_isp_awb_config_data {
// u16 gain_ch00;
// u16 gain_ch01;
// u16 gain_ch10;
// u16 gain_ch11;
// }
awbBlock->gain_ch00 = ...;
awbBlock->gain_ch01 = ...;
awbBlock->gain_ch10 = ...;
awbBlock->gain_ch11 = ...;

Users of this class shall not create a V4L2ParamsBlock manually but should use V4L2Params::block().

◆ operator->() [2/2]

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::operator-> ( ) const
inlinevirtual

Access the ISP configuration block casting it to the kernel-defined ISP configuration type.

The V4L2ParamsBlock is templated with the kernel defined ISP configuration block type. This function allows users to easily cast a V4L2ParamsBlock to the underlying kernel-defined type in order to easily populate or read the ISP configuration data.

// The kernel header defines the ISP configuration types, in example
// struct my_isp_awb_config_data {
// u16 gain_ch00;
// u16 gain_ch01;
// u16 gain_ch10;
// u16 gain_ch11;
// }
awbBlock->gain_ch00 = ...;
awbBlock->gain_ch01 = ...;
awbBlock->gain_ch10 = ...;
awbBlock->gain_ch11 = ...;

Users of this class shall not create a V4L2ParamsBlock manually but should use V4L2Params::block().

◆ setEnabled()

template<typename T >
libcamera::ipa::V4L2ParamsBlock< T >::setEnabled ( bool  enabled)
inlinevirtual

Enable/disable an ISP configuration block.

Parameters
[in]enabledThe enable flag

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