#include "imgutils.h"
#include "pixdesc.h"
#include "pixfmt.h"
+#include "compat/w32dlfcn.h"
typedef IDirect3D9* WINAPI pDirect3DCreate9(UINT);
+typedef HRESULT WINAPI pDirect3DCreate9Ex(UINT, IDirect3D9Ex **);
typedef HRESULT WINAPI pCreateDeviceManager9(UINT *, IDirect3DDeviceManager9 **);
+#define FF_D3DCREATE_FLAGS (D3DCREATE_SOFTWARE_VERTEXPROCESSING | \
+ D3DCREATE_MULTITHREADED | \
+ D3DCREATE_FPU_PRESERVE)
+
+static const D3DPRESENT_PARAMETERS dxva2_present_params = {
+ .Windowed = TRUE,
+ .BackBufferWidth = 640,
+ .BackBufferHeight = 480,
+ .BackBufferCount = 0,
+ .SwapEffect = D3DSWAPEFFECT_DISCARD,
+ .Flags = D3DPRESENTFLAG_VIDEO,
+};
+
+ typedef struct DXVA2Mapping {
+ uint32_t palette_dummy[256];
+ } DXVA2Mapping;
+
typedef struct DXVA2FramesContext {
IDirect3DSurface9 **surfaces_internal;
int nb_surfaces_used;