FFmpeg
Data Structures | Macros | Enumerations | Functions
hw_base_encode.h File Reference
#include "avcodec.h"
#include "libavutil/hwcontext.h"
#include "libavutil/fifo.h"

Go to the source code of this file.

Data Structures

 
 
 

Macros

#define  MAX_DPB_SIZE   16
 
#define  MAX_PICTURE_REFERENCES   2
 
#define  MAX_REORDER_DELAY   16
 
#define  MAX_ASYNC_DEPTH   64
 
#define  MAX_REFERENCE_LIST_NUM   2
 
 

Enumerations

 
 

Functions

static const char *  ff_hw_base_encode_get_pictype_name (const int type)
 
 
 
int  ff_hw_base_init_gop_structure (FFHWBaseEncodeContext *ctx, AVCodecContext *avctx, uint32_t ref_l0, uint32_t ref_l1, int flags, int prediction_pre_only)
 
int  ff_hw_base_get_recon_format (FFHWBaseEncodeContext *ctx, const void *hwconfig, enum AVPixelFormat *fmt)
 
 
 

Macro Definition Documentation

MAX_DPB_SIZE

#define MAX_DPB_SIZE   16

Definition at line 26 of file hw_base_encode.h.

MAX_PICTURE_REFERENCES

#define MAX_PICTURE_REFERENCES   2

Definition at line 27 of file hw_base_encode.h.

MAX_REORDER_DELAY

#define MAX_REORDER_DELAY   16

Definition at line 28 of file hw_base_encode.h.

MAX_ASYNC_DEPTH

#define MAX_ASYNC_DEPTH   64

Definition at line 29 of file hw_base_encode.h.

MAX_REFERENCE_LIST_NUM

#define MAX_REFERENCE_LIST_NUM   2

Definition at line 30 of file hw_base_encode.h.

HW_BASE_ENCODE_COMMON_OPTIONS

#define HW_BASE_ENCODE_COMMON_OPTIONS
Value:
{ "idr_interval", \
"Distance (in I-frames) between key frames", \
OFFSET(common.base.idr_interval), AV_OPT_TYPE_INT, \
{ .i64 = 0 }, 0, INT_MAX, FLAGS }, \
{ "b_depth", \
"Maximum B-frame reference depth", \
OFFSET(common.base.desired_b_depth), AV_OPT_TYPE_INT, \
{ .i64 = 1 }, 1, INT_MAX, FLAGS }, \
{ "async_depth", "Maximum processing parallelism. " \
"Increase this to improve single channel performance.", \
OFFSET(common.base.async_depth), AV_OPT_TYPE_INT, \
{ .i64 = 2 }, 1, MAX_ASYNC_DEPTH, FLAGS }

Definition at line 243 of file hw_base_encode.h.

Enumeration Type Documentation

anonymous enum

anonymous enum
Enumerator
FF_HW_PICTURE_TYPE_IDR 
FF_HW_PICTURE_TYPE_I 
FF_HW_PICTURE_TYPE_P 
FF_HW_PICTURE_TYPE_B 

Definition at line 38 of file hw_base_encode.h.

anonymous enum

anonymous enum
Enumerator
FF_HW_FLAG_SLICE_CONTROL 
FF_HW_FLAG_CONSTANT_QUALITY_ONLY 
FF_HW_FLAG_INTRA_ONLY 
FF_HW_FLAG_B_PICTURES 
FF_HW_FLAG_B_PICTURE_REFERENCES 
FF_HW_FLAG_NON_IDR_KEY_PICTURES 

Definition at line 45 of file hw_base_encode.h.

Function Documentation

ff_hw_base_encode_get_pictype_name()

static const char* ff_hw_base_encode_get_pictype_name ( const int  type )
inlinestatic

Definition at line 32 of file hw_base_encode.h.

Referenced by d3d12va_encode_issue(), and vaapi_encode_issue().

ff_hw_base_encode_set_output_property()

int ff_hw_base_encode_set_output_property ( FFHWBaseEncodeContextctx,
AVCodecContextavctx,
AVPacketpkt,
int  flag_no_delay 
)

Definition at line 519 of file hw_base_encode.c.

Referenced by d3d12va_encode_output(), vaapi_encode_output(), and vulkan_encode_output().

ff_hw_base_encode_receive_packet()

int ff_hw_base_encode_receive_packet ( FFHWBaseEncodeContextctx,
AVCodecContextavctx,
AVPacketpkt 
)

if no B frame before repeat P frame, sent repeat P frame out.

loop to get an available pkt in encoder flushing.

Definition at line 558 of file hw_base_encode.c.

Referenced by ff_d3d12va_encode_receive_packet(), ff_vaapi_encode_receive_packet(), and ff_vulkan_encode_receive_packet().

ff_hw_base_init_gop_structure()

int ff_hw_base_init_gop_structure ( FFHWBaseEncodeContextctx,
AVCodecContextavctx,
uint32_t  ref_l0,
uint32_t  ref_l1,
int  flags,
int  prediction_pre_only 
)

Definition at line 662 of file hw_base_encode.c.

Referenced by d3d12va_encode_init_gop_structure(), vaapi_encode_init_gop_structure(), vulkan_encode_av1_init(), vulkan_encode_h264_init(), and vulkan_encode_h265_init().

ff_hw_base_get_recon_format()

int ff_hw_base_get_recon_format ( FFHWBaseEncodeContextctx,
const void *  hwconfig,
enum AVPixelFormatfmt 
)

Definition at line 723 of file hw_base_encode.c.

Referenced by d3d12va_encode_create_recon_frames(), vaapi_encode_create_recon_frames(), and vulkan_encode_create_dpb().

ff_hw_base_encode_init()

int ff_hw_base_encode_init ( AVCodecContextavctx,
)

Definition at line 781 of file hw_base_encode.c.

Referenced by ff_d3d12va_encode_init(), ff_vaapi_encode_init(), and ff_vulkan_encode_init().

ff_hw_base_encode_close()

int ff_hw_base_encode_close ( FFHWBaseEncodeContextctx )

Definition at line 814 of file hw_base_encode.c.

Referenced by ff_d3d12va_encode_close(), ff_vaapi_encode_close(), and ff_vulkan_encode_uninit().

FLAGS
#define FLAGS
Definition: cmdutils.c:598
MAX_ASYNC_DEPTH
#define MAX_ASYNC_DEPTH
Definition: hw_base_encode.h:29
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259

Generated on Tue Nov 18 2025 19:23:55 for FFmpeg by   doxygen 1.8.17

AltStyle によって変換されたページ (->オリジナル) /