[vlc-devel] [vlc-commits] DXVA2_ModeVC1_D2010 is specified by Microsoft

Rafaël Carré funman at videolan.org
Tue Feb 7 19:47:57 CET 2012

Le 2012-02-07 04:41, Jean-Baptiste Kempf a écrit :
> On Mon, Feb 06, 2012 at 07:14:13PM -0500, Rafaël Carré wrote :

>> I grouped them by GUIDs defined in dxva2api.h, to properly ifdef them
>> out when mingw-w64 gets a proper header.
> Great. Mingw64 is our only path of salvation, if we want Win64
> support... And if someone does WinRT, that will be them.

Yeah, there is also some other APIs than direct* which they declare but
mingw.org doesn't (at least the SecureCchPrint*).

Also in debian the mingw-w64 gcc is more recent than mingw.org but I
don't know if something prevent us from using 4.6 for mingw.org too.

I tried to use gcc 4.7.0 from svn but I had loads of segfaults in libav*
so for now I will stick to what debian has ...

>> I still don't know for which purpose this apparently unordered list was
>> sorted by codec type.
> It is like this, because many vendors pop-up with slightly different
> GUID for the same things, not speaking about different names,
> and it is easier to find duplicates or find patterns, since they love to
> use the same root for their GUID.

With a quick look I didn't see any repetitive scheme but I trust you to
have looked more carefully at it.
And yeah you can see them quickly, all the microsoft ones look like an
enumeration with some holes.

IMO this could benefit of some macros:

#define MS_ID    0xa0c7,0x11d3,{0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5}
#define INTEL_ID 0x4951,0x4c54,{0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6}


For DirectShow formats it's easy .. the first 4 bytes are the FOURCC and
the rest is always the same thing.

> Moreover, it then helps for the big table afterwards, to check that
> nothing is missing for one codec.

> Also, the issue here, is that WinSDK different versions (Vista, Vista+PU, 7
> and 8) will not define the same GUIDs. So how do you decide to #ifdef
> somes and not the other ones? How do you support multiple DxVA2api.h
> versions? How do you decide what goes in and out?

Only what is on the list on MSDN, and that excludes the 2010 update.
I don't think Microsoft will update the header since their API/ABI is

If they do it will be at the next OS update and we can use _WIN32_WINNT

Also note that unlike other interfaces, those GUID are not external and
defined in a library, they all are declared only in the header.

> Finally, I don't see why you can't ifdef single GUID with a macro
> involving a #ifndef ... DEFINE_GUI( ) #endif

Me neither, sounds like a good idea.

What about:

#if !defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3
# define MINGW_GUID(bla) DEFINE_GUID(bla)
# define MINGW_GUID(bla)

Then using per-codec ordering?


> Best regards,

I sent the dxva2api.h patches on
(it asked for my sf.net login so I am not sure if it's public), review
is going on but usually it's quite fast.

Let's revisit our list when this gets committed, OK ?

More information about the vlc-devel mailing list