FFmpeg
Data Structures | Macros | Functions | Variables
vaapi_hevc.c File Reference
#include <va/va.h>
#include <va/va_dec_hevc.h>
#include "avcodec.h"
#include "hevcdec.h"
#include "hwconfig.h"
#include "vaapi_decode.h"
#include "vaapi_hevc.h"
#include "h265_profile_level.h"

Go to the source code of this file.

Data Structures

struct  VAAPIDecodePictureHEVC
 

Macros

#define copy_field(name)   h265_raw_ptl->general_ ## name = general_ptl->name
 

Functions

static void init_vaapi_pic (VAPictureHEVC *va_pic)
 
static void fill_vaapi_pic (VAPictureHEVC *va_pic, const HEVCFrame *pic, int rps_type)
 
static int find_frame_rps_type (const HEVCContext *h, const HEVCFrame *pic)
 
static void fill_vaapi_reference_frames (const HEVCContext *h, VAPictureParameterBufferHEVC *pp)
 
static int vaapi_hevc_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 
static int vaapi_hevc_end_frame (AVCodecContext *avctx)
 
static void fill_pred_weight_table (AVCodecContext *avctx, const HEVCContext *h, const SliceHeader *sh, VASliceParameterBufferHEVC *slice_param)
 
static uint8_t get_ref_pic_index (const HEVCContext *h, const HEVCFrame *frame)
 
static int vaapi_hevc_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 
static int ptl_convert (const PTLCommon *general_ptl, H265RawProfileTierLevel *h265_raw_ptl)
 
VAProfile ff_vaapi_parse_hevc_rext_profile (AVCodecContext *avctx)
 

Variables

const AVHWAccel ff_hevc_vaapi_hwaccel
 

Macro Definition Documentation

◆ copy_field

#define copy_field (   name)    h265_raw_ptl->general_ ## name = general_ptl->name

Function Documentation

◆ init_vaapi_pic()

static void init_vaapi_pic ( VAPictureHEVC *  va_pic)
static

Definition at line 47 of file vaapi_hevc.c.

Referenced by fill_vaapi_reference_frames().

◆ fill_vaapi_pic()

static void fill_vaapi_pic ( VAPictureHEVC *  va_pic,
const HEVCFrame pic,
int  rps_type 
)
static

Definition at line 54 of file vaapi_hevc.c.

Referenced by fill_vaapi_reference_frames(), and vaapi_hevc_start_frame().

◆ find_frame_rps_type()

static int find_frame_rps_type ( const HEVCContext h,
const HEVCFrame pic 
)
static

Definition at line 71 of file vaapi_hevc.c.

Referenced by fill_vaapi_reference_frames().

◆ fill_vaapi_reference_frames()

static void fill_vaapi_reference_frames ( const HEVCContext h,
VAPictureParameterBufferHEVC *  pp 
)
static

Definition at line 94 of file vaapi_hevc.c.

Referenced by vaapi_hevc_start_frame().

◆ vaapi_hevc_start_frame()

static int vaapi_hevc_start_frame ( AVCodecContext avctx,
av_unused const uint8_t *  buffer,
av_unused uint32_t  size 
)
static

Definition at line 117 of file vaapi_hevc.c.

◆ vaapi_hevc_end_frame()

static int vaapi_hevc_end_frame ( AVCodecContext avctx)
static

Definition at line 295 of file vaapi_hevc.c.

◆ fill_pred_weight_table()

static void fill_pred_weight_table ( AVCodecContext avctx,
const HEVCContext h,
const SliceHeader sh,
VASliceParameterBufferHEVC *  slice_param 
)
static

Definition at line 325 of file vaapi_hevc.c.

◆ get_ref_pic_index()

static uint8_t get_ref_pic_index ( const HEVCContext h,
const HEVCFrame frame 
)
static

Definition at line 388 of file vaapi_hevc.c.

◆ vaapi_hevc_decode_slice()

static int vaapi_hevc_decode_slice ( AVCodecContext avctx,
const uint8_t *  buffer,
uint32_t  size 
)
static

Definition at line 407 of file vaapi_hevc.c.

◆ ptl_convert()

static int ptl_convert ( const PTLCommon general_ptl,
H265RawProfileTierLevel h265_raw_ptl 
)
static

Definition at line 515 of file vaapi_hevc.c.

Referenced by ff_vaapi_parse_hevc_rext_profile().

◆ ff_vaapi_parse_hevc_rext_profile()

VAProfile ff_vaapi_parse_hevc_rext_profile ( AVCodecContext avctx)

Definition at line 549 of file vaapi_hevc.c.

Variable Documentation

◆ ff_hevc_vaapi_hwaccel

const AVHWAccel ff_hevc_vaapi_hwaccel
Initial value:
= {
.name = "hevc_vaapi",
.pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_hevc_start_frame,
.end_frame = vaapi_hevc_end_frame,
.decode_slice = vaapi_hevc_decode_slice,
.frame_priv_data_size = sizeof(VAAPIDecodePictureHEVC),
.priv_data_size = sizeof(VAAPIDecodeContext),
.caps_internal = HWACCEL_CAP_ASYNC_SAFE,
}

Definition at line 601 of file vaapi_hevc.c.

vaapi_hevc_end_frame
static int vaapi_hevc_end_frame(AVCodecContext *avctx)
Definition: vaapi_hevc.c:295
VAAPIDecodeContext
Definition: vaapi_decode.h:50
ff_vaapi_decode_init
int ff_vaapi_decode_init(AVCodecContext *avctx)
Definition: vaapi_decode.c:655
ff_vaapi_common_frame_params
int ff_vaapi_common_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
Definition: vaapi_decode.c:631
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
vaapi_hevc_decode_slice
static int vaapi_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: vaapi_hevc.c:407
vaapi_hevc_start_frame
static int vaapi_hevc_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: vaapi_hevc.c:117
ff_vaapi_decode_uninit
int ff_vaapi_decode_uninit(AVCodecContext *avctx)
Definition: vaapi_decode.c:701
VAAPIDecodePictureHEVC
Definition: vaapi_hevc.c:33
AV_PIX_FMT_VAAPI
@ AV_PIX_FMT_VAAPI
Hardware acceleration through VA-API, data[3] contains a VASurfaceID.
Definition: pixfmt.h:119
AV_CODEC_ID_HEVC
@ AV_CODEC_ID_HEVC
Definition: codec_id.h:226
HWACCEL_CAP_ASYNC_SAFE
#define HWACCEL_CAP_ASYNC_SAFE
Definition: hwconfig.h:26
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:285