FFmpeg
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"
#include "vaapi_hevc.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, __VA_ARGS__ }
 

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
 
   VAProfile(*   profile_parser )(AVCodecContext *avctx)
 
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,
  v,
  ... 
)    { AV_CODEC_ID_ ## c, FF_PROFILE_ ## p, VAProfile ## v, __VA_ARGS__ }

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 123 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 278 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 420 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 604 of file vaapi_decode.c.

◆ ff_vaapi_decode_init()

int ff_vaapi_decode_init ( AVCodecContext avctx)

Definition at line 628 of file vaapi_decode.c.

◆ ff_vaapi_decode_uninit()

int ff_vaapi_decode_uninit ( AVCodecContext avctx)

Definition at line 717 of file vaapi_decode.c.

Referenced by ff_vaapi_decode_init().

Variable Documentation

◆ fourcc

uint32_t fourcc

◆ pix_fmt

enum AVPixelFormat pix_fmt

Definition at line 240 of file vaapi_decode.c.

◆ vaapi_format_map

const { ... } vaapi_format_map[]

◆ codec_id

enum AVCodecID codec_id
Examples
muxing.c.

Definition at line 369 of file vaapi_decode.c.

Referenced by ac3_eac3_probe(), add_stream(), amf_init_encoder(), audio_read_header(), audio_write_header(), av_get_bits_per_sample(), av_get_exact_bits_per_sample(), av_guess_codec(), av_parser_init(), avcodec_get_type(), avcodec_profile_name(), AVCodecInitialize(), avformat_query_codec(), cbs_h2645_split_fragment(), checkasm_check_h264pred(), codec_flags(), codec_id_to_pcm_format(), device_try_init(), dshow_cycle_formats(), ff_alsa_open(), ff_cbs_init(), ff_codec_id_to_pulse_format(), ff_fmt_ff2v4l(), ff_fmt_v4l2ff(), ff_get_qtpalette(), ff_h2645_packet_split(), ff_h264_pred_init(), ff_h264_pred_init_aarch64(), ff_h264_pred_init_arm(), ff_h264_pred_init_mips(), ff_mp4_read_dec_config_descr(), ff_mpa_decode_header(), ff_qsv_codec_id_to_mfx(), ff_qsv_level_to_mfx(), ff_spdif_read_packet(), ff_vbv_update(), ffat_create_decoder(), film_write_packet(), filter_codec_opts(), find_decoder(), find_probe_decoder(), flv_same_audio_codec(), get_audio_codec_id(), get_codec_name(), get_compliance_unofficial_pix_fmts(), h264_pred_init_neon(), is_pcm(), list_formats(), mkv_query_codec(), mkv_write_track(), mov_get_lpcm_flags(), mov_pcm_be_gt16(), mov_pcm_le_gt16(), mov_read_extradata(), mpegaudio_parse(), mpegps_read_packet(), open_output_file(), PRED4x4(), pulse_read_header(), pulse_read_packet(), samples_per_packet(), select_segment_type(), unsupported_codec(), v4l2_read_header(), validate_codec_tag(), vpx_ts_param_parse(), webm_dash_manifest_write_header(), and webm_query_codec().

◆ codec_profile

int codec_profile

Definition at line 370 of file vaapi_decode.c.

Referenced by vaapi_decode_make_config().

◆ va_profile

VAProfile va_profile

Definition at line 371 of file vaapi_decode.c.

Referenced by vaapi_decode_make_config().

◆ profile_parser

VAProfile(* profile_parser) (AVCodecContext *avctx)

Definition at line 372 of file vaapi_decode.c.

◆ vaapi_profile_map

const { ... } vaapi_profile_map[]