[vlc-devel] [PATCH] DXVA2: output opaque GPU surfaces that can be used directly by D3D9

Steve Lhomme robux4 at videolabs.io
Tue Apr 28 14:17:16 CEST 2015


On Tue, Apr 28, 2015 at 1:27 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On 28 Apr, Steve Lhomme wrote :
>>  include/vlc_fourcc.h                 |   3 +
>>  src/misc/fourcc.c                    |   2 +-
>
> This needs to be in a different commit.

Ok, then it has to come before the other commits to avoid breaking the builds.

>>  modules/video_chroma/copy.c          |  40 ++++--
>
> Idem. And should not have switches on this place. Use different
> functions.

ok

>>  modules/codec/Makefile.am            |   3 +-
>>  modules/codec/avcodec/dxva2.c        | 153 ++++++++++++++-------
>>  modules/codec/avcodec/va.c           |   2 +-
>
> This needs to be in one commit.
>
>>  modules/video_output/Makefile.am     |   3 +-
>>  modules/video_output/msw/direct3d9.c | 153 ++++++++++-----------
>
> idem.

yes, I forgot you already told me.

>>  src/video_output/vout_wrapper.c      |  15 ++-
>>  src/win32/direct3d9_pool.c           | 248 +++++++++++++++++++++++++++++++++++
>>  src/win32/direct3d9_pool.h           |  39 ++++++
>
> idem.

IMO it should go with the direct3d9 GPU opaque support commit. It
cannot work without this. Otherwise this one has to come first.

> Moreover, why do you need to have the direct3d9_pool part in the core?
> It's not really portable, and is a bit weird to have there, especially
> when D3D11 is arriving.

That's the ugly part of the whole solution. The decoder pool belongs
to the vout wrapper which is in the code. So one way or another it has
to create that pool and it has to be picture_t with the
VLC_CODEC_D3D9_OPAQUE pixel format. The only way to do that is with
Windows specific code.

One other way could be to request the pool via a module. I'm fine with
such a solution.

Note: there are already a few _WIN32 specific calls in vout_wrapper.c

Steve



More information about the vlc-devel mailing list