FFmpeg
Functions | Variables
vulkan_encode.c File Reference
#include "libavutil/mem.h"
#include "libavutil/avassert.h"
#include "vulkan_encode.h"
#include "config.h"
#include "libavutil/vulkan_loader.h"

Go to the source code of this file.

Functions

av_cold void ff_vulkan_encode_uninit (FFVulkanEncodeContext *ctx)
 Uninitialize encoder. More...
 
static int vulkan_encode_init (AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
 
static int vulkan_encode_free (AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
 
static int init_pic_rc (AVCodecContext *avctx, FFHWBaseEncodePicture *pic, VkVideoEncodeRateControlInfoKHR *rc_info, VkVideoEncodeRateControlLayerInfoKHR *rc_layer)
 
static int vulkan_encode_issue (AVCodecContext *avctx, FFHWBaseEncodePicture *base_pic)
 
static void vulkan_encode_wait (AVCodecContext *avctx, FFHWBaseEncodePicture *base_pic)
 
static int vulkan_encode_output (AVCodecContext *avctx, FFHWBaseEncodePicture *base_pic, AVPacket *pkt)
 
int ff_vulkan_encode_receive_packet (AVCodecContext *avctx, AVPacket *pkt)
 Encode. More...
 
static int vulkan_encode_create_dpb (AVCodecContext *avctx, FFVulkanEncodeContext *ctx)
 
static av_cold int init_rc (AVCodecContext *avctx, FFVulkanEncodeContext *ctx)
 
av_cold int ff_vulkan_write_global_header (AVCodecContext *avctx, FFVulkanEncodeContext *ctx)
 Write out the extradata in case its needed. More...
 
av_cold int ff_vulkan_encode_init (AVCodecContext *avctx, FFVulkanEncodeContext *ctx, const FFVulkanEncodeDescriptor *vk_desc, const FFVulkanCodec *codec, void *codec_caps, void *quality_pnext)
 Initialize encoder. More...
 
int ff_vulkan_encode_create_session_params (AVCodecContext *avctx, FFVulkanEncodeContext *ctx, void *codec_params_pnext)
 Create session parameters. More...
 

Variables

const AVCodecHWConfigInternal *const ff_vulkan_encode_hw_configs []
 Paperwork. More...
 
static const FFHWEncodePictureOperation vulkan_base_encode_ops
 

Function Documentation

◆ ff_vulkan_encode_uninit()

av_cold void ff_vulkan_encode_uninit ( FFVulkanEncodeContext ctx)

Uninitialize encoder.

Definition at line 31 of file vulkan_encode.c.

Referenced by vulkan_encode_h264_close(), and vulkan_encode_h265_close().

◆ vulkan_encode_init()

static int vulkan_encode_init ( AVCodecContext avctx,
FFHWBaseEncodePicture pic 
)
static

Definition at line 54 of file vulkan_encode.c.

◆ vulkan_encode_free()

static int vulkan_encode_free ( AVCodecContext avctx,
FFHWBaseEncodePicture pic 
)
static

Definition at line 95 of file vulkan_encode.c.

◆ init_pic_rc()

static int init_pic_rc ( AVCodecContext avctx,
FFHWBaseEncodePicture pic,
VkVideoEncodeRateControlInfoKHR *  rc_info,
VkVideoEncodeRateControlLayerInfoKHR *  rc_layer 
)
static

Definition at line 115 of file vulkan_encode.c.

Referenced by vulkan_encode_issue().

◆ vulkan_encode_issue()

static int vulkan_encode_issue ( AVCodecContext avctx,
FFHWBaseEncodePicture base_pic 
)
static

Definition at line 141 of file vulkan_encode.c.

◆ vulkan_encode_wait()

static void vulkan_encode_wait ( AVCodecContext avctx,
FFHWBaseEncodePicture base_pic 
)
static

Definition at line 447 of file vulkan_encode.c.

Referenced by vulkan_encode_output().

◆ vulkan_encode_output()

static int vulkan_encode_output ( AVCodecContext avctx,
FFHWBaseEncodePicture base_pic,
AVPacket pkt 
)
static

Definition at line 462 of file vulkan_encode.c.

◆ ff_vulkan_encode_receive_packet()

int ff_vulkan_encode_receive_packet ( AVCodecContext avctx,
AVPacket pkt 
)

Encode.

Definition at line 542 of file vulkan_encode.c.

◆ vulkan_encode_create_dpb()

static int vulkan_encode_create_dpb ( AVCodecContext avctx,
FFVulkanEncodeContext ctx 
)
static

Definition at line 548 of file vulkan_encode.c.

Referenced by ff_vulkan_encode_init().

◆ init_rc()

static av_cold int init_rc ( AVCodecContext avctx,
FFVulkanEncodeContext ctx 
)
static

Definition at line 611 of file vulkan_encode.c.

Referenced by ff_vulkan_encode_init().

◆ ff_vulkan_write_global_header()

av_cold int ff_vulkan_write_global_header ( AVCodecContext avctx,
FFVulkanEncodeContext ctx 
)

Write out the extradata in case its needed.

Definition at line 672 of file vulkan_encode.c.

Referenced by vulkan_encode_h264_init(), and vulkan_encode_h265_init().

◆ ff_vulkan_encode_init()

av_cold int ff_vulkan_encode_init ( AVCodecContext avctx,
FFVulkanEncodeContext ctx,
const FFVulkanEncodeDescriptor vk_desc,
const FFVulkanCodec codec,
void *  codec_caps,
void *  quality_pnext 
)

Initialize encoder.

Definition at line 702 of file vulkan_encode.c.

Referenced by vulkan_encode_h264_init(), and vulkan_encode_h265_init().

◆ ff_vulkan_encode_create_session_params()

int ff_vulkan_encode_create_session_params ( AVCodecContext avctx,
FFVulkanEncodeContext ctx,
void *  codec_params_pnext 
)

Create session parameters.

Definition at line 1027 of file vulkan_encode.c.

Referenced by create_session_params().

Variable Documentation

◆ ff_vulkan_encode_hw_configs

const AVCodecHWConfigInternal* const ff_vulkan_encode_hw_configs[]
Initial value:
= {
HW_CONFIG_ENCODER_FRAMES(VULKAN, VULKAN),
}

Paperwork.

Definition at line 26 of file vulkan_encode.c.

◆ vulkan_base_encode_ops

const FFHWEncodePictureOperation vulkan_base_encode_ops
static
Initial value:

Definition at line 534 of file vulkan_encode.c.

Referenced by ff_vulkan_encode_init().

vulkan_encode_init
static int vulkan_encode_init(AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
Definition: vulkan_encode.c:54
output
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
Definition: filter_design.txt:225
vulkan_encode_free
static int vulkan_encode_free(AVCodecContext *avctx, FFHWBaseEncodePicture *pic)
Definition: vulkan_encode.c:95
NULL
#define NULL
Definition: coverity.c:32
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
HW_CONFIG_ENCODER_FRAMES
#define HW_CONFIG_ENCODER_FRAMES(format, device_type_)
Definition: hwconfig.h:98
vulkan_encode_issue
static int vulkan_encode_issue(AVCodecContext *avctx, FFHWBaseEncodePicture *base_pic)
Definition: vulkan_encode.c:141
vulkan_encode_output
static int vulkan_encode_output(AVCodecContext *avctx, FFHWBaseEncodePicture *base_pic, AVPacket *pkt)
Definition: vulkan_encode.c:462
FFVulkanEncodePicture
Definition: vulkan_encode.h:39