Loading...
Searching...
No Matches
Video::VideoPixelFormatInfo Struct Reference

Detailed Description

Sample arrangement description.

Plane counts cover everything the matrix vendors emit:

  • 1: packed (BGRA8, UYVY, v210, R210, Mono*)
  • 2: semi-planar, chroma interleaved into one plane (NV12, P010, P210)
  • 3: fully planar (YUV420P, YUV422P, ...)
  • 4: fully planar plus a full-resolution alpha plane (YUVA444P)

Public Member Functions

constexpr bool isPlanar () const noexcept
 
constexpr bool isYuv () const noexcept
 
constexpr bool isRgb () const noexcept
 
constexpr bool isAchromatic () const noexcept
 
constexpr bool valid () const noexcept
 

Public Attributes

const char * name {"unknown"}
 
VideoPixelFormat format {VideoPixelFormat::Unknown}
 
ColorModel colorModel {ColorModel::Unknown}
 
uint8_t planeCount {1}
 
uint8_t horizontalSubsampling {1}
 
uint8_t verticalSubsampling {1}
 
uint16_t blockPixels {1}
 
uint16_t blockBytes {}
 
bool hasAlpha {}
 
ByteOrder byteOrder {ByteOrder::NA}
 
uint16_t preferredStrideAlignment {256}
 

Member Function Documentation

◆ isAchromatic()

constexpr bool Video::VideoPixelFormatInfo::isAchromatic ( ) const
inlineconstexprnoexcept

True when the format carries no chroma at all.

◆ isPlanar()

constexpr bool Video::VideoPixelFormatInfo::isPlanar ( ) const
inlineconstexprnoexcept

True when chroma lives in its own plane(s) rather than interleaved with luma inside one packed buffer.

◆ valid()

constexpr bool Video::VideoPixelFormatInfo::valid ( ) const
inlineconstexprnoexcept

False only for the Unknown sentinel.

Member Data Documentation

◆ blockPixels

uint16_t Video::VideoPixelFormatInfo::blockPixels {1}

Primary-plane block geometry: blockPixels pixels occupy blockBytes bytes. See the table header for why this replaces bits-per-pixel.

◆ horizontalSubsampling

uint8_t Video::VideoPixelFormatInfo::horizontalSubsampling {1}

1 for 4:4:4, 2 for 4:2:2 and 4:2:0, 4 for 4:1:1 and 4:1:0.

◆ preferredStrideAlignment

uint16_t Video::VideoPixelFormatInfo::preferredStrideAlignment {256}

Preferred stride alignment for callers with no constraint of their own. Devices with a real requirement must pass theirs to alignedRowBytes.

◆ verticalSubsampling

uint8_t Video::VideoPixelFormatInfo::verticalSubsampling {1}

1 for 4:2:2 and 4:1:1, 2 for 4:2:0, 4 for 4:1:0.


The documentation for this struct was generated from the following file: