AVPKit
com::avpkit::core::IPixelFormat Class Reference

Information about how video data is formatted in an IVideoPicture object. More...

#include <IPixelFormat.h>

Inheritance diagram for com::avpkit::core::IPixelFormat:
Collaboration diagram for com::avpkit::core::IPixelFormat:

Public Types

enum  Type {
  NONE = -1 , YUV420P , YUYV422 , RGB24 ,
  BGR24 , YUV422P , YUV444P , YUV410P ,
  YUV411P , GRAY8 , MONOWHITE , MONOBLACK ,
  PAL8 , YUVJ420P , YUVJ422P , YUVJ444P ,
  UYVY422 , UYYVYY411 , BGR8 , BGR4 ,
  BGR4_BYTE , RGB8 , RGB4 , RGB4_BYTE ,
  NV12 , NV21 , ARGB , RGBA ,
  ABGR , BGRA , GRAY16BE , GRAY16LE ,
  YUV440P , YUVJ440P , YUVA420P , RGB48BE ,
  RGB48LE , RGB565BE , RGB565LE , RGB555BE ,
  RGB555LE , BGR565BE , BGR565LE , BGR555BE ,
  BGR555LE , VAAPI , YUV420P16LE , YUV420P16BE ,
  YUV422P16LE , YUV422P16BE , YUV444P16LE , YUV444P16BE ,
  DXVA2_VLD , RGB444LE , RGB444BE , BGR444LE ,
  BGR444BE , YA8 , Y400A = YA8 , GRAY8A = YA8 ,
  BGR48BE , BGR48LE , YUV420P9BE , YUV420P9LE ,
  YUV420P10BE , YUV420P10LE , YUV422P10BE , YUV422P10LE ,
  YUV444P9BE , YUV444P9LE , YUV444P10BE , YUV444P10LE ,
  YUV422P9BE , YUV422P9LE , GBRP , GBR24P = GBRP ,
  GBRP9BE , GBRP9LE , GBRP10BE , GBRP10LE ,
  GBRP16BE , GBRP16LE , YUVA422P , YUVA444P ,
  YUVA420P9BE , YUVA420P9LE , YUVA422P9BE , YUVA422P9LE ,
  YUVA444P9BE , YUVA444P9LE , YUVA420P10BE , YUVA420P10LE ,
  YUVA422P10BE , YUVA422P10LE , YUVA444P10BE , YUVA444P10LE ,
  YUVA420P16BE , YUVA420P16LE , YUVA422P16BE , YUVA422P16LE ,
  YUVA444P16BE , YUVA444P16LE , VDPAU , XYZ12LE ,
  XYZ12BE , NV16 , NV20LE , NV20BE ,
  RGBA64BE , RGBA64LE , BGRA64BE , BGRA64LE ,
  YVYU422 , YA16BE , YA16LE , GBRAP ,
  GBRAP16BE , GBRAP16LE , QSV , MMAL ,
  D3D11VA_VLD , CUDA , FMT_0RGB , RGB0 ,
  FMT_0BGR , BGR0 , YUV420P12BE , YUV420P12LE ,
  YUV420P14BE , YUV420P14LE , YUV422P12BE , YUV422P12LE ,
  YUV422P14BE , YUV422P14LE , YUV444P12BE , YUV444P12LE ,
  YUV444P14BE , YUV444P14LE , GBRP12BE , GBRP12LE ,
  GBRP14BE , GBRP14LE , YUVJ411P , BAYER_BGGR8 ,
  BAYER_RGGB8 , BAYER_GBRG8 , BAYER_GRBG8 , BAYER_BGGR16LE ,
  BAYER_BGGR16BE , BAYER_RGGB16LE , BAYER_RGGB16BE , BAYER_GBRG16LE ,
  BAYER_GBRG16BE , BAYER_GRBG16LE , BAYER_GRBG16BE , XVMC ,
  YUV440P10LE , YUV440P10BE , YUV440P12LE , YUV440P12BE ,
  AYUV64LE , AYUV64BE , VIDEOTOOLBOX , P010LE ,
  P010BE , MEDIACODEC , GBRAP12BE , GBRAP12LE ,
  GBRAP10BE , GBRAP10LE , GRAY12BE , GRAY12LE ,
  GRAY10BE , GRAY10LE , P016LE , P016BE ,
  D3D11 , GRAY9BE , GRAY9LE , GBRPF32BE ,
  GBRPF32LE , GBRAPF32BE , GBRAPF32LE , DRM_PRIME ,
  OPENCL , GRAY14BE , GRAY14LE , GRAYF32BE ,
  GRAYF32LE , YUVA422P12BE , YUVA422P12LE , YUVA444P12BE ,
  YUVA444P12LE , NV24 , NV42 , VULKAN ,
  Y210BE , Y210LE , NB
}
 Pixel format. More...
 
enum  YUVColorComponent { YUV_Y =0 , YUV_U =1 , YUV_V =2 }
 
typedef enum com::avpkit::core::IPixelFormat::Type Type
 Pixel format. More...
 

Static Public Member Functions

static unsigned char getYUV420PPixel (IVideoPicture *frame, int x, int y, YUVColorComponent c)
 Returns the byte for the coordinates at x and y for the color component c. More...
 
static void setYUV420PPixel (IVideoPicture *frame, int x, int y, YUVColorComponent c, unsigned char value)
 Sets the value of the color component c at the coordinates x and y in the given frame. More...
 
static int getYUV420PPixelOffset (IVideoPicture *frame, int x, int y, YUVColorComponent c)
 For a given x and y in a frame, and a given color components, this method tells you how far into the actual data you'd have to go to find the byte that represents that color/coordinate combination. More...
 

Additional Inherited Members

- Public Member Functions inherited from com::avpkit::ferry::RefCounted
virtual int32_t acquire ()
 Internal Only. More...
 
virtual int32_t release ()
 Internal Only. More...
 
virtual RefCountedcopyReference ()
 Create a new Java object that refers to the same native object. More...
 
virtual int32_t getCurrentRefCount ()
 Return the current reference count on this object. More...
 
void setJavaAllocator (void *allocator)
 This method is public but not part of the standard API. More...
 
void * getJavaAllocator ()
 This method is public but not part of the standard API. More...
 
- Protected Member Functions inherited from com::avpkit::ferry::RefCounted
virtual void destroy ()
 This method is called by RefCounted objects when their Ref Count reaches zero and they are about to be destroyed.
 
- Protected Attributes inherited from com::avpkit::ferry::RefCounted
AtomicIntegermRefCount
 This is the internal reference count, represented as an AtomicInteger to make sure it is thread safe.
 
void * mAllocator
 Not part of public API.
 

Detailed Description

Information about how video data is formatted in an IVideoPicture object.

This specifies the color space and how many bits pixel data takes. It also includes some utility methods for dealing with Type#YUV420P data; the most common type of encoding used in video files I've run across.

Definition at line 45 of file IPixelFormat.h.

Member Typedef Documentation

◆ Type

Pixel format.

Notes:

RGB32 is handled in an endian-specific manner. A RGBA color is put together as: (A << 24) | (R << 16) | (G << 8) | B This is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs.

When the pixel format is palettized RGB (PAL8), the palettized image data is stored in AVFrame.data[0]. The palette is transported in AVFrame.data[1] and, is 1024 bytes long (256 4-byte entries) and is formatted the same as in RGB32 described above (i.e., it is also endian-specific). Note also that the individual RGB palette components stored in AVFrame.data[1] should be in the range 0..255. This is important as many custom PAL8 video codecs that were designed to run on the IBM VGA graphics adapter use 6-bit palette components.

Member Enumeration Documentation

◆ Type

Pixel format.

Notes:

RGB32 is handled in an endian-specific manner. A RGBA color is put together as: (A << 24) | (R << 16) | (G << 8) | B This is stored as BGRA on little endian CPU architectures and ARGB on big endian CPUs.

When the pixel format is palettized RGB (PAL8), the palettized image data is stored in AVFrame.data[0]. The palette is transported in AVFrame.data[1] and, is 1024 bytes long (256 4-byte entries) and is formatted the same as in RGB32 described above (i.e., it is also endian-specific). Note also that the individual RGB palette components stored in AVFrame.data[1] should be in the range 0..255. This is important as many custom PAL8 video codecs that were designed to run on the IBM VGA graphics adapter use 6-bit palette components.

Enumerator
YUV420P 

planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)

YUYV422 

packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr

RGB24 

packed RGB 8:8:8, 24bpp, RGBRGB...

BGR24 

packed RGB 8:8:8, 24bpp, BGRBGR...

YUV422P 

planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)

YUV444P 

planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)

YUV410P 

planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)

YUV411P 

planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)

GRAY8 

Y , 8bpp.

MONOWHITE 

Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.

MONOBLACK 

Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.

PAL8 

8 bits with RGB32 palette

YUVJ420P 

planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of YUV420P and setting color_range

YUVJ422P 

planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of YUV422P and setting color_range

YUVJ444P 

planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of YUV444P and setting color_range

UYVY422 

packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1

UYYVYY411 

packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3

BGR8 

packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)

BGR4 

packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits

BGR4_BYTE 

packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)

RGB8 

packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)

RGB4 

packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits

RGB4_BYTE 

packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)

NV12 

planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)

NV21 

as above, but U and V bytes are swapped

ARGB 

packed ARGB 8:8:8:8, 32bpp, ARGBARGB...

RGBA 

packed RGBA 8:8:8:8, 32bpp, RGBARGBA...

ABGR 

packed ABGR 8:8:8:8, 32bpp, ABGRABGR...

BGRA 

packed BGRA 8:8:8:8, 32bpp, BGRABGRA...

GRAY16BE 

Y , 16bpp, big-endian.

GRAY16LE 

Y , 16bpp, little-endian.

YUV440P 

planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)

YUVJ440P 

planar YUV 4:4:0 full scale (JPEG), deprecated in favor of YUV440P and setting color_range

YUVA420P 

planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)

RGB48BE 

packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian

RGB48LE 

packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian

RGB565BE 

packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian

RGB565LE 

packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian

RGB555BE 

packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined

RGB555LE 

packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined

BGR565BE 

packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian

BGR565LE 

packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian

BGR555BE 

packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined

BGR555LE 

packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined

VAAPI 

Hardware acceleration through VA-API, data[3] contains a VASurfaceID.

YUV420P16LE 

planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian

YUV420P16BE 

planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian

YUV422P16LE 

planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

YUV422P16BE 

planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

YUV444P16LE 

planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian

YUV444P16BE 

planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian

DXVA2_VLD 

HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.

RGB444LE 

packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined

RGB444BE 

packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined

BGR444LE 

packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined

BGR444BE 

packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined

YA8 

8 bits gray, 8 bits alpha

Y400A 

alias for YA8

GRAY8A 

alias for YA8

BGR48BE 

packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian

BGR48LE 

packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian

YUV420P9BE 

The following 12 formats have the disadvantage of needing 1 format for each bit depth.

Notice that each 9/10 bits sample is stored in 16 bits with extra padding. If you want to support multiple bit depths, then using YUV420P16* with the bpp stored separately is better. planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian

YUV420P9LE 

planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian

YUV420P10BE 

planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian

YUV420P10LE 

planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian

YUV422P10BE 

planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

YUV422P10LE 

planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

YUV444P9BE 

planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian

YUV444P9LE 

planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian

YUV444P10BE 

planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian

YUV444P10LE 

planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian

YUV422P9BE 

planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

YUV422P9LE 

planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

GBRP 

planar GBR 4:4:4 24bpp

GBRP9BE 

planar GBR 4:4:4 27bpp, big-endian

GBRP9LE 

planar GBR 4:4:4 27bpp, little-endian

GBRP10BE 

planar GBR 4:4:4 30bpp, big-endian

GBRP10LE 

planar GBR 4:4:4 30bpp, little-endian

GBRP16BE 

planar GBR 4:4:4 48bpp, big-endian

GBRP16LE 

planar GBR 4:4:4 48bpp, little-endian

YUVA422P 

planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)

YUVA444P 

planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)

YUVA420P9BE 

planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian

YUVA420P9LE 

planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian

YUVA422P9BE 

planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian

YUVA422P9LE 

planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian

YUVA444P9BE 

planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian

YUVA444P9LE 

planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian

YUVA420P10BE 

planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)

YUVA420P10LE 

planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)

YUVA422P10BE 

planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)

YUVA422P10LE 

planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)

YUVA444P10BE 

planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)

YUVA444P10LE 

planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)

YUVA420P16BE 

planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)

YUVA420P16LE 

planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)

YUVA422P16BE 

planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)

YUVA422P16LE 

planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)

YUVA444P16BE 

planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)

YUVA444P16LE 

planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)

VDPAU 

HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.

XYZ12LE 

packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0

XYZ12BE 

packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0

NV16 

interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)

NV20LE 

interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

NV20BE 

interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

RGBA64BE 

packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian

RGBA64LE 

packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian

BGRA64BE 

packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian

BGRA64LE 

packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian

YVYU422 

packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb

YA16BE 

16 bits gray, 16 bits alpha (big-endian)

YA16LE 

16 bits gray, 16 bits alpha (little-endian)

GBRAP 

planar GBRA 4:4:4:4 32bpp

GBRAP16BE 

planar GBRA 4:4:4:4 64bpp, big-endian

GBRAP16LE 

planar GBRA 4:4:4:4 64bpp, little-endian

QSV 

HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.

MMAL 

HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.

D3D11VA_VLD 

HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer.

CUDA 

HW acceleration through CUDA.

data[i] contain CUdeviceptr pointers exactly as for system memory frames.

FMT_0RGB 

packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined

RGB0 

packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined

FMT_0BGR 

packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined

BGR0 

packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined

YUV420P12BE 

planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian

YUV420P12LE 

planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian

YUV420P14BE 

planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian

YUV420P14LE 

planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian

YUV422P12BE 

planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

YUV422P12LE 

planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

YUV422P14BE 

planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian

YUV422P14LE 

planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian

YUV444P12BE 

planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian

YUV444P12LE 

planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian

YUV444P14BE 

planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian

YUV444P14LE 

planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian

GBRP12BE 

planar GBR 4:4:4 36bpp, big-endian

GBRP12LE 

planar GBR 4:4:4 36bpp, little-endian

GBRP14BE 

planar GBR 4:4:4 42bpp, big-endian

GBRP14LE 

planar GBR 4:4:4 42bpp, little-endian

YUVJ411P 

planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of YUV411P and setting color_range

BAYER_BGGR8 

bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples

BAYER_RGGB8 

bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples

BAYER_GBRG8 

bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples

BAYER_GRBG8 

bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples

BAYER_BGGR16LE 

bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian

BAYER_BGGR16BE 

bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian

BAYER_RGGB16LE 

bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian

BAYER_RGGB16BE 

bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian

BAYER_GBRG16LE 

bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian

BAYER_GBRG16BE 

bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian

BAYER_GRBG16LE 

bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian

BAYER_GRBG16BE 

bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian

XVMC 

XVideo Motion Acceleration via common packet passing.

YUV440P10LE 

planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian

YUV440P10BE 

planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian

YUV440P12LE 

planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian

YUV440P12BE 

planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian

AYUV64LE 

packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian

AYUV64BE 

packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian

VIDEOTOOLBOX 

hardware decoding through Videotoolbox

P010LE 

like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian

P010BE 

like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian

MEDIACODEC 

HW decoding through Android MediaCodec

GBRAP12BE 

planar GBR 4:4:4:4 48bpp, big-endian

GBRAP12LE 

planar GBR 4:4:4:4 48bpp, little-endian

GBRAP10BE 

planar GBR 4:4:4:4 40bpp, big-endian

GBRAP10LE 

planar GBR 4:4:4:4 40bpp, little-endian

GRAY12BE 

Y , 12bpp, big-endian.

GRAY12LE 

Y , 12bpp, little-endian.

GRAY10BE 

Y , 10bpp, big-endian.

GRAY10LE 

Y , 10bpp, little-endian.

P016LE 

like NV12, with 16bpp per component, little-endian

P016BE 

like NV12, with 16bpp per component, big-endian

D3D11 

Hardware surfaces for Direct3D11.

This is preferred over the legacy D3D11VA_VLD. The new D3D11 hwaccel API and filtering support D3D11 only.

data[0] contains a ID3D11Texture2D pointer, and data[1] contains the texture array index of the frame as intptr_t if the ID3D11Texture2D is an array texture (or always 0 if it's a normal texture).

GRAY9BE 

Y , 9bpp, big-endian.

GRAY9LE 

Y , 9bpp, little-endian.

GBRPF32BE 

IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.

GBRPF32LE 

IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.

GBRAPF32BE 

IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.

GBRAPF32LE 

IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.

DRM_PRIME 

DRM-managed buffers exposed through PRIME buffer sharing.

data[0] points to an AVDRMFrameDescriptor.

OPENCL 

Hardware surfaces for OpenCL.

data[i] contain 2D image objects (typed in C as cl_mem, used in OpenCL as image2d_t) for each plane of the surface.

GRAY14BE 

Y , 14bpp, big-endian.

GRAY14LE 

Y , 14bpp, little-endian.

GRAYF32BE 

IEEE-754 single precision Y, 32bpp, big-endian.

GRAYF32LE 

IEEE-754 single precision Y, 32bpp, little-endian.

YUVA422P12BE 

planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian

YUVA422P12LE 

planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian

YUVA444P12BE 

planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian

YUVA444P12LE 

planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian

NV24 

planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)

NV42 

as above, but U and V bytes are swapped

VULKAN 

Vulkan hardware images.

data[0] points to an AVVkFrame

Y210BE 

packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian

Y210LE 

packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian

NB 

number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions

Definition at line 65 of file IPixelFormat.h.

65  {
66  NONE = -1,
67  YUV420P,
68  YUYV422,
69  RGB24,
70  BGR24,
71  YUV422P,
72  YUV444P,
73  YUV410P,
74  YUV411P,
75  GRAY8,
76  MONOWHITE,
77  MONOBLACK,
78  PAL8,
79  YUVJ420P,
80  YUVJ422P,
81  YUVJ444P,
82  UYVY422,
83  UYYVYY411,
84  BGR8,
85  BGR4,
86  BGR4_BYTE,
87  RGB8,
88  RGB4,
89  RGB4_BYTE,
90  NV12,
91  NV21,
92 
93  ARGB,
94  RGBA,
95  ABGR,
96  BGRA,
97 
98  GRAY16BE,
99  GRAY16LE,
100  YUV440P,
101  YUVJ440P,
102  YUVA420P,
103  RGB48BE,
104  RGB48LE,
105 
106  RGB565BE,
107  RGB565LE,
108  RGB555BE,
109  RGB555LE,
110 
111  BGR565BE,
112  BGR565LE,
113  BGR555BE,
114  BGR555LE,
115 
116  #if FF_API_VAAPI
119  VAAPI_MOCO,
120  VAAPI_IDCT,
121  VAAPI_VLD,
123  VAAPI = VAAPI_VLD,
124  #else
129  VAAPI,
130  #endif
131 
132  YUV420P16LE,
133  YUV420P16BE,
134  YUV422P16LE,
135  YUV422P16BE,
136  YUV444P16LE,
137  YUV444P16BE,
138  DXVA2_VLD,
139 
140  RGB444LE,
141  RGB444BE,
142  BGR444LE,
143  BGR444BE,
144  YA8,
145 
146  Y400A = YA8,
147  GRAY8A= YA8,
148 
149  BGR48BE,
150  BGR48LE,
151 
157  YUV420P9BE,
158  YUV420P9LE,
159  YUV420P10BE,
160  YUV420P10LE,
161  YUV422P10BE,
162  YUV422P10LE,
163  YUV444P9BE,
164  YUV444P9LE,
165  YUV444P10BE,
166  YUV444P10LE,
167  YUV422P9BE,
168  YUV422P9LE,
169  GBRP,
170  GBR24P = GBRP, // alias for #GBRP
171  GBRP9BE,
172  GBRP9LE,
173  GBRP10BE,
174  GBRP10LE,
175  GBRP16BE,
176  GBRP16LE,
177  YUVA422P,
178  YUVA444P,
179  YUVA420P9BE,
180  YUVA420P9LE,
181  YUVA422P9BE,
182  YUVA422P9LE,
183  YUVA444P9BE,
184  YUVA444P9LE,
185  YUVA420P10BE,
186  YUVA420P10LE,
187  YUVA422P10BE,
188  YUVA422P10LE,
189  YUVA444P10BE,
190  YUVA444P10LE,
191  YUVA420P16BE,
192  YUVA420P16LE,
193  YUVA422P16BE,
194  YUVA422P16LE,
195  YUVA444P16BE,
196  YUVA444P16LE,
197 
198  VDPAU,
199 
200  XYZ12LE,
201  XYZ12BE,
202  NV16,
203  NV20LE,
204  NV20BE,
205 
206  RGBA64BE,
207  RGBA64LE,
208  BGRA64BE,
209  BGRA64LE,
210 
211  YVYU422,
212 
213  YA16BE,
214  YA16LE,
215 
216  GBRAP,
217  GBRAP16BE,
218  GBRAP16LE,
223  QSV,
228  MMAL,
229 
230  D3D11VA_VLD,
231 
236  CUDA,
237 
238  FMT_0RGB,
239  RGB0,
240  FMT_0BGR,
241  BGR0,
242 
243  YUV420P12BE,
244  YUV420P12LE,
245  YUV420P14BE,
246  YUV420P14LE,
247  YUV422P12BE,
248  YUV422P12LE,
249  YUV422P14BE,
250  YUV422P14LE,
251  YUV444P12BE,
252  YUV444P12LE,
253  YUV444P14BE,
254  YUV444P14LE,
255  GBRP12BE,
256  GBRP12LE,
257  GBRP14BE,
258  GBRP14LE,
259  YUVJ411P,
260 
261  BAYER_BGGR8,
262  BAYER_RGGB8,
263  BAYER_GBRG8,
264  BAYER_GRBG8,
273 
274  XVMC,
275 
276  YUV440P10LE,
277  YUV440P10BE,
278  YUV440P12LE,
279  YUV440P12BE,
280  AYUV64LE,
281  AYUV64BE,
282 
283  VIDEOTOOLBOX,
284 
285  P010LE,
286  P010BE,
287 
288  MEDIACODEC,
289 
290  GBRAP12BE,
291  GBRAP12LE,
292 
293  GBRAP10BE,
294  GBRAP10LE,
295 
296  GRAY12BE,
297  GRAY12LE,
298  GRAY10BE,
299  GRAY10LE,
300 
301  P016LE,
302  P016BE,
303 
314  D3D11,
315 
316  GRAY9BE,
317  GRAY9LE,
318 
319  GBRPF32BE,
320  GBRPF32LE,
321  GBRAPF32BE,
322  GBRAPF32LE,
323 
329  DRM_PRIME,
336  OPENCL,
337 
338  GRAY14BE,
339  GRAY14LE,
340 
341  GRAYF32BE,
342  GRAYF32LE,
343 
344  YUVA422P12BE,
345  YUVA422P12LE,
346  YUVA444P12BE,
347  YUVA444P12LE,
348 
349  NV24,
350  NV42,
351 
357  VULKAN,
358 
359  Y210BE,
360  Y210LE,
361 
362  NB
363  } Type;
@ YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: IPixelFormat.h:196
@ YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: IPixelFormat.h:177
@ NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: IPixelFormat.h:90
@ BAYER_BGGR8
bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
Definition: IPixelFormat.h:261
@ YUV422P16BE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:135
@ YUVJ420P
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of YUV420P and setting color_range
Definition: IPixelFormat.h:79
@ GBRP14BE
planar GBR 4:4:4 42bpp, big-endian
Definition: IPixelFormat.h:257
@ GRAYF32BE
IEEE-754 single precision Y, 32bpp, big-endian.
Definition: IPixelFormat.h:341
@ GRAY10LE
Y , 10bpp, little-endian.
Definition: IPixelFormat.h:299
@ YUVA422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
Definition: IPixelFormat.h:344
@ YUYV422
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
Definition: IPixelFormat.h:68
@ BGRA64LE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: IPixelFormat.h:209
@ YUV444P10BE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: IPixelFormat.h:165
@ GRAY16LE
Y , 16bpp, little-endian.
Definition: IPixelFormat.h:99
@ GBRP12LE
planar GBR 4:4:4 36bpp, little-endian
Definition: IPixelFormat.h:256
@ YUVJ422P
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of YUV422P and setting color_range
Definition: IPixelFormat.h:80
@ YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: IPixelFormat.h:67
@ YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: IPixelFormat.h:71
@ OPENCL
Hardware surfaces for OpenCL.
Definition: IPixelFormat.h:336
@ RGB444LE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
Definition: IPixelFormat.h:140
@ YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: IPixelFormat.h:160
@ GBRAP16LE
planar GBRA 4:4:4:4 64bpp, little-endian
Definition: IPixelFormat.h:218
@ FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
Definition: IPixelFormat.h:238
@ BGR4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in ...
Definition: IPixelFormat.h:85
@ BAYER_RGGB8
bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
Definition: IPixelFormat.h:262
@ BGR48LE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as lit...
Definition: IPixelFormat.h:150
@ YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: IPixelFormat.h:100
@ GRAY12LE
Y , 12bpp, little-endian.
Definition: IPixelFormat.h:297
@ YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: IPixelFormat.h:186
@ BGR4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: IPixelFormat.h:86
@ YUV422P14BE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:249
@ GRAYF32LE
IEEE-754 single precision Y, 32bpp, little-endian.
Definition: IPixelFormat.h:342
@ RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: IPixelFormat.h:69
@ RGBA64BE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: IPixelFormat.h:206
@ YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: IPixelFormat.h:72
@ BGR444LE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
Definition: IPixelFormat.h:142
@ VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: IPixelFormat.h:129
@ DRM_PRIME
DRM-managed buffers exposed through PRIME buffer sharing.
Definition: IPixelFormat.h:329
@ NV21
as above, but U and V bytes are swapped
Definition: IPixelFormat.h:91
@ YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:168
@ YUVA444P16BE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: IPixelFormat.h:195
@ YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: IPixelFormat.h:73
@ AYUV64BE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
Definition: IPixelFormat.h:281
@ BAYER_GRBG16BE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
Definition: IPixelFormat.h:272
@ MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
Definition: IPixelFormat.h:77
@ XVMC
XVideo Motion Acceleration via common packet passing.
Definition: IPixelFormat.h:274
@ YUV420P12BE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: IPixelFormat.h:243
@ YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: IPixelFormat.h:136
@ P010BE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: IPixelFormat.h:286
@ GRAY9BE
Y , 9bpp, big-endian.
Definition: IPixelFormat.h:316
@ XYZ12BE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big...
Definition: IPixelFormat.h:201
@ RGB4
packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in ...
Definition: IPixelFormat.h:88
@ BAYER_GBRG16BE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
Definition: IPixelFormat.h:270
@ YUV420P14BE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: IPixelFormat.h:245
@ YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: IPixelFormat.h:102
@ Y210LE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
Definition: IPixelFormat.h:360
@ YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: IPixelFormat.h:276
@ YUV420P16BE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: IPixelFormat.h:133
@ GRAY14BE
Y , 14bpp, big-endian.
Definition: IPixelFormat.h:338
@ BAYER_RGGB16LE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
Definition: IPixelFormat.h:267
@ RGB565BE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
Definition: IPixelFormat.h:106
@ UYYVYY411
packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
Definition: IPixelFormat.h:83
@ YUVJ444P
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of YUV444P and setting color_range
Definition: IPixelFormat.h:81
@ UYVY422
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
Definition: IPixelFormat.h:82
@ YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: IPixelFormat.h:166
@ YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: IPixelFormat.h:164
@ RGB444BE
packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
Definition: IPixelFormat.h:141
@ YUVA422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
Definition: IPixelFormat.h:345
@ MEDIACODEC
HW decoding through Android MediaCodec
Definition: IPixelFormat.h:288
@ YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: IPixelFormat.h:158
@ YUVA444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
Definition: IPixelFormat.h:347
@ CUDA
HW acceleration through CUDA.
Definition: IPixelFormat.h:236
@ YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:248
@ RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: IPixelFormat.h:207
@ BGR565LE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
Definition: IPixelFormat.h:112
@ P016BE
like NV12, with 16bpp per component, big-endian
Definition: IPixelFormat.h:302
@ YUVJ440P
planar YUV 4:4:0 full scale (JPEG), deprecated in favor of YUV440P and setting color_range
Definition: IPixelFormat.h:101
@ YA16LE
16 bits gray, 16 bits alpha (little-endian)
Definition: IPixelFormat.h:214
@ GRAY10BE
Y , 10bpp, big-endian.
Definition: IPixelFormat.h:298
@ VIDEOTOOLBOX
hardware decoding through Videotoolbox
Definition: IPixelFormat.h:283
@ BGR444BE
packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
Definition: IPixelFormat.h:143
@ ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
Definition: IPixelFormat.h:93
@ NV16
interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: IPixelFormat.h:202
@ GBRP14LE
planar GBR 4:4:4 42bpp, little-endian
Definition: IPixelFormat.h:258
@ GBRAP12BE
planar GBR 4:4:4:4 48bpp, big-endian
Definition: IPixelFormat.h:290
@ GBRP12BE
planar GBR 4:4:4 36bpp, big-endian
Definition: IPixelFormat.h:255
@ NV20BE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:204
@ YUV422P12BE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:247
@ YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:162
@ BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: IPixelFormat.h:84
@ YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: IPixelFormat.h:74
@ BAYER_GRBG16LE
bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
Definition: IPixelFormat.h:271
@ YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
Definition: IPixelFormat.h:180
@ YUVA422P16BE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: IPixelFormat.h:193
@ GRAY9LE
Y , 9bpp, little-endian.
Definition: IPixelFormat.h:317
@ GBRPF32BE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian.
Definition: IPixelFormat.h:319
@ YUVA420P9BE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
Definition: IPixelFormat.h:179
@ RGB8
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
Definition: IPixelFormat.h:87
@ BGR48BE
packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big...
Definition: IPixelFormat.h:149
@ DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
Definition: IPixelFormat.h:138
@ GBRPF32LE
IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian.
Definition: IPixelFormat.h:320
@ BAYER_GRBG8
bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
Definition: IPixelFormat.h:264
@ YUV422P9BE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:167
@ GRAY16BE
Y , 16bpp, big-endian.
Definition: IPixelFormat.h:98
@ P016LE
like NV12, with 16bpp per component, little-endian
Definition: IPixelFormat.h:301
@ BAYER_BGGR16BE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
Definition: IPixelFormat.h:266
@ RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: IPixelFormat.h:94
@ BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
Definition: IPixelFormat.h:96
@ GBRP
planar GBR 4:4:4 24bpp
Definition: IPixelFormat.h:169
@ BAYER_BGGR16LE
bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
Definition: IPixelFormat.h:265
@ YUV422P10BE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
Definition: IPixelFormat.h:161
@ YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
Definition: IPixelFormat.h:278
@ VULKAN
Vulkan hardware images.
Definition: IPixelFormat.h:357
@ GBRAPF32LE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian.
Definition: IPixelFormat.h:322
@ YUV444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: IPixelFormat.h:251
@ PAL8
8 bits with RGB32 palette
Definition: IPixelFormat.h:78
@ P010LE
like NV12, with 10bpp per component, data in the high bits, zeros in the low bits,...
Definition: IPixelFormat.h:285
@ YUVA444P9BE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
Definition: IPixelFormat.h:183
@ YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
Definition: IPixelFormat.h:190
@ GBRAP12LE
planar GBR 4:4:4:4 48bpp, little-endian
Definition: IPixelFormat.h:291
@ NV20LE
interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:203
@ YUVA422P10BE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
Definition: IPixelFormat.h:187
@ YA8
8 bits gray, 8 bits alpha
Definition: IPixelFormat.h:144
@ XYZ12LE
packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as lit...
Definition: IPixelFormat.h:200
@ YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: IPixelFormat.h:252
@ BGR555BE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
Definition: IPixelFormat.h:113
@ YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: IPixelFormat.h:246
@ ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
Definition: IPixelFormat.h:95
@ YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: IPixelFormat.h:188
@ RGB565LE
packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
Definition: IPixelFormat.h:107
@ BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
Definition: IPixelFormat.h:241
@ Y210BE
packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
Definition: IPixelFormat.h:359
@ YUVA422P9BE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
Definition: IPixelFormat.h:181
@ BAYER_GBRG16LE
bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
Definition: IPixelFormat.h:269
@ BAYER_GBRG8
bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
Definition: IPixelFormat.h:263
@ GBRP10LE
planar GBR 4:4:4 30bpp, little-endian
Definition: IPixelFormat.h:174
@ GRAY12BE
Y , 12bpp, big-endian.
Definition: IPixelFormat.h:296
@ D3D11
Hardware surfaces for Direct3D11.
Definition: IPixelFormat.h:314
@ YUV420P10BE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
Definition: IPixelFormat.h:159
@ YUV444P16BE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: IPixelFormat.h:137
@ GBRAPF32BE
IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian.
Definition: IPixelFormat.h:321
@ NV24
planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
Definition: IPixelFormat.h:349
@ GBRAP10LE
planar GBR 4:4:4:4 40bpp, little-endian
Definition: IPixelFormat.h:294
@ GBRP16BE
planar GBR 4:4:4 48bpp, big-endian
Definition: IPixelFormat.h:175
@ YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:134
@ YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
Definition: IPixelFormat.h:254
@ YUVA420P10BE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: IPixelFormat.h:185
@ GBRAP10BE
planar GBR 4:4:4:4 40bpp, big-endian
Definition: IPixelFormat.h:293
@ YUVJ411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition: IPixelFormat.h:259
@ FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
Definition: IPixelFormat.h:240
@ BGR565BE
packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
Definition: IPixelFormat.h:111
@ YUV420P9BE
The following 12 formats have the disadvantage of needing 1 format for each bit depth.
Definition: IPixelFormat.h:157
@ GRAY14LE
Y , 14bpp, little-endian.
Definition: IPixelFormat.h:339
@ YUV444P9BE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: IPixelFormat.h:163
@ RGB555LE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
Definition: IPixelFormat.h:109
@ YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
Definition: IPixelFormat.h:192
@ MMAL
HW acceleration though MMAL, data[3] contains a pointer to the MMAL_BUFFER_HEADER_T structure.
Definition: IPixelFormat.h:228
@ YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: IPixelFormat.h:178
@ YVYU422
packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
Definition: IPixelFormat.h:211
@ GBRP10BE
planar GBR 4:4:4 30bpp, big-endian
Definition: IPixelFormat.h:173
@ YUVA444P10BE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
Definition: IPixelFormat.h:189
@ YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
Definition: IPixelFormat.h:184
@ GBRP16LE
planar GBR 4:4:4 48bpp, little-endian
Definition: IPixelFormat.h:176
@ YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
Definition: IPixelFormat.h:182
@ GBRP9BE
planar GBR 4:4:4 27bpp, big-endian
Definition: IPixelFormat.h:171
@ YUV444P14BE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
Definition: IPixelFormat.h:253
@ RGB555BE
packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
Definition: IPixelFormat.h:108
@ YUV440P12BE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
Definition: IPixelFormat.h:279
@ VDPAU
HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface.
Definition: IPixelFormat.h:198
@ RGB48BE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: IPixelFormat.h:103
@ YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: IPixelFormat.h:244
@ YUVA444P12BE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
Definition: IPixelFormat.h:346
@ GBRAP16BE
planar GBRA 4:4:4:4 64bpp, big-endian
Definition: IPixelFormat.h:217
@ YUV440P10BE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
Definition: IPixelFormat.h:277
@ RGB4_BYTE
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: IPixelFormat.h:89
@ AYUV64LE
packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
Definition: IPixelFormat.h:280
@ YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
Definition: IPixelFormat.h:250
@ BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: IPixelFormat.h:70
@ BGRA64BE
packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: IPixelFormat.h:208
@ YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
Definition: IPixelFormat.h:194
@ NB
number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of...
Definition: IPixelFormat.h:362
@ NV42
as above, but U and V bytes are swapped
Definition: IPixelFormat.h:350
@ BGR555LE
packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
Definition: IPixelFormat.h:114
@ D3D11VA_VLD
HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView p...
Definition: IPixelFormat.h:230
@ BAYER_RGGB16BE
bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
Definition: IPixelFormat.h:268
@ YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
Definition: IPixelFormat.h:132
@ YUVA420P16BE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
Definition: IPixelFormat.h:191
@ YA16BE
16 bits gray, 16 bits alpha (big-endian)
Definition: IPixelFormat.h:213
@ RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: IPixelFormat.h:104
@ GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: IPixelFormat.h:216
@ QSV
HW acceleration through QSV, data[3] contains a pointer to the mfxFrameSurface1 structure.
Definition: IPixelFormat.h:223
@ RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
Definition: IPixelFormat.h:239
@ GBRP9LE
planar GBR 4:4:4 27bpp, little-endian
Definition: IPixelFormat.h:172
@ MONOWHITE
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb.
Definition: IPixelFormat.h:76

Member Function Documentation

◆ getYUV420PPixel()

unsigned char com::avpkit::core::IPixelFormat::getYUV420PPixel ( IVideoPicture frame,
int  x,
int  y,
YUVColorComponent  c 
)
static

Returns the byte for the coordinates at x and y for the color component c.

Parameters
frameThe frame to get the byte from
xX coordinate in pixels, where 0 is the left hand edge of the image.
yY coordinate in pixels, where 0 is the top edge of the image.
cYUVColor component
Exceptions
std::exceptionframe is null, the coordinates are invalid, or if the pixel format is not YUV420P
Returns
the pixel byte for that x, y, c combination

Definition at line 46 of file IPixelFormat.cpp.

47  {
48  unsigned char result = 0;
49 
50  int offset = getYUV420PPixelOffset(frame, x, y, c);
51  RefPointer<IBuffer> buffer = frame->getData();
52  unsigned char * bytes = (unsigned char*)buffer->getBytes(0, offset+1);
53 
54  if (!bytes)
55  throw std::runtime_error("could not find bytes in frame");
56  result = bytes[offset];
57  return result;
58  }
static int getYUV420PPixelOffset(IVideoPicture *frame, int x, int y, YUVColorComponent c)
For a given x and y in a frame, and a given color components, this method tells you how far into the ...
This class is only useful from C++.
Definition: RefPointer.h:47

References com::avpkit::core::IMediaData::getData().

◆ getYUV420PPixelOffset()

int com::avpkit::core::IPixelFormat::getYUV420PPixelOffset ( IVideoPicture frame,
int  x,
int  y,
YUVColorComponent  c 
)
static

For a given x and y in a frame, and a given color components, this method tells you how far into the actual data you'd have to go to find the byte that represents that color/coordinate combination.

Parameters
frameThe frame to get the byte from
xX coordinate in pixels, where 0 is the left hand edge of the image.
yY coordinate in pixels, where 0 is the top edge of the image.
cYUVColor component
Exceptions
std::exceptionframe is null, the coordinates are invalid, or if the pixel format is not YUV420P
Returns
the offset in bytes, starting from the start of the frame data, where the data for this pixel resides.

Definition at line 76 of file IPixelFormat.cpp.

77  {
78  if (!frame)
79  throw std::runtime_error("no frame");
80 
81  int width = frame->getWidth();
82  if (x < 0 || x >= width)
83  throw std::runtime_error("x value invalid for input frame");
84 
85  int height = frame->getHeight();
86  if (y < 0 || y >= height)
87  throw std::runtime_error("y value invalid for input frame");
88 
89  if (frame->getPixelType() != YUV420P)
90  throw std::runtime_error("pixel type of input frame is incorrect");
91 
92  int offset = PixelFormat::getFastYUV420PPixelOffset(frame->getWidth(), frame->getHeight(), x, y, c);
93  VS_LOG_TRACE("w: %d; h: %d; x: %d; y: %d; c: %d; offset: %d",
94  frame->getWidth(), frame->getHeight(), x, y, c, offset);
95  return offset;
96 
97  }

References com::avpkit::core::IVideoPicture::getHeight(), com::avpkit::core::IVideoPicture::getPixelType(), and com::avpkit::core::IVideoPicture::getWidth().

◆ setYUV420PPixel()

void com::avpkit::core::IPixelFormat::setYUV420PPixel ( IVideoPicture frame,
int  x,
int  y,
YUVColorComponent  c,
unsigned char  value 
)
static

Sets the value of the color component c at the coordinates x and y in the given frame.

Parameters
frameThe frame to set the byte in
xX coordinate in pixels, where 0 is the left hand edge of the image.
yY coordinate in pixels, where 0 is the top edge of the image.
cYUVColor component to set
valueThe new value of that pixel color component
Exceptions
std::exceptionframe is null, the coordinates are invalid, or if the pixel format is not YUV420P

Definition at line 61 of file IPixelFormat.cpp.

62  {
63  int offset = getYUV420PPixelOffset(frame, x, y, c);
64  RefPointer<IBuffer> buffer = frame->getData();
65  unsigned char * bytes = (unsigned char*)buffer->getBytes(0, offset+1);
66 
67  if (!bytes)
68  {
69  VS_LOG_DEBUG("Could not find buffer of length: %d", offset+1);
70  throw std::runtime_error("could not find bytes in frame");
71  }
72  bytes[offset] = value;
73  }

References com::avpkit::core::IMediaData::getData().


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