# GstVulkanFormat

## GstVulkanFormatInfo

### Members

`format` (VkFormat) –

the Vulkan format being described

`name` (const gchar *) –

name of this format

`scaling` (GstVulkanFormatScaling) –

how raw data is interpreted and scaled

`flags` (GstVulkanFormatFlags) –

flags that apply to this format

`bits` (guint) –

The number of bits used to pack data items. This can be less than 8 when multiple pixels are stored in a byte. for values > 8 multiple bytes should be read according to the endianness flag before applying the shift and mask. n_components; number of components in this format

`n_components` (guint) –
No description available
`shift` (guint8 *) –

the number of bits to shift away to get the component data

`depth` (guint8 *) –

the depth in bits for each component

`pixel_stride` (gint8 *) –
No description available
`n_planes` (guint) –

the number of planes for this format. The number of planes can be less than the amount of components when multiple components are packed into one plane.

`plane` (guint8 *) –

the plane number where a component can be found

`poffset` (guint8 *) –

the offset in the plane where the first pixel of the components can be found.

`w_sub` (guint8 *) –

subsampling factor of the width for the component. Use GST_VIDEO_SUB_SCALE to scale a width.

`h_sub` (guint8 *) –

subsampling factor of the height for the component. Use GST_VIDEO_SUB_SCALE to scale a height.

`aspect` (VkImageAspectFlags) –

image aspect of this format

Since : 1.18

## GstVulkan.VulkanFormatInfo

### Members

`format` (Vulkan.Format) –

the Vulkan format being described

`name` (String) –

name of this format

`scaling` (GstVulkan.VulkanFormatScaling) –

how raw data is interpreted and scaled

`flags` (GstVulkan.VulkanFormatFlags) –

flags that apply to this format

`bits` (Number) –

The number of bits used to pack data items. This can be less than 8 when multiple pixels are stored in a byte. for values > 8 multiple bytes should be read according to the endianness flag before applying the shift and mask. n_components; number of components in this format

`n_components` (Number) –
No description available
`shift` ([ Number ]) –

the number of bits to shift away to get the component data

`depth` ([ Number ]) –

the depth in bits for each component

`pixel_stride` ([ Number ]) –
No description available
`n_planes` (Number) –

the number of planes for this format. The number of planes can be less than the amount of components when multiple components are packed into one plane.

`plane` ([ Number ]) –

the plane number where a component can be found

`poffset` ([ Number ]) –

the offset in the plane where the first pixel of the components can be found.

`w_sub` ([ Number ]) –

subsampling factor of the width for the component. Use GST_VIDEO_SUB_SCALE to scale a width.

`h_sub` ([ Number ]) –

subsampling factor of the height for the component. Use GST_VIDEO_SUB_SCALE to scale a height.

`aspect` (Vulkan.ImageAspectFlags) –

image aspect of this format

Since : 1.18

## GstVulkan.VulkanFormatInfo

### Members

`format` (Vulkan.Format) –

the Vulkan format being described

`name` (str) –

name of this format

`scaling` (GstVulkan.VulkanFormatScaling) –

how raw data is interpreted and scaled

`flags` (GstVulkan.VulkanFormatFlags) –

flags that apply to this format

`bits` (int) –

The number of bits used to pack data items. This can be less than 8 when multiple pixels are stored in a byte. for values > 8 multiple bytes should be read according to the endianness flag before applying the shift and mask. n_components; number of components in this format

`n_components` (int) –
No description available
`shift` ([ int ]) –

the number of bits to shift away to get the component data

`depth` ([ int ]) –

the depth in bits for each component

`pixel_stride` ([ int ]) –
No description available
`n_planes` (int) –

the number of planes for this format. The number of planes can be less than the amount of components when multiple components are packed into one plane.

`plane` ([ int ]) –

the plane number where a component can be found

`poffset` ([ int ]) –

the offset in the plane where the first pixel of the components can be found.

`w_sub` ([ int ]) –

subsampling factor of the width for the component. Use GST_VIDEO_SUB_SCALE to scale a width.

`h_sub` ([ int ]) –

subsampling factor of the height for the component. Use GST_VIDEO_SUB_SCALE to scale a height.

`aspect` (Vulkan.ImageAspectFlags) –

image aspect of this format

Since : 1.18

## GstVulkanFormatMap

### Members

`format` (GstVideoFormat) –

the GStreamer video format

`vkfrmt` (VkFormat) –

the Vulkan format with a single memory

`vkfrmts` (VkFormat*) –

Vulkan formats for multiple memories

Since : 1.26

## GstVulkan.VulkanFormatMap

### Members

`format` (GstVideo.VideoFormat) –

the GStreamer video format

`vkfrmt` (Vulkan.Format) –

the Vulkan format with a single memory

`vkfrmts` ([ Vulkan.Format]) –

Vulkan formats for multiple memories

Since : 1.26

## GstVulkan.VulkanFormatMap

### Members

`format` (GstVideo.VideoFormat) –

the GStreamer video format

`vkfrmt` (Vulkan.Format) –

the Vulkan format with a single memory

`vkfrmts` ([ Vulkan.Format]) –

Vulkan formats for multiple memories

Since : 1.26

## Functions

### gst_vulkan_format_from_video_info

    VkFormat
    gst_vulkan_format_from_video_info (GstVideoInfo * v_info,
                                       guint plane)

Parameters:

`v_info` –

the GstVideoInfo

`plane` –

the plane

Returns –

the VkFormat to use for v_format and plane

Since : 1.18

### gst_vulkan_format_from_video_info_2

    gboolean
    gst_vulkan_format_from_video_info_2 (GstVulkanDevice * device,
                                         GstVideoInfo * info,
                                         VkImageTiling tiling,
                                         gboolean no_multiplane,
                                         VkImageUsageFlags requested_usage,
                                         VkFormat* fmts,
                                         int* n_imgs,
                                         VkImageUsageFlags* usage)

Parameters:

`device` –

a GstVulkanDevice

`info` –

the GstVideoInfo

`tiling` –

the tiling to use

`no_multiplane` –

query for vulkan formats without multiple images

`requested_usage` –
No description available
`fmts` ( [out][array fixed-size=4]) –

Vulkan formats per image/plane

`n_imgs` ( [out]) –

number of images/planes used by the Vulkan format

`usage` ( [out]) –

The potential usage of the format

Returns –

TRUE if requested GStreamer format maps to a Vulkan format and its properties.

Since : 1.24

### gst_vulkan_format_get_aspect

    guint
    gst_vulkan_format_get_aspect (VkFormat format)

Parameters:

`format` –

Vulkan Format

Returns –

the format aspect

Since : 1.24

### GstVulkan.prototype.vulkan_format_get_aspect

    function GstVulkan.prototype.vulkan_format_get_aspect(format: Vulkan.Format): {
        // javascript wrapper for 'gst_vulkan_format_get_aspect'
    }

Parameters:

`format` (Vulkan.Format) –

Vulkan Format

Returns (Number) –

the format aspect

Since : 1.24

### GstVulkan.vulkan_format_get_aspect

    def GstVulkan.vulkan_format_get_aspect (format):
        #python wrapper for 'gst_vulkan_format_get_aspect'

Parameters:

`format` (Vulkan.Format) –

Vulkan Format

Returns (int) –

the format aspect

Since : 1.24

### gst_vulkan_format_get_info

    const GstVulkanFormatInfo *
    gst_vulkan_format_get_info (VkFormat format)

Parameters:

`format` –

a valid `VkFormat`

Returns ( [nullable]) –

the GstVulkanFormatInfo for format or NULL

Since : 1.18

### GstVulkan.prototype.vulkan_format_get_info

    function GstVulkan.prototype.vulkan_format_get_info(format: Vulkan.Format): {
        // javascript wrapper for 'gst_vulkan_format_get_info'
    }

Parameters:

`format` (Vulkan.Format) –

a valid `VkFormat`

Returns (GstVulkan.VulkanFormatInfo) –

the GstVulkan.VulkanFormatInfo for format or null

Since : 1.18

### GstVulkan.vulkan_format_get_info

    def GstVulkan.vulkan_format_get_info (format):
        #python wrapper for 'gst_vulkan_format_get_info'

Parameters:

`format` (Vulkan.Format) –

a valid `VkFormat`

Returns (GstVulkan.VulkanFormatInfo) –

the GstVulkan.VulkanFormatInfo for format or None

Since : 1.18

### gst_vulkan_format_get_map

    const GstVulkanFormatMap *
    gst_vulkan_format_get_map (GstVideoFormat format)

Parameters:

`format` –

the GstVideoFormat to get

Returns ( [nullable]) –

the GstVulkanFormatMap matching with format

Since : 1.26

### gst_vulkan_format_to_video_format

    GstVideoFormat
    gst_vulkan_format_to_video_format (VkFormat vk_format)

Parameters:

`vk_format` –

the Vulkan format to convert

Returns –

the GstVideoFormat that maps to vk_format

Since : 1.24

### GstVulkan.prototype.vulkan_format_to_video_format

    function GstVulkan.prototype.vulkan_format_to_video_format(vk_format: Vulkan.Format): {
        // javascript wrapper for 'gst_vulkan_format_to_video_format'
    }

Parameters:

`vk_format` (Vulkan.Format) –

the Vulkan format to convert

Returns (GstVideo.VideoFormat) –

the GstVideo.VideoFormat that maps to vk_format

Since : 1.24

### GstVulkan.vulkan_format_to_video_format

    def GstVulkan.vulkan_format_to_video_format (vk_format):
        #python wrapper for 'gst_vulkan_format_to_video_format'

Parameters:

`vk_format` (Vulkan.Format) –

the Vulkan format to convert

Returns (GstVideo.VideoFormat) –

the GstVideo.VideoFormat that maps to vk_format

Since : 1.24

## Enumerations

### GstVulkanFormatFlags

##### Members

`GST_VULKAN_FORMAT_FLAG_YUV` (1) –

is a YUV format

`GST_VULKAN_FORMAT_FLAG_RGB` (2) –

is a RGB format

`GST_VULKAN_FORMAT_FLAG_ALPHA` (4) –

has an alpha channel

`GST_VULKAN_FORMAT_FLAG_LE` (8) –

data is stored in little-endiate byte order

`GST_VULKAN_FORMAT_FLAG_COMPLEX` (16) –

data is stored complex and cannot be read/write only using the information in the GstVulkanFormatInfo

Since : 1.18

### GstVulkan.VulkanFormatFlags

##### Members

`GstVulkan.VulkanFormatFlags.YUV` (1) –

is a YUV format

`GstVulkan.VulkanFormatFlags.RGB` (2) –

is a RGB format

`GstVulkan.VulkanFormatFlags.ALPHA` (4) –

has an alpha channel

`GstVulkan.VulkanFormatFlags.LE` (8) –

data is stored in little-endiate byte order

`GstVulkan.VulkanFormatFlags.COMPLEX` (16) –

data is stored complex and cannot be read/write only using the information in the GstVulkan.VulkanFormatInfo

Since : 1.18

### GstVulkan.VulkanFormatFlags

##### Members

`GstVulkan.VulkanFormatFlags.YUV` (1) –

is a YUV format

`GstVulkan.VulkanFormatFlags.RGB` (2) –

is a RGB format

`GstVulkan.VulkanFormatFlags.ALPHA` (4) –

has an alpha channel

`GstVulkan.VulkanFormatFlags.LE` (8) –

data is stored in little-endiate byte order

`GstVulkan.VulkanFormatFlags.COMPLEX` (16) –

data is stored complex and cannot be read/write only using the information in the GstVulkan.VulkanFormatInfo

Since : 1.18

### GstVulkanFormatScaling

##### Members

`GST_VULKAN_FORMAT_SCALING_UNORM` (1) –

[0, 2^n - 1] -> [0.0, 1.0]

`GST_VULKAN_FORMAT_SCALING_SNORM` (2) –

[-2^(n-1), 2^(n-1) - 1] -> [-1.0, 1.0]

`GST_VULKAN_FORMAT_SCALING_USCALED` (3) –

[0, 2^n - 1] -> [0.0, float(2^n - 1)]

`GST_VULKAN_FORMAT_SCALING_SSCALED` (4) –

[-2^(n-1), 2^(n-1) - 1] -> [float(-2^(n-1)), float(2^(n-1) - 1)]

`GST_VULKAN_FORMAT_SCALING_UINT` (5) –

[0, 2^n - 1] -> [0, 2^n - 1]

`GST_VULKAN_FORMAT_SCALING_SINT` (6) –

[-2^(n-1), 2^(n-1) - 1] -> [-2^(n-1), 2^(n-1) - 1]

`GST_VULKAN_FORMAT_SCALING_SRGB` (7) –

GST_VULKAN_FORMAT_SCALING_UNORM but the first three components are gamma corrected for the sRGB colour space.

Since : 1.18

### GstVulkan.VulkanFormatScaling

##### Members

`GstVulkan.VulkanFormatScaling.UNORM` (1) –

[0, 2^n - 1] -> [0.0, 1.0]

`GstVulkan.VulkanFormatScaling.SNORM` (2) –

[-2^(n-1), 2^(n-1) - 1] -> [-1.0, 1.0]

`GstVulkan.VulkanFormatScaling.USCALED` (3) –

[0, 2^n - 1] -> [0.0, float(2^n - 1)]

`GstVulkan.VulkanFormatScaling.SSCALED` (4) –

[-2^(n-1), 2^(n-1) - 1] -> [float(-2^(n-1)), float(2^(n-1) - 1)]

`GstVulkan.VulkanFormatScaling.UINT` (5) –

[0, 2^n - 1] -> [0, 2^n - 1]

`GstVulkan.VulkanFormatScaling.SINT` (6) –

[-2^(n-1), 2^(n-1) - 1] -> [-2^(n-1), 2^(n-1) - 1]

`GstVulkan.VulkanFormatScaling.SRGB` (7) –

GST_VULKAN_FORMAT_SCALING_UNORM but the first three components are gamma corrected for the sRGB colour space.

Since : 1.18

### GstVulkan.VulkanFormatScaling

##### Members

`GstVulkan.VulkanFormatScaling.UNORM` (1) –

[0, 2^n - 1] -> [0.0, 1.0]

`GstVulkan.VulkanFormatScaling.SNORM` (2) –

[-2^(n-1), 2^(n-1) - 1] -> [-1.0, 1.0]

`GstVulkan.VulkanFormatScaling.USCALED` (3) –

[0, 2^n - 1] -> [0.0, float(2^n - 1)]

`GstVulkan.VulkanFormatScaling.SSCALED` (4) –

[-2^(n-1), 2^(n-1) - 1] -> [float(-2^(n-1)), float(2^(n-1) - 1)]

`GstVulkan.VulkanFormatScaling.UINT` (5) –

[0, 2^n - 1] -> [0, 2^n - 1]

`GstVulkan.VulkanFormatScaling.SINT` (6) –

[-2^(n-1), 2^(n-1) - 1] -> [-2^(n-1), 2^(n-1) - 1]

`GstVulkan.VulkanFormatScaling.SRGB` (7) –

GST_VULKAN_FORMAT_SCALING_UNORM but the first three components are gamma corrected for the sRGB colour space.

Since : 1.18

## Constants

### GST_VULKAN_MAX_COMPONENTS

    #define GST_VULKAN_MAX_COMPONENTS 4

Since : 1.18

### GstVulkan.VULKAN_MAX_COMPONENTS

Since : 1.18

### GstVulkan.VULKAN_MAX_COMPONENTS

Since : 1.18

The results of the search are