GstVaapiImageFormat

GstVaapiImageFormat — VA image format abstraction

Synopsis

enum                GstVaapiImageFormat;
gboolean            gst_vaapi_image_format_is_rgb       (GstVaapiImageFormat format);
gboolean            gst_vaapi_image_format_is_yuv       (GstVaapiImageFormat format);
GstVaapiImageFormat gst_vaapi_image_format              (const VAImageFormat *va_format);
GstVaapiImageFormat gst_vaapi_image_format_from_caps    (GstCaps *caps);
GstVaapiImageFormat gst_vaapi_image_format_from_fourcc  (guint32 fourcc);
GstVaapiImageFormat gst_vaapi_image_format_from_video   (GstVideoFormat format);
const VAImageFormat * gst_vaapi_image_format_get_va_format
                                                        (GstVaapiImageFormat format);
GstCaps *           gst_vaapi_image_format_get_caps     (GstVaapiImageFormat format);
guint               gst_vaapi_image_format_get_score    (GstVaapiImageFormat format);

Description

Details

enum GstVaapiImageFormat

enum GstVaapiImageFormat {
    GST_VAAPI_IMAGE_NV12 = GST_MAKE_FOURCC('N','V','1','2'),
    GST_VAAPI_IMAGE_YV12 = GST_MAKE_FOURCC('Y','V','1','2'),
    GST_VAAPI_IMAGE_I420 = GST_MAKE_FOURCC('I','4','2','0'),
    GST_VAAPI_IMAGE_AYUV = GST_MAKE_FOURCC('A','Y','U','V'),
    GST_VAAPI_IMAGE_ARGB = GST_MAKE_FOURCC('A','R','G','B'),
    GST_VAAPI_IMAGE_RGBA = GST_MAKE_FOURCC('R','G','B','A'),
    GST_VAAPI_IMAGE_ABGR = GST_MAKE_FOURCC('A','B','G','R'),
    GST_VAAPI_IMAGE_BGRA = GST_MAKE_FOURCC('B','G','R','A'),
};

The set of all image formats for GstVaapiImage.

GST_VAAPI_IMAGE_NV12

planar YUV 4:2:0, 12-bit, 1 plane for Y and 1 plane for UV

GST_VAAPI_IMAGE_YV12

planar YUV 4:2:0, 12-bit, 3 planes for Y V U

GST_VAAPI_IMAGE_I420

planar YUV 4:2:0, 12-bit, 3 planes for Y U V

GST_VAAPI_IMAGE_AYUV

packed YUV 4:4:4, 32-bit, A Y U V, native endian byte-order

GST_VAAPI_IMAGE_ARGB

packed RGB 8:8:8, 32-bit, A R G B

GST_VAAPI_IMAGE_RGBA

packed RGB 8:8:8, 32-bit, R G B A

GST_VAAPI_IMAGE_ABGR

packed RGB 8:8:8, 32-bit, A B G R

GST_VAAPI_IMAGE_BGRA

packed RGB 8:8:8, 32-bit, B G R A

gst_vaapi_image_format_is_rgb ()

gboolean            gst_vaapi_image_format_is_rgb       (GstVaapiImageFormat format);

Checks whether the format is an RGB format.

format :

a GstVaapiImageFormat

Returns :

TRUE if format is RGB format

gst_vaapi_image_format_is_yuv ()

gboolean            gst_vaapi_image_format_is_yuv       (GstVaapiImageFormat format);

Checks whether the format is an YUV format.

format :

a GstVaapiImageFormat

Returns :

TRUE if format is YUV format

gst_vaapi_image_format ()

GstVaapiImageFormat gst_vaapi_image_format              (const VAImageFormat *va_format);

Converts a VA image format into the corresponding GstVaapiImageFormat. If the image format cannot be represented by GstVaapiImageFormat, then zero is returned.

va_format :

a VAImageFormat

Returns :

the GstVaapiImageFormat describing the va_format

gst_vaapi_image_format_from_caps ()

GstVaapiImageFormat gst_vaapi_image_format_from_caps    (GstCaps *caps);

Converts caps into the corresponding GstVaapiImageFormat. If the image format cannot be represented by GstVaapiImageFormat, then zero is returned.

caps :

a GstCaps

Returns :

the GstVaapiImageFormat describing the caps

gst_vaapi_image_format_from_fourcc ()

GstVaapiImageFormat gst_vaapi_image_format_from_fourcc  (guint32 fourcc);

Converts a FOURCC value into the corresponding GstVaapiImageFormat. If the image format cannot be represented by GstVaapiImageFormat, then zero is returned.

fourcc :

a FOURCC value

Returns :

the GstVaapiImageFormat describing the FOURCC value

gst_vaapi_image_format_from_video ()

GstVaapiImageFormat gst_vaapi_image_format_from_video   (GstVideoFormat format);

Converts a GstVideoFormat into the corresponding GstVaapiImageFormat. If the image format cannot be represented by GstVaapiImageFormat, then zero is returned.

format :

a GstVideoFormat

Returns :

the GstVaapiImageFormat describing the video format

gst_vaapi_image_format_get_va_format ()

const VAImageFormat * gst_vaapi_image_format_get_va_format
                                                        (GstVaapiImageFormat format);

Converts a GstVaapiImageFormat into the corresponding VA image format. If no matching VA image format was found, NULL is returned and this error must be reported to be fixed.

format :

a GstVaapiImageFormat

Returns :

the VA image format, or NULL if none was found

gst_vaapi_image_format_get_caps ()

GstCaps *           gst_vaapi_image_format_get_caps     (GstVaapiImageFormat format);

Converts a GstVaapiImageFormat into the corresponding GstCaps. If no matching caps were found, NULL is returned.

format :

a GstVaapiImageFormat

Returns :

the newly allocated GstCaps, or NULL if none was found

gst_vaapi_image_format_get_score ()

guint               gst_vaapi_image_format_get_score    (GstVaapiImageFormat format);

Determines how "native" is this format. The lower is the returned score, the best format this is for the underlying hardware.

format :

a GstVaapiImageFormat

Returns :

the format score, or G_MAXUINT if none was found