vpi.Format

class vpi.Format

Define the format of an image.

An image format defines how image pixels are interpreted.

These image formats are guaranteed to work with algorithms that explicitly support them.

Attributes

vpi.Format.planes

Number of planes in the image format.

vpi.Format.channels

Number of channels in the image format.

Enumeration values

vpi.Format.INVALID

Invalid format, used when no format is selected.

vpi.Format.U8

Single plane with one 8-bit unsigned integer channel.

vpi.Format.U8_BL

Single plane with one block-linear 8-bit unsigned integer channel.

vpi.Format.S8

Single plane with one 8-bit signed integer channel.

vpi.Format.U16

Single plane with one 16-bit unsigned integer channel.

vpi.Format.U32

Single plane with one 32-bit unsigned integer channel.

vpi.Format.S32

Single plane with one 32-bit signed integer channel.

vpi.Format.S16

Single plane with one 16-bit signed integer channel.

vpi.Format.S16_BL

Single plane with one block-linear 16-bit signed integer channel.

vpi.Format._2S16

Single plane with two interleaved 16-bit signed integer channel.

vpi.Format._2S16_BL

Single plane with two interleaved block-linear 16-bit signed integer channel.

vpi.Format.F32

Single plane with one 32-bit floating point channel.

vpi.Format.F64

Single plane with one 64-bit floating point channel.

vpi.Format._2F32

Single plane with two interleaved 32-bit floating point channels.

vpi.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.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.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.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.Format.Y16

Single plane with one pitch-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information. Values range from 4096 to 60160. Below this range is considered black, above is considered white.

vpi.Format.Y16_BL

Single plane with one block-linear 16-bit unsigned integer channel with limited-range luma (grayscale) information. Values range from 4096 to 60160. Below this range is considered black, above is considered white.

vpi.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.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.Format.NV12

YUV420 8-bit pitch-linear format with limited range.

vpi.Format.NV12_BL

YUV420 8-bit block-linear format with limited range.

vpi.Format.NV12_ER

YUV420 8-bit pitch-linear format with full range.

vpi.Format.NV12_ER_BL

YUV420 8-bit block-linear format with full range.

vpi.Format.NV24

YUV444 8-bit pitch-linear format with limited range.

vpi.Format.NV24_BL

YUV444 8-bit block-linear format with limited range.

vpi.Format.NV24_ER

YUV444 8-bit pitch-linear format with full range.

vpi.Format.NV24_ER_BL

YUV444 8-bit block-linear format with full range.

vpi.Format.UYVY

YUV422 8-bit pitch-linear format in one plane with UYVY ordering and limited range.

vpi.Format.UYVY_BL

YUV422 8-bit block-linear format in one plane with UYVY ordering and limited range.

vpi.Format.UYVY_ER

YUV422 8-bit pitch-linear format in one plane with UYVY ordering and full range.

vpi.Format.UYVY_ER_BL

YUV422 8-bit block-linear format in one plane with UYVY ordering and full range.

vpi.Format.YUYV

YUV422 8-bit pitch-linear format in one plane with YUYV ordering and limited range. Also known as YUY2 format.

vpi.Format.YUYV_BL

YUV422 8-bit block-linear format in one plane with YUYV ordering and limited range. Also known as YUY2 format.

vpi.Format.YUYV_ER

YUV422 8-bit pitch-linear format in one plane with YUYV ordering and full range. Also known as YUY2 format.

vpi.Format.YUYV_ER_BL

YUV422 8-bit block-linear format in one plane with YUYV ordering and full range. Also known as YUY2 format.

vpi.Format.RGB8

Single plane with interleaved RGB 8-bit channel.

vpi.Format.BGR8

Single plane with interleaved BGR 8-bit channel.

vpi.Format.RGBA8

Single plane with interleaved RGBA 8-bit channel.

vpi.Format.BGRA8

Single plane with interleaved BGRA 8-bit channel.