FFmpeg
Functions
hw_base_encode.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "encode.h"
#include "avcodec.h"
#include "hw_base_encode.h"

Go to the source code of this file.

Functions

static int base_encode_pic_free (FFHWBaseEncodePicture *pic)
 
static void hw_base_encode_add_ref (FFHWBaseEncodePicture *pic, FFHWBaseEncodePicture *target, int is_ref, int in_dpb, int prev)
 
static void hw_base_encode_remove_refs (FFHWBaseEncodePicture *pic, int level)
 
static void hw_base_encode_set_b_pictures (FFHWBaseEncodeContext *ctx, FFHWBaseEncodePicture *start, FFHWBaseEncodePicture *end, FFHWBaseEncodePicture *prev, int current_depth, FFHWBaseEncodePicture **last)
 
static void hw_base_encode_add_next_prev (FFHWBaseEncodeContext *ctx, FFHWBaseEncodePicture *pic)
 
static int hw_base_encode_pick_next (AVCodecContext *avctx, FFHWBaseEncodeContext *ctx, FFHWBaseEncodePicture **pic_out)
 
static int hw_base_encode_clear_old (AVCodecContext *avctx, FFHWBaseEncodeContext *ctx)
 
static int hw_base_encode_check_frame (FFHWBaseEncodeContext *ctx, const AVFrame *frame)
 
static int hw_base_encode_send_frame (AVCodecContext *avctx, FFHWBaseEncodeContext *ctx, AVFrame *frame)
 
int ff_hw_base_encode_set_output_property (FFHWBaseEncodeContext *ctx, AVCodecContext *avctx, FFHWBaseEncodePicture *pic, AVPacket *pkt, int flag_no_delay)
 
int ff_hw_base_encode_receive_packet (FFHWBaseEncodeContext *ctx, AVCodecContext *avctx, AVPacket *pkt)
 
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)
 
int ff_hw_base_encode_init (AVCodecContext *avctx, FFHWBaseEncodeContext *ctx)
 
int ff_hw_base_encode_close (FFHWBaseEncodeContext *ctx)
 

Function Documentation

◆ base_encode_pic_free()

static int base_encode_pic_free ( FFHWBaseEncodePicture pic)
static

◆ hw_base_encode_add_ref()

static void hw_base_encode_add_ref ( FFHWBaseEncodePicture pic,
FFHWBaseEncodePicture target,
int  is_ref,
int  in_dpb,
int  prev 
)
static

Definition at line 43 of file hw_base_encode.c.

Referenced by hw_base_encode_pick_next(), and hw_base_encode_set_b_pictures().

◆ hw_base_encode_remove_refs()

static void hw_base_encode_remove_refs ( FFHWBaseEncodePicture pic,
int  level 
)
static

Definition at line 76 of file hw_base_encode.c.

Referenced by hw_base_encode_clear_old().

◆ hw_base_encode_set_b_pictures()

static void hw_base_encode_set_b_pictures ( FFHWBaseEncodeContext ctx,
FFHWBaseEncodePicture start,
FFHWBaseEncodePicture end,
FFHWBaseEncodePicture prev,
int  current_depth,
FFHWBaseEncodePicture **  last 
)
static

Definition at line 110 of file hw_base_encode.c.

Referenced by hw_base_encode_pick_next().

◆ hw_base_encode_add_next_prev()

static void hw_base_encode_add_next_prev ( FFHWBaseEncodeContext ctx,
FFHWBaseEncodePicture pic 
)
static

Definition at line 173 of file hw_base_encode.c.

Referenced by hw_base_encode_pick_next().

◆ hw_base_encode_pick_next()

static int hw_base_encode_pick_next ( AVCodecContext avctx,
FFHWBaseEncodeContext ctx,
FFHWBaseEncodePicture **  pic_out 
)
static

Definition at line 205 of file hw_base_encode.c.

Referenced by ff_hw_base_encode_receive_packet().

◆ hw_base_encode_clear_old()

static int hw_base_encode_clear_old ( AVCodecContext avctx,
FFHWBaseEncodeContext ctx 
)
static

Definition at line 357 of file hw_base_encode.c.

Referenced by ff_hw_base_encode_receive_packet().

◆ hw_base_encode_check_frame()

static int hw_base_encode_check_frame ( FFHWBaseEncodeContext ctx,
const AVFrame frame 
)
static

Definition at line 395 of file hw_base_encode.c.

Referenced by hw_base_encode_send_frame().

◆ hw_base_encode_send_frame()

static int hw_base_encode_send_frame ( AVCodecContext avctx,
FFHWBaseEncodeContext ctx,
AVFrame frame 
)
static

Definition at line 419 of file hw_base_encode.c.

Referenced by ff_hw_base_encode_receive_packet().

◆ ff_hw_base_encode_set_output_property()

int ff_hw_base_encode_set_output_property ( FFHWBaseEncodeContext ctx,
AVCodecContext avctx,
FFHWBaseEncodePicture pic,
AVPacket pkt,
int  flag_no_delay 
)

◆ ff_hw_base_encode_receive_packet()

int ff_hw_base_encode_receive_packet ( FFHWBaseEncodeContext ctx,
AVCodecContext avctx,
AVPacket pkt 
)

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 557 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 ( FFHWBaseEncodeContext ctx,
AVCodecContext avctx,
uint32_t  ref_l0,
uint32_t  ref_l1,
int  flags,
int  prediction_pre_only 
)

◆ ff_hw_base_get_recon_format()

int ff_hw_base_get_recon_format ( FFHWBaseEncodeContext ctx,
const void *  hwconfig,
enum AVPixelFormat fmt 
)

◆ ff_hw_base_encode_init()

int ff_hw_base_encode_init ( AVCodecContext avctx,
FFHWBaseEncodeContext ctx 
)

◆ ff_hw_base_encode_close()

int ff_hw_base_encode_close ( FFHWBaseEncodeContext ctx)