FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
ffmpeg_dxva2.c File Reference
#include <windows.h>
#include <stdint.h>
#include <d3d9.h>
#include <dxva2api.h>
#include "ffmpeg.h"
#include "libavcodec/dxva2.h"
#include "libavutil/avassert.h"
#include "libavutil/buffer.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
#include <initguid.h>

Go to the source code of this file.

Data Structures

struct  dxva2_mode
 
struct  surface_info
 
struct  DXVA2Context
 
struct  DXVA2SurfaceWrapper
 

Macros

#define _WIN32_WINNT   0x0600
 
#define DXVA2API_USE_BITFIELDS
 
#define COBJMACROS
 

Typedefs

typedef IDirect3D9 *WINAPI pDirect3DCreate9 (UINT)
 
typedef HRESULT WINAPI pCreateDeviceManager9 (UINT *, IDirect3DDeviceManager9 **)
 

Functions

 DEFINE_GUID (IID_IDirectXVideoDecoderService, 0xfc51a551, 0xd5e7, 0x11d9, 0xaf, 0x55, 0x00, 0x05, 0x4e, 0x43, 0xff, 0x02)
 
 DEFINE_GUID (DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28, 0x4e65, 0xbe, 0xea, 0x1d, 0x26, 0xb5, 0x08, 0xad, 0xc9)
 
 DEFINE_GUID (DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e, 0x4f04, 0x9f, 0xd3, 0x92, 0x53, 0xdd, 0x32, 0x74, 0x60)
 
 DEFINE_GUID (DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5)
 
 DEFINE_GUID (DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5)
 
 DEFINE_GUID (DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951, 0x4C54, 0x88, 0xFE, 0xAB, 0xD2, 0x5C, 0x15, 0xB3, 0xD6)
 
 DEFINE_GUID (DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5)
 
 DEFINE_GUID (DXVA2_ModeVC1_D2010, 0x1b81beA4, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5)
 
 DEFINE_GUID (DXVA2_NoEncrypt, 0x1b81beD0, 0xa0c7, 0x11d3, 0xb9, 0x84, 0x00, 0xc0, 0x4f, 0x2e, 0x73, 0xc5)
 
 DEFINE_GUID (GUID_NULL, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)
 
static void dxva2_destroy_decoder (AVCodecContext *s)
 
static void dxva2_uninit (AVCodecContext *s)
 
static void dxva2_release_buffer (void *opaque, uint8_t *data)
 
static int dxva2_get_buffer (AVCodecContext *s, AVFrame *frame, int flags)
 
static int dxva2_retrieve_data (AVCodecContext *s, AVFrame *frame)
 
static int dxva2_alloc (AVCodecContext *s)
 
static int dxva2_get_decoder_configuration (AVCodecContext *s, const GUID *device_guid, const DXVA2_VideoDesc *desc, DXVA2_ConfigPictureDecode *config)
 
static int dxva2_create_decoder (AVCodecContext *s)
 
int dxva2_init (AVCodecContext *s)
 

Variables

static const dxva2_mode dxva2_modes []
 

Macro Definition Documentation

#define _WIN32_WINNT   0x0600

Definition at line 24 of file ffmpeg_dxva2.c.

#define DXVA2API_USE_BITFIELDS

Definition at line 25 of file ffmpeg_dxva2.c.

#define COBJMACROS

Definition at line 26 of file ffmpeg_dxva2.c.

Typedef Documentation

typedef IDirect3D9* WINAPI pDirect3DCreate9(UINT)

Definition at line 58 of file ffmpeg_dxva2.c.

typedef HRESULT WINAPI pCreateDeviceManager9(UINT *, IDirect3DDeviceManager9 **)

Definition at line 59 of file ffmpeg_dxva2.c.

Function Documentation

DEFINE_GUID ( IID_IDirectXVideoDecoderService  ,
0xfc51a551  ,
0xd5e7  ,
0x11d9  ,
0xaf  ,
0x55  ,
0x00  ,
0x05  ,
0x4e  ,
0x43  ,
0xff  ,
0x02   
)
DEFINE_GUID ( DXVA2_ModeMPEG2_VLD  ,
0xee27417f  ,
0x5e28  ,
0x4e65  ,
0xbe  ,
0xea  ,
0x1d  ,
0x26  ,
0xb5  ,
0x08  ,
0xad  ,
0xc9   
)
DEFINE_GUID ( DXVA2_ModeMPEG2and1_VLD  ,
0x86695f12  ,
0x340e  ,
0x4f04  ,
0x9f  ,
0xd3  ,
0x92  ,
0x53  ,
0xdd  ,
0x32  ,
0x74  ,
0x60   
)
DEFINE_GUID ( DXVA2_ModeH264_E  ,
0x1b81be68  ,
0xa0c7  ,
0x11d3  ,
0xb9  ,
0x84  ,
0x00  ,
0xc0  ,
0x4f  ,
0x2e  ,
0x73  ,
0xc5   
)
DEFINE_GUID ( DXVA2_ModeH264_F  ,
0x1b81be69  ,
0xa0c7  ,
0x11d3  ,
0xb9  ,
0x84  ,
0x00  ,
0xc0  ,
0x4f  ,
0x2e  ,
0x73  ,
0xc5   
)
DEFINE_GUID ( DXVADDI_Intel_ModeH264_E  ,
0x604F8E68  ,
0x4951  ,
0x4C54  ,
0x88  ,
0xFE  ,
0xAB  ,
0xD2  ,
0x5C  ,
0x15  ,
0xB3  ,
0xD6   
)
DEFINE_GUID ( DXVA2_ModeVC1_D  ,
0x1b81beA3  ,
0xa0c7  ,
0x11d3  ,
0xb9  ,
0x84  ,
0x00  ,
0xc0  ,
0x4f  ,
0x2e  ,
0x73  ,
0xc5   
)
DEFINE_GUID ( DXVA2_ModeVC1_D2010  ,
0x1b81beA4  ,
0xa0c7  ,
0x11d3  ,
0xb9  ,
0x84  ,
0x00  ,
0xc0  ,
0x4f  ,
0x2e  ,
0x73  ,
0xc5   
)
DEFINE_GUID ( DXVA2_NoEncrypt  ,
0x1b81beD0  ,
0xa0c7  ,
0x11d3  ,
0xb9  ,
0x84  ,
0x00  ,
0xc0  ,
0x4f  ,
0x2e  ,
0x73  ,
0xc5   
)
DEFINE_GUID ( GUID_NULL  ,
0x00000000  ,
0x0000  ,
0x0000  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00   
)
static void dxva2_destroy_decoder ( AVCodecContext s)
static

Definition at line 120 of file ffmpeg_dxva2.c.

Referenced by dxva2_create_decoder(), dxva2_init(), and dxva2_uninit().

static void dxva2_uninit ( AVCodecContext s)
static

Definition at line 143 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

static void dxva2_release_buffer ( void opaque,
uint8_t data 
)
static

Definition at line 182 of file ffmpeg_dxva2.c.

Referenced by dxva2_get_buffer().

static int dxva2_get_buffer ( AVCodecContext s,
AVFrame frame,
int  flags 
)
static

Definition at line 199 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

static int dxva2_retrieve_data ( AVCodecContext s,
AVFrame frame 
)
static

Definition at line 248 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

static int dxva2_alloc ( AVCodecContext s)
static

Definition at line 297 of file ffmpeg_dxva2.c.

Referenced by dxva2_init().

static int dxva2_get_decoder_configuration ( AVCodecContext s,
const GUID device_guid,
const DXVA2_VideoDesc *  desc,
DXVA2_ConfigPictureDecode *  config 
)
static

Definition at line 409 of file ffmpeg_dxva2.c.

Referenced by dxva2_create_decoder().

static int dxva2_create_decoder ( AVCodecContext s)
static

Definition at line 456 of file ffmpeg_dxva2.c.

Referenced by dxva2_init().

int dxva2_init ( AVCodecContext s)

Definition at line 590 of file ffmpeg_dxva2.c.

Variable Documentation

const dxva2_mode dxva2_modes[]
static
Initial value:
= {
{ &DXVA2_ModeMPEG2_VLD, AV_CODEC_ID_MPEG2VIDEO },
{ &DXVA2_ModeMPEG2and1_VLD, AV_CODEC_ID_MPEG2VIDEO },
{ &DXVA2_ModeH264_F, AV_CODEC_ID_H264 },
{ &DXVA2_ModeH264_E, AV_CODEC_ID_H264 },
{ &DXVADDI_Intel_ModeH264_E, AV_CODEC_ID_H264 },
{ &DXVA2_ModeVC1_D2010, AV_CODEC_ID_VC1 },
{ &DXVA2_ModeVC1_D2010, AV_CODEC_ID_WMV3 },
{ &DXVA2_ModeVC1_D, AV_CODEC_ID_VC1 },
{ &DXVA2_ModeVC1_D, AV_CODEC_ID_WMV3 },
{ NULL, 0 },
}

Definition at line 66 of file ffmpeg_dxva2.c.