Originally published on the old depletionmode / 2of1 blog (archived copy).
I submitted a Direct2D vout patch for inclusion in VLC.
Direct2D should in theory provide comparable performance to the Direct3D out.
The only issue at the moment is that there is no YUV conversion API within Direct2D itself – and Direct2D can’t deal with bitmaps in YUV format.
This means that it requires a YUV->RGB conversion on each frame – which is currently done in software.
The solution to this might be a Direct3D/Direct2D interop and I hope to explore this sometime in the future.
However one of the main advantages of Direct2D is the seamless software-render fallback.
This is especially useful for older machines and virtual machines.
Hopefully the patch will be included in VLC 1.2.0. In the meantime you can try it…
Get latest version of vlc from the git repro:
git clone git://git.videolan.org/vlc.gitDownload D2D1 headers for MinGW and install:
Update: There is currently an issue with these headers. Read about it here…
tar xvjf 2of1-d2d1headers*.tar.gz
cd 2of1-d2d1headers-<hash>
cp *.h /usr/win32/include/Get the patch and apply:
cd vlc
git apply 0001-Direct2D-video-output-module.patchChange the extras/package/win32/configure-mingw.sh file to appear as follows:
#!/bin/sh
root=$(echo $0|sed 's#extras/package/win32/configure-mingw.sh##')./
if [ -n "$1" ]
then
CONTRIBS="$1"
else
CONTRIBS="/usr/win32"
fi
export CONTRIBS
PATH="$CONTRIBS/bin:$PATH" \
PKG_CONFIG_LIBDIR=$CONTRIBS/lib/pkgconfig \
CPPFLAGS="-I$CONTRIBS/include -I$CONTRIBS/include/ebml" \
LDFLAGS="-L$CONTRIBS/lib" \
CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \
CONFIG="${root}configure --host=i586-mingw32msvc --build=i386-linux
--disable-dirac --enable-mkv --enable-taglib --enable-debug --disable-projectm --disable-lub --enable-direct2d" \
sh ${root}extras/package/win32/configure-common.shConfigure and compile:
sh extras/package/win32/configure-mingw.sh
make && make package-win32-base-zipYou should now have vlc-1.2.0-git-win32.zip ready for transfer to your Window Vista w/ PU or Windows 7 machine.