FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | FFVkFormatMapEntry |
Macros | |
#define | ASPECT_2PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT) |
#define | ASPECT_3PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT | VK_IMAGE_ASPECT_PLANE_2_BIT) |
Functions | |
enum AVPixelFormat | ff_vk_pix_fmt_from_vkfmt (VkFormat vkf) |
Get pixfmt from a Vulkan format. More... | |
VkImageAspectFlags | ff_vk_aspect_bits_from_vkfmt (VkFormat vkf) |
Get aspect bits which include all planes from a VkFormat. More... | |
VkVideoChromaSubsamplingFlagBitsKHR | ff_vk_subsampling_from_av_desc (const AVPixFmtDescriptor *desc) |
Get Vulkan's chroma subsampling from a pixfmt descriptor. More... | |
VkVideoComponentBitDepthFlagBitsKHR | ff_vk_depth_from_av_depth (int depth) |
Get Vulkan's bit depth from an [8:12] integer. More... | |
int | ff_vk_h264_level_to_av (StdVideoH264LevelIdc level) |
Convert level from Vulkan to AV. More... | |
StdVideoH264LevelIdc | ff_vk_h264_level_to_vk (int level_idc) |
int | ff_vk_h265_level_to_av (StdVideoH265LevelIdc level) |
StdVideoH265LevelIdc | ff_vk_h265_level_to_vk (int level_idc) |
StdVideoH264ProfileIdc | ff_vk_h264_profile_to_vk (int profile) |
Convert profile from/to AV to Vulkan. More... | |
StdVideoH265ProfileIdc | ff_vk_h265_profile_to_vk (int profile) |
int | ff_vk_h264_profile_to_av (StdVideoH264ProfileIdc profile) |
int | ff_vk_h265_profile_to_av (StdVideoH264ProfileIdc profile) |
int | ff_vk_video_qf_init (FFVulkanContext *s, FFVkQueueFamilyCtx *qf, VkQueueFlagBits family, VkVideoCodecOperationFlagBitsKHR caps) |
Chooses a QF and loads it into a context. More... | |
int | ff_vk_create_view (FFVulkanContext *s, FFVkVideoCommon *common, VkImageView *view, VkImageAspectFlags *aspect, AVVkFrame *src, VkFormat vkf, int is_dpb) |
Creates image views for video frames. More... | |
av_cold void | ff_vk_video_common_uninit (FFVulkanContext *s, FFVkVideoCommon *common) |
Free video session and required resources. More... | |
av_cold int | ff_vk_video_common_init (AVCodecContext *avctx, FFVulkanContext *s, FFVkVideoCommon *common, VkVideoSessionCreateInfoKHR *session_create) |
Initialize video session, allocating and binding necessary memory. More... | |
Variables | |
static const struct FFVkFormatMapEntry | vk_format_map [] |
static const int | nb_vk_format_map = FF_ARRAY_ELEMS(vk_format_map) |
#define ASPECT_2PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT) |
Definition at line 22 of file vulkan_video.c.
#define ASPECT_3PLANE (VK_IMAGE_ASPECT_PLANE_0_BIT | VK_IMAGE_ASPECT_PLANE_1_BIT | VK_IMAGE_ASPECT_PLANE_2_BIT) |
Definition at line 23 of file vulkan_video.c.
enum AVPixelFormat ff_vk_pix_fmt_from_vkfmt | ( | VkFormat | vkf | ) |
Get pixfmt from a Vulkan format.
Definition at line 99 of file vulkan_video.c.
Referenced by ff_vulkan_encode_init(), and vulkan_decode_get_profile().
VkImageAspectFlags ff_vk_aspect_bits_from_vkfmt | ( | VkFormat | vkf | ) |
Get aspect bits which include all planes from a VkFormat.
Definition at line 107 of file vulkan_video.c.
Referenced by ff_vk_create_view().
VkVideoChromaSubsamplingFlagBitsKHR ff_vk_subsampling_from_av_desc | ( | const AVPixFmtDescriptor * | desc | ) |
Get Vulkan's chroma subsampling from a pixfmt descriptor.
Definition at line 115 of file vulkan_video.c.
Referenced by ff_vulkan_encode_init(), and vulkan_setup_profile().
VkVideoComponentBitDepthFlagBitsKHR ff_vk_depth_from_av_depth | ( | int | depth | ) |
Get Vulkan's bit depth from an [8:12] integer.
Definition at line 128 of file vulkan_video.c.
Referenced by ff_vulkan_encode_init(), and vulkan_setup_profile().
int ff_vk_h264_level_to_av | ( | StdVideoH264LevelIdc | level | ) |
Convert level from Vulkan to AV.
Definition at line 139 of file vulkan_video.c.
Referenced by vulkan_decode_get_profile().
StdVideoH264LevelIdc ff_vk_h264_level_to_vk | ( | int | level_idc | ) |
Definition at line 165 of file vulkan_video.c.
Referenced by base_unit_to_vk().
int ff_vk_h265_level_to_av | ( | StdVideoH265LevelIdc | level | ) |
Definition at line 191 of file vulkan_video.c.
Referenced by vulkan_decode_get_profile().
StdVideoH265LevelIdc ff_vk_h265_level_to_vk | ( | int | level_idc | ) |
Definition at line 210 of file vulkan_video.c.
Referenced by base_unit_to_vk(), set_sps(), and set_vps().
StdVideoH264ProfileIdc ff_vk_h264_profile_to_vk | ( | int | profile | ) |
Convert profile from/to AV to Vulkan.
Definition at line 229 of file vulkan_video.c.
Referenced by base_unit_to_vk(), and init_profile().
StdVideoH265ProfileIdc ff_vk_h265_profile_to_vk | ( | int | profile | ) |
Definition at line 240 of file vulkan_video.c.
Referenced by base_unit_to_vk(), init_profile(), and set_vps().
int ff_vk_h264_profile_to_av | ( | StdVideoH264ProfileIdc | profile | ) |
Definition at line 250 of file vulkan_video.c.
int ff_vk_h265_profile_to_av | ( | StdVideoH264ProfileIdc | profile | ) |
Definition at line 261 of file vulkan_video.c.
int ff_vk_video_qf_init | ( | FFVulkanContext * | s, |
FFVkQueueFamilyCtx * | qf, | ||
VkQueueFlagBits | family, | ||
VkVideoCodecOperationFlagBitsKHR | caps | ||
) |
Chooses a QF and loads it into a context.
Definition at line 271 of file vulkan_video.c.
Referenced by ff_vk_decode_init(), and ff_vulkan_encode_init().
int ff_vk_create_view | ( | FFVulkanContext * | s, |
FFVkVideoCommon * | common, | ||
VkImageView * | view, | ||
VkImageAspectFlags * | aspect, | ||
AVVkFrame * | src, | ||
VkFormat | vkf, | ||
int | is_dpb | ||
) |
Creates image views for video frames.
Definition at line 285 of file vulkan_video.c.
Referenced by ff_vk_decode_init(), ff_vk_decode_prepare_frame(), vulkan_encode_create_dpb(), and vulkan_encode_init().
av_cold void ff_vk_video_common_uninit | ( | FFVulkanContext * | s, |
FFVkVideoCommon * | common | ||
) |
Free video session and required resources.
Definition at line 329 of file vulkan_video.c.
Referenced by ff_vk_video_common_init(), ff_vulkan_encode_uninit(), and free_common().
av_cold int ff_vk_video_common_init | ( | AVCodecContext * | avctx, |
FFVulkanContext * | s, | ||
FFVkVideoCommon * | common, | ||
VkVideoSessionCreateInfoKHR * | session_create | ||
) |
Initialize video session, allocating and binding necessary memory.
Definition at line 359 of file vulkan_video.c.
Referenced by ff_vk_decode_init(), and ff_vulkan_encode_init().
|
static |
Referenced by ff_vk_aspect_bits_from_vkfmt(), and ff_vk_pix_fmt_from_vkfmt().
|
static |
Definition at line 97 of file vulkan_video.c.
Referenced by ff_vk_aspect_bits_from_vkfmt(), and ff_vk_pix_fmt_from_vkfmt().