[MPlayer-dev-eng] Direct 3D Windows VO

Georgi Petrov gogothebee at gmail.com
Tue Nov 11 22:40:37 CET 2008


For somebody not really into Mplayer, the new Direct3D driver makes
those things possible:

* Vista's Aero doesn't shut down
* Playback of more than one video is possible
* Quality bilinear resizing (for fullscreen or larger/smaller that the
original window)
* Works on remote desktop
* Works perfectly on secondary monitors/TVs (with perfect frame rate as well)
* Works as fast as DirectDraw (-vo directx)
* Works as reliable as DirectDraw under all versions of Windows
(2000-Vista), given that you have Direct3D installed
* I will draw the subtitles AFTER the movie is resized, so you will
get -vo gl like subtitles and NOT -vo directx like subtitles (in -vo
directx they are drawn at movie's resolution and rescaled later, which
makes them look bad)
* Future-proof driver, as Direct3D will be supported for years to
come, where DirectDraw is deprecated since DirectX 8.
* Overlay-less solution - just as expected on modern composited
desktops where HW overlays just can't live any longer. That's why
Vista shuts down Aero - HW overlay requires guarantee that the movie
rectangle is being drawn DIRECTLY on the screen and not in screen
backbuffer (as required by Aero). Since HW overlay just pops up and
steals the rectangle where the movie is being rendered, it CAN'T be
used in composited desktop and no magic flag can change this
limitation. The only way is with the Direct3D driver, where the
Mplayer frames are copied to Direct3D Offscreen surface and then
copied to the video card's backbuffer (which with Aero on is actually
another offscreen surface, which DWM renders when needed onscreen).

On Tue, Nov 11, 2008 at 11:26 PM, Georgi Petrov <gogothebee at gmail.com> wrote:
> I forgot - you don't need to have advanced HW like the latest Geforce.
> I don't use any shaders or stuff like that. I use only 2D surfaces, so
> any DirectX 7 compatible card and up (GeForce 256 I believe) should
> work just fine. The card just need to have the capability to create 2D
> YV12/YUY2 surface, which every video card since last 9 years I believe
> can do.
>
> On Tue, Nov 11, 2008 at 11:20 PM, Georgi Petrov <gogothebee at gmail.com> wrote:
>> Hi, that someone is me :)
>>
>> Actually last month I resumed my work on the driver and it's almost
>> ready. I had plans to start a new thread very soon (a couple of days)
>> about it.
>>
>> Right now this works:
>>
>> * Support for YV12/YUY2 (planar/packed) colorspaces.
>> * Windowed mode
>> * Fullscreen
>> * Quality bilinear resize (both resized windowed mode and fullscreen)
>>
>> This is not ready:
>> * RGB colorspaces
>> * Subtitles
>> * Video equalization (brightness, contrast, hue, etc).
>> * A couple of other things
>>
>> I just want to write subtitles support and test the driver as good as
>> I can before releasing it, so we have something good from the
>> beginning.
>>
>> The performance is quite nice as it should be - everything is HW
>> accelerated. Direct3D fully supports creating PlainOffscreen surfaces
>> (where I render each frame) in both YV12/YUY2  formats and handles
>> colorspace conversion when copying this offscreen surface to the
>> screen backbuffer. It's nice and fast. Vsync also seems to work very
>> nice, so no tearing.
>>
>> Also - the problem I have with my second display (TV) with opengl is
>> not present. The problem was jerky video. When I drag the movie window
>> on the TV, it was playing like 15fps. With Direct 3D it's as smooth as
>> on the monitor. Picture "routing" through remote desktop works as
>> well, which definitely doesn't work with DirectDraw. Also playing more
>> than one video DOESN'T work when using DirectDraw (-vo directx). The
>> second video remains black. You can try it right now.
>>
>> Just wait a couple of days to clean my code and to implement some
>> additional checks and stuff and I'll release the first version of the
>> driver :)
>>
>> Btw I seem to have problem with subtitles, but I'm not quite there yet :)
>>
>



More information about the MPlayer-dev-eng mailing list