FFmpeg  4.0
Macros | Functions | Variables
vaapi_decode.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "decode.h"
#include "internal.h"
#include "vaapi_decode.h"

Go to the source code of this file.

Macros

#define MAP(va, av)   { VA_FOURCC_ ## va, AV_PIX_FMT_ ## av }
 
#define MAP(c, p, v)   { AV_CODEC_ID_ ## c, FF_PROFILE_ ## p, VAProfile ## v }
 

Functions

int ff_vaapi_decode_make_param_buffer (AVCodecContext *avctx, VAAPIDecodePicture *pic, int type, const void *data, size_t size)
 
int ff_vaapi_decode_make_slice_buffer (AVCodecContext *avctx, VAAPIDecodePicture *pic, const void *params_data, size_t params_size, const void *slice_data, size_t slice_size)
 
static void ff_vaapi_decode_destroy_buffers (AVCodecContext *avctx, VAAPIDecodePicture *pic)
 
int ff_vaapi_decode_issue (AVCodecContext *avctx, VAAPIDecodePicture *pic)
 
int ff_vaapi_decode_cancel (AVCodecContext *avctx, VAAPIDecodePicture *pic)
 
static int vaapi_decode_find_best_format (AVCodecContext *avctx, AVHWDeviceContext *device, VAConfigID config_id, AVHWFramesContext *frames)
 
static int vaapi_decode_make_config (AVCodecContext *avctx, AVBufferRef *device_ref, VAConfigID *va_config, AVBufferRef *frames_ref)
 
int ff_vaapi_common_frame_params (AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
 
int ff_vaapi_decode_init (AVCodecContext *avctx)
 
int ff_vaapi_decode_uninit (AVCodecContext *avctx)
 

Variables

struct {
   uint32_t   fourcc
 
   enum AVPixelFormat   pix_fmt
 
vaapi_format_map []
 
struct {
   enum AVCodecID   codec_id
 
   int   codec_profile
 
   VAProfile   va_profile
 
vaapi_profile_map []
 

Macro Definition Documentation

◆ MAP [1/2]

#define MAP (   va,
  av 
)    { VA_FOURCC_ ## va, AV_PIX_FMT_ ## av }

◆ MAP [2/2]

#define MAP (   c,
  p,
 
)    { AV_CODEC_ID_ ## c, FF_PROFILE_ ## p, VAProfile ## v }

Function Documentation

◆ ff_vaapi_decode_make_param_buffer()

int ff_vaapi_decode_make_param_buffer ( AVCodecContext avctx,
VAAPIDecodePicture pic,
int  type,
const void data,
size_t  size 
)

◆ ff_vaapi_decode_make_slice_buffer()

int ff_vaapi_decode_make_slice_buffer ( AVCodecContext avctx,
VAAPIDecodePicture pic,
const void params_data,
size_t  params_size,
const void slice_data,
size_t  slice_size 
)

◆ ff_vaapi_decode_destroy_buffers()

static void ff_vaapi_decode_destroy_buffers ( AVCodecContext avctx,
VAAPIDecodePicture pic 
)
static

Definition at line 122 of file vaapi_decode.c.

Referenced by ff_vaapi_decode_cancel(), and ff_vaapi_decode_issue().

◆ ff_vaapi_decode_issue()

int ff_vaapi_decode_issue ( AVCodecContext avctx,
VAAPIDecodePicture pic 
)

◆ ff_vaapi_decode_cancel()

int ff_vaapi_decode_cancel ( AVCodecContext avctx,
VAAPIDecodePicture pic 
)

◆ vaapi_decode_find_best_format()

static int vaapi_decode_find_best_format ( AVCodecContext avctx,
AVHWDeviceContext device,
VAConfigID  config_id,
AVHWFramesContext frames 
)
static

Definition at line 271 of file vaapi_decode.c.

Referenced by vaapi_decode_make_config().

◆ vaapi_decode_make_config()

static int vaapi_decode_make_config ( AVCodecContext avctx,
AVBufferRef device_ref,
VAConfigID *  va_config,
AVBufferRef frames_ref 
)
static

Definition at line 408 of file vaapi_decode.c.

Referenced by ff_vaapi_common_frame_params(), and ff_vaapi_decode_init().

◆ ff_vaapi_common_frame_params()

int ff_vaapi_common_frame_params ( AVCodecContext avctx,
AVBufferRef hw_frames_ctx 
)

Definition at line 586 of file vaapi_decode.c.

Referenced by vaapi_mpeg4_decode_slice(), and vaapi_vc1_decode_slice().

◆ ff_vaapi_decode_init()

int ff_vaapi_decode_init ( AVCodecContext avctx)

Definition at line 610 of file vaapi_decode.c.

Referenced by vaapi_mpeg4_decode_slice(), and vaapi_vc1_decode_slice().

◆ ff_vaapi_decode_uninit()

int ff_vaapi_decode_uninit ( AVCodecContext avctx)

Variable Documentation

◆ fourcc

uint32_t fourcc

◆ pix_fmt

enum AVPixelFormat pix_fmt

Definition at line 237 of file vaapi_decode.c.

◆ vaapi_format_map

const { ... } vaapi_format_map[]

◆ codec_id

enum AVCodecID codec_id

◆ codec_profile

int codec_profile

Definition at line 363 of file vaapi_decode.c.

◆ va_profile

VAProfile va_profile

Definition at line 364 of file vaapi_decode.c.

Referenced by vaapi_decode_make_config().

◆ vaapi_profile_map

const { ... } vaapi_profile_map[]