#include <windows.h>
#include <d3d9.h>
#include <dxva2api.h>
#include <initguid.h>
#include "avassert.h"
#include "common.h"
#include "hwcontext.h"
#include "hwcontext_dxva2.h"
#include "hwcontext_internal.h"
#include "imgutils.h"
#include "mem.h"
#include "pixdesc.h"
#include "pixfmt.h"
#include "compat/w32dlfcn.h"
Go to the source code of this file.
|  | 
|  | DEFINE_GUID (video_decoder_service, 0xfc51a551, 0xd5e7, 0x11d9, 0xaf, 0x55, 0x00, 0x05, 0x4e, 0x43, 0xff, 0x02) | 
|  | 
|  | DEFINE_GUID (video_processor_service, 0xfc51a552, 0xd5e7, 0x11d9, 0xaf, 0x55, 0x00, 0x05, 0x4e, 0x43, 0xff, 0x02) | 
|  | 
| static void | dxva2_frames_uninit (AVHWFramesContext *ctx) | 
|  | 
| static void | dxva2_pool_release_dummy (void *opaque, uint8_t *data) | 
|  | 
| static AVBufferRef * | dxva2_pool_alloc (void *opaque, size_t size) | 
|  | 
| static int | dxva2_init_pool (AVHWFramesContext *ctx) | 
|  | 
| static int | dxva2_frames_init (AVHWFramesContext *ctx) | 
|  | 
| static int | dxva2_get_buffer (AVHWFramesContext *ctx, AVFrame *frame) | 
|  | 
| static int | dxva2_transfer_get_formats (AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats) | 
|  | 
| static void | dxva2_unmap_frame (AVHWFramesContext *ctx, HWMapDescriptor *hwmap) | 
|  | 
| static int | dxva2_map_frame (AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags) | 
|  | 
| static int | dxva2_transfer_data_to (AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src) | 
|  | 
| static int | dxva2_transfer_data_from (AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src) | 
|  | 
| static int | dxva2_map_from (AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags) | 
|  | 
| static void | dxva2_device_free (AVHWDeviceContext *ctx) | 
|  | 
| static int | dxva2_device_create9 (AVHWDeviceContext *ctx, UINT adapter) | 
|  | 
| static int | dxva2_device_create9ex (AVHWDeviceContext *ctx, UINT adapter) | 
|  | 
| static int | dxva2_device_create (AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags) | 
|  | 
◆ DXVA2API_USE_BITFIELDS
      
        
          | #define DXVA2API_USE_BITFIELDS | 
      
 
 
◆ COBJMACROS
◆ FF_D3DCREATE_FLAGS
      
        
          | #define FF_D3DCREATE_FLAGS | 
      
 
Value:                            (D3DCREATE_SOFTWARE_VERTEXPROCESSING | \
                            D3DCREATE_MULTITHREADED | \
                            D3DCREATE_FPU_PRESERVE)
Definition at line 43 of file hwcontext_dxva2.c.
 
 
◆ pDirect3DCreate9
      
        
          | typedef IDirect3D9* WINAPI pDirect3DCreate9(UINT) | 
      
 
 
◆ pDirect3DCreate9Ex
      
        
          | typedef HRESULT WINAPI pDirect3DCreate9Ex(UINT, IDirect3D9Ex **) | 
      
 
 
◆ pCreateDeviceManager9
      
        
          | typedef HRESULT WINAPI pCreateDeviceManager9(UINT *, IDirect3DDeviceManager9 **) | 
      
 
 
◆ DEFINE_GUID() [1/2]
      
        
          | DEFINE_GUID | ( | video_decoder_service | , | 
        
          |  |  | 0xfc51a551 | , | 
        
          |  |  | 0xd5e7 | , | 
        
          |  |  | 0x11d9 | , | 
        
          |  |  | 0xaf | , | 
        
          |  |  | 0x55 | , | 
        
          |  |  | 0x00 | , | 
        
          |  |  | 0x05 | , | 
        
          |  |  | 0x4e | , | 
        
          |  |  | 0x43 | , | 
        
          |  |  | 0xff | , | 
        
          |  |  | 0x02 |  | 
        
          |  | ) |  |  | 
      
 
 
◆ DEFINE_GUID() [2/2]
      
        
          | DEFINE_GUID | ( | video_processor_service | , | 
        
          |  |  | 0xfc51a552 | , | 
        
          |  |  | 0xd5e7 | , | 
        
          |  |  | 0x11d9 | , | 
        
          |  |  | 0xaf | , | 
        
          |  |  | 0x55 | , | 
        
          |  |  | 0x00 | , | 
        
          |  |  | 0x05 | , | 
        
          |  |  | 0x4e | , | 
        
          |  |  | 0x43 | , | 
        
          |  |  | 0xff | , | 
        
          |  |  | 0x02 |  | 
        
          |  | ) |  |  | 
      
 
 
◆ dxva2_frames_uninit()
◆ dxva2_pool_release_dummy()
  
  | 
        
          | static void dxva2_pool_release_dummy | ( | void * | opaque, |  
          |  |  | uint8_t * | data |  
          |  | ) |  |  |  | static | 
 
 
◆ dxva2_pool_alloc()
  
  | 
        
          | static AVBufferRef* dxva2_pool_alloc | ( | void * | opaque, |  
          |  |  | size_t | size |  
          |  | ) |  |  |  | static | 
 
 
◆ dxva2_init_pool()
◆ dxva2_frames_init()
◆ dxva2_get_buffer()
◆ dxva2_transfer_get_formats()
◆ dxva2_unmap_frame()
◆ dxva2_map_frame()
◆ dxva2_transfer_data_to()
◆ dxva2_transfer_data_from()
◆ dxva2_map_from()
◆ dxva2_device_free()
◆ dxva2_device_create9()
◆ dxva2_device_create9ex()
◆ dxva2_device_create()
◆ dxva2_present_params
  
  | 
        
          | const D3DPRESENT_PARAMETERS dxva2_present_params |  | static | 
 
 
◆ d3d_format
◆ pix_fmt
◆ supported_formats
      
        
          | const { ... }  supported_formats[] | 
      
 
 
◆ ff_hwcontext_type_dxva2
 
static int dxva2_transfer_data_from(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
static int dxva2_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
static int dxva2_device_create(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
static int dxva2_frames_init(AVHWFramesContext *ctx)
static int dxva2_transfer_get_formats(AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
static void dxva2_frames_uninit(AVHWFramesContext *ctx)
static int dxva2_map_from(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src, int flags)
static int dxva2_transfer_data_to(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
This struct is allocated as AVHWDeviceContext.hwctx.