FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | 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 "libavutil/hwcontext.h"
#include "libavutil/hwcontext_dxva2.h"
#include <initguid.h>

Go to the source code of this file.

Data Structures

struct  dxva2_mode
 
struct  DXVA2Context
 

Macros

#define _WIN32_WINNT   0x0600
 
#define DXVA2API_USE_BITFIELDS
 
#define COBJMACROS
 

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_ModeHEVC_VLD_Main, 0x5b11d51b, 0x2f4c, 0x4452, 0xbc, 0xc3, 0x09, 0xf2, 0xa1, 0x16, 0x0c, 0xc0)
 
 DEFINE_GUID (DXVA2_ModeHEVC_VLD_Main10, 0x107af0e0, 0xef1a, 0x4d19, 0xab, 0xa8, 0x67, 0xa1, 0x63, 0x07, 0x3d, 0x13)
 
 DEFINE_GUID (DXVA2_ModeVP9_VLD_Profile0, 0x463707f8, 0xa1d0, 0x4585, 0x87, 0x6d, 0x83, 0xaa, 0x6d, 0x60, 0xb8, 0x9e)
 
 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_uninit (AVCodecContext *s)
 
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.

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_ModeHEVC_VLD_Main  ,
0x5b11d51b  ,
0x2f4c  ,
0x4452  ,
0xbc  ,
0xc3  ,
0x09  ,
0xf2  ,
0xa1  ,
0x16  ,
0x0c  ,
0xc0   
)
DEFINE_GUID ( DXVA2_ModeHEVC_VLD_Main10  ,
0x107af0e0  ,
0xef1a  ,
0x4d19  ,
0xab  ,
0xa8  ,
0x67  ,
0xa1  ,
0x63  ,
0x07  ,
0x3d  ,
0x13   
)
DEFINE_GUID ( DXVA2_ModeVP9_VLD_Profile0  ,
0x463707f8  ,
0xa1d0  ,
0x4585  ,
0x87  ,
0x6d  ,
0x83  ,
0xaa  ,
0x6d  ,
0x60  ,
0xb8  ,
0x9e   
)
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_uninit ( AVCodecContext s)
static

Definition at line 109 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

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

Definition at line 130 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

static int dxva2_retrieve_data ( AVCodecContext s,
AVFrame frame 
)
static

Definition at line 138 of file ffmpeg_dxva2.c.

Referenced by dxva2_alloc().

static int dxva2_alloc ( AVCodecContext s)
static

Definition at line 160 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 218 of file ffmpeg_dxva2.c.

Referenced by dxva2_create_decoder().

static int dxva2_create_decoder ( AVCodecContext s)
static

Definition at line 265 of file ffmpeg_dxva2.c.

Referenced by dxva2_init().

int dxva2_init ( AVCodecContext s)

Definition at line 409 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 },
{ &DXVA2_ModeHEVC_VLD_Main, AV_CODEC_ID_HEVC },
{ &DXVA2_ModeHEVC_VLD_Main10,AV_CODEC_ID_HEVC },
{ &DXVA2_ModeVP9_VLD_Profile0, AV_CODEC_ID_VP9 },
{ NULL, 0 },
}
#define NULL
Definition: coverity.c:32
preferred ID for MPEG-1/2 video decoding
Definition: avcodec.h:196

Definition at line 69 of file ffmpeg_dxva2.c.