Pre-defined image formats.
An image format defines how image pixels are interpreted. Each image format is defined by the following components:
These pre-defined formats are guaranteed to work with algorithms that explicitly support them. Image formats can also be user-defined using the vpiMakeImageFormat family of functions.
Using user-defined image formats with algorithms can lead to undefined behavior (segfaults, etc), but usually it works as expected. Result of algorithms using these image formats must be checked for correctness, as it's not guaranteed that they will work.
Enumerator |
---|
VPI_IMAGE_FORMAT_INVALID | Denotes an invalid image format.
|
VPI_IMAGE_FORMAT_U8 | Single plane with one 8-bit unsigned integer channel.
|
VPI_IMAGE_FORMAT_S8 | Single plane with one 8-bit signed integer channel.
|
VPI_IMAGE_FORMAT_U16 | Single plane with one 16-bit unsigned integer channel.
|
VPI_IMAGE_FORMAT_S16 | Single plane with one 16-bit signed integer channel.
|
VPI_IMAGE_FORMAT_U32 | Single plane with one 32-bit unsigned integer channel.
|
VPI_IMAGE_FORMAT_S32 | Single plane with one 32-bit signed integer channel.
|
VPI_IMAGE_FORMAT_2S16 | Single plane with two interleaved 16-bit signed integer channel.
|
VPI_IMAGE_FORMAT_2S16_BL | Single plane with two interleaved 16-bit signed integer channel.
|
VPI_IMAGE_FORMAT_F32 | Single plane with one 32-bit floating point channel.
|
VPI_IMAGE_FORMAT_F64 | Single plane with one 64-bit floating point channel.
|
VPI_IMAGE_FORMAT_2F32 | Single plane with two interleaved 32-bit floating point channels.
|
VPI_IMAGE_FORMAT_Y8 | Single plane with one pitch-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 16 to 235. Below this range is considered black, above is considered white.
|
VPI_IMAGE_FORMAT_Y8_ER | Single plane with one pitch-linear 8-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 255.
|
VPI_IMAGE_FORMAT_Y8_BL | Single plane with one block-linear 8-bit unsigned integer channel with limited-range luma (grayscale) information.
Values range from 16 to 235. Below this range is considered black, above is considered white.
|
VPI_IMAGE_FORMAT_Y8_ER_BL | Single plane with one block-linear 8-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 255.
|
VPI_IMAGE_FORMAT_Y16_ER | Single plane with one pitch-linear 16-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 65535.
|
VPI_IMAGE_FORMAT_Y16_ER_BL | Single plane with one block-linear 16-bit unsigned integer channel with full-range luma (grayscale) information.
Values range from 0 to 65535.
|
VPI_IMAGE_FORMAT_NV12 | YUV420sp 8-bit pitch-linear format with limited range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 16 to 235.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 16 to 240. Resolution is half of luma plane, both horizontally and vertically. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV12_BL | YUV420sp 8-bit block-linear format with limited range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 16 to 235.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. Resolution is half of luma plane, both horizontally and vertically. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV12_ER | YUV420sp 8-bit pitch-linear format with full range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 0 to 255.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. Resolution is half of luma plane, both horizontally and vertically. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV12_ER_BL | YUV420sp 8-bit block-linear format with full range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 0 to 255.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. Resolution is half of luma plane, both horizontally and vertically. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV24 | YUV444sp 8-bit pitch-linear format with limited range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 16 to 235.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 16 to 240. It has the same resolution as luma plane. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV24_BL | YUV444sp 8-bit block-linear format with limited range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 16 to 235.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. It has the same resolution as luma plane. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV24_ER | YUV444sp 8-bit pitch-linear format with full range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 0 to 255.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. It has the same resolution as luma plane. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_NV24_ER_BL | YUV444sp 8-bit block-linear format with full range.
Format is composed of two planes:
- One 8-bit channel with luma (Y'). Values range from 0 to 255.
- Two interleaved 8-bit channels with chroma (Cb,Cr). Values range from 0 to 255. It has the same resolution as luma plane. For a given pixel, Cb channel has lower memory address than Cr.
|
VPI_IMAGE_FORMAT_UYVY | YUV422 8-bit pitch-linear format in one plane with UYVY ordering and limited range.
|
VPI_IMAGE_FORMAT_UYVY_BL | YUV422 8-bit block-linear format in one plane with UYVY ordering and limited range.
|
VPI_IMAGE_FORMAT_UYVY_ER | YUV422 8-bit pitch-linear format in one plane with UYVY ordering and full range.
|
VPI_IMAGE_FORMAT_UYVY_ER_BL | YUV422 8-bit block-linear format in one plane with UYVY ordering and full range.
|
VPI_IMAGE_FORMAT_YUYV | YUV422 8-bit pitch-linear format in one plane with YUVY ordering and mitedrange.
Also known as YUY2 format.
|
VPI_IMAGE_FORMAT_YUYV_BL | YUV422 8-bit block-linear format in one plane with YUVY ordering and limited range.
Also known as YUY2 format.
|
VPI_IMAGE_FORMAT_YUYV_ER | YUV422 8-bit pitch-linear format in one plane with YUVY ordering and full range.
Also known as YUY2 format.
|
VPI_IMAGE_FORMAT_YUYV_ER_BL | YUV422 8-bit block-linear format in one plane with YUVY ordering and full range.
Also known as YUY2 format.
|
VPI_IMAGE_FORMAT_RGB8 | Single plane with interleaved RGB 8-bit channel.
|
VPI_IMAGE_FORMAT_BGR8 | Single plane with interleaved BGR 8-bit channel.
|
VPI_IMAGE_FORMAT_RGBA8 | Single plane with interleaved RGBA 8-bit channel.
|
VPI_IMAGE_FORMAT_BGRA8 | Single plane with interleaved BGRA 8-bit channel.
|