#include "config.h"
#include <windows.h>
#include <initguid.h>
#include <d3d11.h>
#include <dxgi1_2.h>
#include "avassert.h"
#include "common.h"
#include "hwcontext.h"
#include "hwcontext_d3d11va.h"
#include "hwcontext_internal.h"
#include "imgutils.h"
#include "pixdesc.h"
#include "pixfmt.h"
#include "thread.h"
#include "compat/w32dlfcn.h"
Go to the source code of this file.
|
static av_cold void | load_functions (void) |
|
static void | d3d11va_default_lock (void *ctx) |
|
static void | d3d11va_default_unlock (void *ctx) |
|
static void | d3d11va_frames_uninit (AVHWFramesContext *ctx) |
|
static int | d3d11va_frames_get_constraints (AVHWDeviceContext *ctx, const void *hwconfig, AVHWFramesConstraints *constraints) |
|
static void | free_texture (void *opaque, uint8_t *data) |
|
static AVBufferRef * | wrap_texture_buf (AVHWFramesContext *ctx, ID3D11Texture2D *tex, int index) |
|
static AVBufferRef * | d3d11va_alloc_single (AVHWFramesContext *ctx) |
|
static AVBufferRef * | d3d11va_pool_alloc (void *opaque, size_t size) |
|
static int | d3d11va_frames_init (AVHWFramesContext *ctx) |
|
static int | d3d11va_get_buffer (AVHWFramesContext *ctx, AVFrame *frame) |
|
static int | d3d11va_transfer_get_formats (AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats) |
|
static int | d3d11va_create_staging_texture (AVHWFramesContext *ctx, DXGI_FORMAT format) |
|
static void | fill_texture_ptrs (uint8_t *data[4], int linesize[4], AVHWFramesContext *ctx, D3D11_TEXTURE2D_DESC *desc, D3D11_MAPPED_SUBRESOURCE *map) |
|
static int | d3d11va_transfer_data (AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src) |
|
static int | d3d11va_device_init (AVHWDeviceContext *hwdev) |
|
static void | d3d11va_device_uninit (AVHWDeviceContext *hwdev) |
|
static int | d3d11va_device_find_adapter_by_vendor_id (AVHWDeviceContext *ctx, uint32_t flags, const char *vendor_id) |
|
static int | d3d11va_device_create (AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags) |
|
◆ COBJMACROS
◆ PFN_CREATE_DXGI_FACTORY
typedef HRESULT(WINAPI * PFN_CREATE_DXGI_FACTORY) (REFIID riid, void **ppFactory) |
◆ load_functions()
static av_cold void load_functions |
( |
void |
| ) |
|
|
static |
◆ d3d11va_default_lock()
static void d3d11va_default_lock |
( |
void * |
ctx | ) |
|
|
static |
◆ d3d11va_default_unlock()
static void d3d11va_default_unlock |
( |
void * |
ctx | ) |
|
|
static |
◆ d3d11va_frames_uninit()
◆ d3d11va_frames_get_constraints()
◆ free_texture()
static void free_texture |
( |
void * |
opaque, |
|
|
uint8_t * |
data |
|
) |
| |
|
static |
◆ wrap_texture_buf()
◆ d3d11va_alloc_single()
◆ d3d11va_pool_alloc()
static AVBufferRef* d3d11va_pool_alloc |
( |
void * |
opaque, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ d3d11va_frames_init()
◆ d3d11va_get_buffer()
◆ d3d11va_transfer_get_formats()
◆ d3d11va_create_staging_texture()
◆ fill_texture_ptrs()
static void fill_texture_ptrs |
( |
uint8_t * |
data[4], |
|
|
int |
linesize[4], |
|
|
AVHWFramesContext * |
ctx, |
|
|
D3D11_TEXTURE2D_DESC * |
desc, |
|
|
D3D11_MAPPED_SUBRESOURCE * |
map |
|
) |
| |
|
static |
◆ d3d11va_transfer_data()
◆ d3d11va_device_init()
◆ d3d11va_device_uninit()
◆ d3d11va_device_find_adapter_by_vendor_id()
static int d3d11va_device_find_adapter_by_vendor_id |
( |
AVHWDeviceContext * |
ctx, |
|
|
uint32_t |
flags, |
|
|
const char * |
vendor_id |
|
) |
| |
|
static |
◆ d3d11va_device_create()
◆ functions_loaded
◆ mCreateDXGIFactory
◆ mD3D11CreateDevice
PFN_D3D11_CREATE_DEVICE mD3D11CreateDevice |
|
static |
◆ d3d_format
◆ pix_fmt
◆ supported_formats
const { ... } supported_formats[] |
◆ ff_hwcontext_type_d3d11va
static int d3d11va_transfer_get_formats(AVHWFramesContext *ctx, enum AVHWFrameTransferDirection dir, enum AVPixelFormat **formats)
static int d3d11va_transfer_data(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame *src)
static int d3d11va_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
@ AV_HWDEVICE_TYPE_D3D11VA
static void d3d11va_frames_uninit(AVHWFramesContext *ctx)
static int d3d11va_frames_get_constraints(AVHWDeviceContext *ctx, const void *hwconfig, AVHWFramesConstraints *constraints)
static int d3d11va_device_create(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags)
static int d3d11va_frames_init(AVHWFramesContext *ctx)
This struct is allocated as AVHWDeviceContext.hwctx.
static void d3d11va_device_uninit(AVHWDeviceContext *hwdev)
static int d3d11va_device_init(AVHWDeviceContext *hwdev)