libcamera
v0.0.0
Supporting cameras in Linux since 2019
|
Information about pixel formats. More...
Public Types | |
enum | ColourEncoding { ColourEncodingRGB , ColourEncodingYUV , ColourEncodingRAW } |
The colour encoding type. More... | |
Public Member Functions | |
bool | isValid () const |
Check if the pixel format info is valid. More... | |
Static Public Member Functions | |
static const PixelFormatInfo & | info (const PixelFormat &format) |
Retrieve information about a pixel format. More... | |
Public Attributes | |
const char * | name |
The format name as a human-readable string, used as the test representation of the PixelFormat. | |
PixelFormat | format |
The PixelFormat described by this instance. | |
V4L2PixelFormat | v4l2Format |
The V4L2 pixel format corresponding to the PixelFormat. | |
unsigned int | bitsPerPixel |
The average number of bits per pixel. More... | |
enum ColourEncoding | colourEncoding |
The colour encoding type. | |
bool | packed |
Tell if multiple pixels are packed in the same bytes. More... | |
Information about pixel formats.
The PixelFormatInfo class groups together information describing a pixel format. It facilitates handling of pixel formats by providing data commonly used in pipeline handlers.
|
static |
Retrieve information about a pixel format.
[in] | format | The pixel format |
|
inline |
Check if the pixel format info is valid.
libcamera::PixelFormatInfo::bitsPerPixel |
The average number of bits per pixel.
The number per pixel averages the total number of bits for all colour components over the whole image, excluding any padding bits or padding pixels.
For formats that store pixels with bit padding within words, only the effective bits are taken into account. For instance, 12-bit Bayer data stored in two bytes per pixel report 12, not 16, in this field.
Formats that don't have a fixed number of bits per pixel, such as compressed formats, report 0 in this field.
libcamera::PixelFormatInfo::packed |
Tell if multiple pixels are packed in the same bytes.
Packed formats are defined as storing data from multiple pixels in the same bytes. For instance, 12-bit Bayer data with two pixels stored in three bytes is packed, while the same data stored with 4 bits of padding in two bytes per pixel is not packed.