FFmpeg
Loading...
Searching...
No Matches
vulkan_apv.c File Reference
#include "vulkan_decode.h"
#include "hwaccel_internal.h"
#include "apv_decode.h"
#include "libavutil/mem.h"

Go to the source code of this file.

Data Structures

struct  APVVulkanDecodePicture
 
struct  APVVulkanDecodeContext
 
struct  DecodePushData
 

Functions

static int vk_apv_start_frame (AVCodecContext *avctx, const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vk_apv_decode_slice (AVCodecContext *avctx, const uint8_t *data, uint32_t size)
 
static int vk_apv_end_frame (AVCodecContext *avctx)
 
static int init_decode_shader (AVCodecContext *avctx, FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
 
static int init_idct_shader (AVCodecContext *avctx, FFVulkanContext *s, FFVkExecPool *pool, FFVulkanShader *shd)
 
static void vk_decode_apv_uninit (FFVulkanDecodeShared *ctx)
 
static int vk_decode_apv_init (AVCodecContext *avctx)
 
static void vk_apv_free_frame_priv (AVRefStructOpaque _hwctx, void *data)
 

Variables

const unsigned char ff_apv_decode_comp_spv_data []
 
const unsigned int ff_apv_decode_comp_spv_len
 
const unsigned char ff_apv_idct_comp_spv_data []
 
const unsigned int ff_apv_idct_comp_spv_len
 
const FFVulkanDecodeDescriptor ff_vk_dec_apv_desc
 
const FFHWAccel ff_apv_vulkan_hwaccel
 

Function Documentation

◆ vk_apv_start_frame()

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

Definition at line 66 of file vulkan_apv.c.

◆ vk_apv_decode_slice()

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

Definition at line 129 of file vulkan_apv.c.

◆ vk_apv_end_frame()

static int vk_apv_end_frame ( AVCodecContext * avctx)
static

Definition at line 164 of file vulkan_apv.c.

◆ init_decode_shader()

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

Definition at line 377 of file vulkan_apv.c.

Referenced by vk_decode_apv_init().

◆ init_idct_shader()

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

Definition at line 419 of file vulkan_apv.c.

Referenced by vk_decode_apv_init().

◆ vk_decode_apv_uninit()

static void vk_decode_apv_uninit ( FFVulkanDecodeShared * ctx)
static

Definition at line 474 of file vulkan_apv.c.

Referenced by vk_decode_apv_init().

◆ vk_decode_apv_init()

static int vk_decode_apv_init ( AVCodecContext * avctx)
static

Definition at line 487 of file vulkan_apv.c.

◆ vk_apv_free_frame_priv()

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

Definition at line 531 of file vulkan_apv.c.

Variable Documentation

◆ ff_apv_decode_comp_spv_data

const unsigned char ff_apv_decode_comp_spv_data[]
extern

Referenced by init_decode_shader().

◆ ff_apv_decode_comp_spv_len

const unsigned int ff_apv_decode_comp_spv_len
extern

Referenced by init_decode_shader().

◆ ff_apv_idct_comp_spv_data

const unsigned char ff_apv_idct_comp_spv_data[]
extern

Referenced by init_idct_shader().

◆ ff_apv_idct_comp_spv_len

const unsigned int ff_apv_idct_comp_spv_len
extern

Referenced by init_idct_shader().

◆ ff_vk_dec_apv_desc

const FFVulkanDecodeDescriptor ff_vk_dec_apv_desc
Initial value:
= {
.codec_id = AV_CODEC_ID_APV,
.queue_flags = VK_QUEUE_COMPUTE_BIT,
}
@ AV_CODEC_ID_APV
Definition codec_id.h:323

Definition at line 33 of file vulkan_apv.c.

◆ ff_apv_vulkan_hwaccel

const FFHWAccel ff_apv_vulkan_hwaccel
Initial value:
= {
.p.name = "apv_vulkan",
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_APV,
.p.pix_fmt = AV_PIX_FMT_VULKAN,
.start_frame = &vk_apv_start_frame,
.decode_slice = &vk_apv_decode_slice,
.end_frame = &vk_apv_end_frame,
.free_frame_priv = &vk_apv_free_frame_priv,
.frame_priv_data_size = sizeof(APVVulkanDecodePicture),
.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
static int vk_apv_decode_slice(AVCodecContext *avctx, const uint8_t *data, uint32_t size)
Definition vulkan_apv.c:129
static int vk_decode_apv_init(AVCodecContext *avctx)
Definition vulkan_apv.c:487
static void vk_apv_free_frame_priv(AVRefStructOpaque _hwctx, void *data)
Definition vulkan_apv.c:531
static int vk_apv_start_frame(AVCodecContext *avctx, const AVBufferRef *buffer_ref, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition vulkan_apv.c:66
static int vk_apv_end_frame(AVCodecContext *avctx)
Definition vulkan_apv.c:164
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.

Definition at line 543 of file vulkan_apv.c.