Merge commit '10065d9324c2e35ce7040b6a2b9ebf6079bcbf42'
authorHendrik Leppkes <h.leppkes@gmail.com>
Thu, 30 Mar 2017 09:37:39 +0000 (11:37 +0200)
committerHendrik Leppkes <h.leppkes@gmail.com>
Thu, 30 Mar 2017 09:37:39 +0000 (11:37 +0200)
* commit '10065d9324c2e35ce7040b6a2b9ebf6079bcbf42':
  hwcontext_dxva2: add support for the P8 format

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
1  2 
libavutil/hwcontext_dxva2.c

  #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;