FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ffmpeg_vaapi.c File Reference
#include "config.h"
#include <fcntl.h>
#include <unistd.h>
#include <va/va.h>
#include "libavutil/avassert.h"
#include "libavutil/avconfig.h"
#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "libavutil/hwcontext.h"
#include "libavutil/hwcontext_vaapi.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixfmt.h"
#include "libavcodec/vaapi.h"
#include "ffmpeg.h"

Go to the source code of this file.

Data Structures

struct  VAAPIDecoderContext
 

Macros

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

Functions

static int vaapi_get_buffer (AVCodecContext *avctx, AVFrame *frame, int flags)
 
static int vaapi_retrieve_data (AVCodecContext *avctx, AVFrame *input)
 
static int vaapi_build_decoder_config (VAAPIDecoderContext *ctx, AVCodecContext *avctx, int fallback_allowed)
 
static void vaapi_decode_uninit (AVCodecContext *avctx)
 
int vaapi_decode_init (AVCodecContext *avctx)
 
av_cold int vaapi_device_init (const char *device)
 

Variables

static AVClass vaapi_class
 
struct {
   enum AVCodecID   codec_id
 
   int   codec_profile
 
   VAProfile   va_profile
 
vaapi_profile_map []
 
static AVClassvaapi_log = &vaapi_class
 

Macro Definition Documentation

#define DEFAULT_SURFACES   20

Definition at line 53 of file ffmpeg_vaapi.c.

Referenced by vaapi_build_decoder_config().

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

Function Documentation

static int vaapi_get_buffer ( AVCodecContext avctx,
AVFrame frame,
int  flags 
)
static

Definition at line 83 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

static int vaapi_retrieve_data ( AVCodecContext avctx,
AVFrame input 
)
static

Definition at line 99 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

static int vaapi_build_decoder_config ( VAAPIDecoderContext ctx,
AVCodecContext avctx,
int  fallback_allowed 
)
static

Definition at line 186 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

static void vaapi_decode_uninit ( AVCodecContext avctx)
static

Definition at line 381 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

int vaapi_decode_init ( AVCodecContext avctx)

Definition at line 411 of file ffmpeg_vaapi.c.

av_cold int vaapi_device_init ( const char *  device)

Definition at line 526 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

Variable Documentation

AVClass vaapi_class
static
Initial value:
= {
.class_name = "vaapi",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:70
av_default_item_name

Definition at line 47 of file ffmpeg_vaapi.c.

Referenced by vaapi_decode_init().

enum AVCodecID codec_id
int codec_profile

Definition at line 150 of file ffmpeg_vaapi.c.

VAProfile va_profile

Definition at line 151 of file ffmpeg_vaapi.c.

const { ... } vaapi_profile_map[]
AVClass* vaapi_log = &vaapi_class
static

Definition at line 524 of file ffmpeg_vaapi.c.