FFmpeg
Loading...
Searching...
No Matches
vulkan_prores.c File Reference
#include "proresdec.h"
#include "vulkan_decode.h"
#include "hwaccel_internal.h"
#include "libavutil/mem.h"
#include "libavutil/vulkan.h"

Go to the source code of this file.

Data Structures

struct  ProresVulkanDecodePicture
 
struct  ProresVulkanDecodeContext
 
struct  ProresVkParameters
 

Functions

static int vk_prores_start_frame (AVCodecContext *avctx, const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vk_prores_decode_slice (AVCodecContext *avctx, const uint8_t *data, uint32_t size)
 
static int vk_prores_end_frame (AVCodecContext *avctx)
 
static int init_decode_shader (AVCodecContext *avctx, FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd, int max_num_mbs, int interlaced)
 
static int init_idct_shader (AVCodecContext *avctx, FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd, int max_num_mbs, int interlaced)
 
static void vk_decode_prores_uninit (FFVulkanDecodeShared *ctx)
 
static int vk_decode_prores_init (AVCodecContext *avctx)
 
static void vk_prores_free_frame_priv (AVRefStructOpaque _hwctx, void *data)
 

Variables

const unsigned char ff_prores_vld_comp_spv_data []
 
const unsigned int ff_prores_vld_comp_spv_len
 
const unsigned char ff_prores_idct_comp_spv_data []
 
const unsigned int ff_prores_idct_comp_spv_len
 
const FFVulkanDecodeDescriptor ff_vk_dec_prores_desc
 
const FFHWAccel ff_prores_vulkan_hwaccel
 

Function Documentation

◆ vk_prores_start_frame()

static int vk_prores_start_frame ( AVCodecContext * avctx,
const AVBufferRef * buffer_ref,
av_unused const uint8_t * buffer,
av_unused uint32_t size )
static

Definition at line 73 of file vulkan_prores.c.

◆ vk_prores_decode_slice()

static int vk_prores_decode_slice ( AVCodecContext * avctx,
const uint8_t * data,
uint32_t size )
static

Definition at line 119 of file vulkan_prores.c.

◆ vk_prores_end_frame()

static int vk_prores_end_frame ( AVCodecContext * avctx)
static

Definition at line 151 of file vulkan_prores.c.

◆ init_decode_shader()

static int init_decode_shader ( AVCodecContext * avctx,
FFVulkanContext * s,
FFVkExecPool * pool,
FFVulkanShader * shd,
int max_num_mbs,
int interlaced )
static

Definition at line 354 of file vulkan_prores.c.

Referenced by vk_decode_prores_init().

◆ init_idct_shader()

static int init_idct_shader ( AVCodecContext * avctx,
FFVulkanContext * s,
FFVkExecPool * pool,
FFVulkanShader * shd,
int max_num_mbs,
int interlaced )
static

Definition at line 399 of file vulkan_prores.c.

Referenced by vk_decode_prores_init().

◆ vk_decode_prores_uninit()

static void vk_decode_prores_uninit ( FFVulkanDecodeShared * ctx)
static

Definition at line 455 of file vulkan_prores.c.

Referenced by vk_decode_prores_init().

◆ vk_decode_prores_init()

static int vk_decode_prores_init ( AVCodecContext * avctx)
static

Definition at line 467 of file vulkan_prores.c.

◆ vk_prores_free_frame_priv()

static void vk_prores_free_frame_priv ( AVRefStructOpaque _hwctx,
void * data )
static

Definition at line 500 of file vulkan_prores.c.

Variable Documentation

◆ ff_prores_vld_comp_spv_data

const unsigned char ff_prores_vld_comp_spv_data[]
extern

Referenced by init_decode_shader().

◆ ff_prores_vld_comp_spv_len

const unsigned int ff_prores_vld_comp_spv_len
extern

Referenced by init_decode_shader().

◆ ff_prores_idct_comp_spv_data

const unsigned char ff_prores_idct_comp_spv_data[]
extern

Referenced by init_idct_shader().

◆ ff_prores_idct_comp_spv_len

const unsigned int ff_prores_idct_comp_spv_len
extern

Referenced by init_idct_shader().

◆ ff_vk_dec_prores_desc

const FFVulkanDecodeDescriptor ff_vk_dec_prores_desc
Initial value:
= {
.codec_id = AV_CODEC_ID_PRORES,
.queue_flags = VK_QUEUE_COMPUTE_BIT,
}
@ AV_CODEC_ID_PRORES
Definition codec_id.h:198

Definition at line 31 of file vulkan_prores.c.

◆ ff_prores_vulkan_hwaccel

const FFHWAccel ff_prores_vulkan_hwaccel
Initial value:
= {
.p.name = "prores_vulkan",
.p.type = AVMEDIA_TYPE_VIDEO,
.p.pix_fmt = AV_PIX_FMT_VULKAN,
.start_frame = &vk_prores_start_frame,
.decode_slice = &vk_prores_decode_slice,
.end_frame = &vk_prores_end_frame,
.free_frame_priv = &vk_prores_free_frame_priv,
.frame_priv_data_size = sizeof(ProresVulkanDecodePicture),
.update_thread_context = &ff_vk_update_thread_context,
.frame_params = &ff_vk_frame_params,
.priv_data_size = sizeof(FFVulkanDecodeContext),
}
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
#define HWACCEL_CAP_ASYNC_SAFE
Header providing the internals of AVHWAccel.
#define HWACCEL_CAP_THREAD_SAFE
static av_cold void uninit(AVBitStreamFilterContext *ctx)
@ AV_PIX_FMT_VULKAN
Vulkan hardware images.
Definition pixfmt.h:379
int ff_vk_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
Synchronize the contexts between 2 threads.
int ff_vk_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Initialize hw_frames_ctx with the parameters needed to decode the stream using the parameters from av...
int ff_vk_decode_uninit(AVCodecContext *avctx)
Free decoder.
static void vk_prores_free_frame_priv(AVRefStructOpaque _hwctx, void *data)
static int vk_prores_end_frame(AVCodecContext *avctx)
static int vk_decode_prores_init(AVCodecContext *avctx)
static int vk_prores_decode_slice(AVCodecContext *avctx, const uint8_t *data, uint32_t size)
static int vk_prores_start_frame(AVCodecContext *avctx, const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)

Definition at line 510 of file vulkan_prores.c.