FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
vaapi_hevc.c File Reference

This file implements the glue code between FFmpeg's and VA API's structures for HEVC decoding. More...

#include "vaapi_internal.h"
#include "hevc.h"
#include "mpegutils.h"

Go to the source code of this file.

Data Structures

struct  vaapi_hevc_frame_data
 

Functions

static void init_vaapi_pic (VAPictureHEVC *va_pic)
 Initialize an empty VA API picture. More...
 
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_ReferenceFrames (const HEVCContext *h, VAPictureParameterBufferHEVC *pp)
 
static uint8_t get_ref_pic_index (const HEVCContext *h, const HEVCFrame *frame)
 
static void fill_picture_parameters (const HEVCContext *h, VAPictureParameterBufferHEVC *pp)
 
static int vaapi_hevc_start_frame (AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
 Initialize and start decoding a frame with VA API. More...
 
static int vaapi_hevc_end_frame (AVCodecContext *avctx)
 End a hardware decoding based frame. More...
 
static int fill_pred_weight_table (HEVCContext *const h, VASliceParameterBufferHEVC *slice_param, SliceHeader *const sh)
 
static int vaapi_hevc_decode_slice (AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
 Decode the given hevc slice with VA API. More...
 

Variables

AVHWAccel ff_hevc_vaapi_hwaccel
 

Detailed Description

This file implements the glue code between FFmpeg's and VA API's structures for HEVC decoding.

Definition in file vaapi_hevc.c.

Function Documentation

static void init_vaapi_pic ( VAPictureHEVC *  va_pic)
static

Initialize an empty VA API picture.

VA API requires a fixed-size reference picture array.

Definition at line 43 of file vaapi_hevc.c.

Referenced by fill_vaapi_ReferenceFrames().

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

Definition at line 50 of file vaapi_hevc.c.

Referenced by fill_picture_parameters(), and fill_vaapi_ReferenceFrames().

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

Definition at line 68 of file vaapi_hevc.c.

Referenced by fill_vaapi_ReferenceFrames().

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

Definition at line 91 of file vaapi_hevc.c.

Referenced by fill_picture_parameters().

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

Definition at line 114 of file vaapi_hevc.c.

Referenced by vaapi_hevc_decode_slice().

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

Definition at line 133 of file vaapi_hevc.c.

Referenced by vaapi_hevc_start_frame().

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

Initialize and start decoding a frame with VA API.

Definition at line 258 of file vaapi_hevc.c.

static int vaapi_hevc_end_frame ( AVCodecContext avctx)
static

End a hardware decoding based frame.

Definition at line 317 of file vaapi_hevc.c.

static int fill_pred_weight_table ( HEVCContext *const  h,
VASliceParameterBufferHEVC *  slice_param,
SliceHeader *const  sh 
)
static

Definition at line 341 of file vaapi_hevc.c.

Referenced by vaapi_hevc_decode_slice().

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

Decode the given hevc slice with VA API.

Definition at line 395 of file vaapi_hevc.c.

Variable Documentation

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,
.priv_data_size = sizeof(FFVAContext),
.frame_priv_data_size = sizeof(vaapi_hevc_frame_data),
}
int ff_vaapi_context_fini(AVCodecContext *avctx)
Common AVHWAccel.uninit() implementation.
Definition: vaapi.c:66
static int vaapi_hevc_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Initialize and start decoding a frame with VA API.
Definition: vaapi_hevc.c:258
static int vaapi_hevc_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Decode the given hevc slice with VA API.
Definition: vaapi_hevc.c:395
static int vaapi_hevc_end_frame(AVCodecContext *avctx)
End a hardware decoding based frame.
Definition: vaapi_hevc.c:317
int ff_vaapi_context_init(AVCodecContext *avctx)
Common AVHWAccel.init() implementation.
Definition: vaapi.c:45

Definition at line 478 of file vaapi_hevc.c.