different YUV rendering between directX and direct3D

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
eltouco
Blank Cone
Blank Cone
Posts: 89
Joined: 04 Dec 2007 21:32
VLC version: 2.0.5
Operating System: Windows 7 x64
Location: France

different YUV rendering between directX and direct3D

Postby eltouco » 04 Dec 2007 22:16

Hi

I've noticed a difference between Direct3d and DirectX output when playing a DVD movie.

when output is Direct3D the colors seems to be correct
when output is directX, the dark gray become black.
with no overlay the color seem to be correct.

I made some few researches and found that directx and direct3d have different YUV rendering
when playing a DVD the YUV value are between 16 and 235, one render RBG value between 16-235 the other expand to 0-255
what is the correct one ?

by the way, i didn't find any doc about directx and direct3d in videolan documentation, should be useful to know that are the difference since the option is proposed ?

Touco

eltouco
Blank Cone
Blank Cone
Posts: 89
Joined: 04 Dec 2007 21:32
VLC version: 2.0.5
Operating System: Windows 7 x64
Location: France

Re: different YUV rendering between directX and direct3D

Postby eltouco » 05 Dec 2007 21:58

up

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: different YUV rendering between directX and direct3D

Postby VLC_help » 06 Dec 2007 01:01

IIRC Direct3D should work in Vista with Aero enabled. Plain DirectX disables Aero. 16-235 is correct.

eltouco
Blank Cone
Blank Cone
Posts: 89
Joined: 04 Dec 2007 21:32
VLC version: 2.0.5
Operating System: Windows 7 x64
Location: France

Re: different YUV rendering between directX and direct3D

Postby eltouco » 08 Dec 2007 00:49

IIRC Direct3D should work in Vista with Aero enabled. Plain DirectX disables Aero. 16-235 is correct.
this anwer is a bit obscure to me :)

I'm not using vista (I did not mention it anyway) but XP but that is not the point.
VLC give the option to choose the way the video is rendered, but there is no documentation about the differences between those output.
For windows, what is the difference between direct3D and DirectX in termes of video output ?

My eyes can see a différence in the way colors and luminance are rendered differently between DirectX and Direct3D, but which one is the right on in termes of color fidelity to the DVD ?

Thanks for your answers

Touco
ps: What do you mean by "16-235 is correct" ?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: different YUV rendering between directX and direct3D

Postby VLC_help » 09 Dec 2007 12:06

Normal TV and DVD's use 16-235 range for colors, so one that keeps those ranges correctly is usually better. Direct3D uses Direct3D API for rendering and DirectX uses DirectDraw, so Direct3D requires somewhat more calculating power from displayer adapter, but it also enable some neat tricks, which unfortunately don't exist in VLC yet.

http://www.virtualdub.org/blog/pivot/entry.php?id=105
has more info about Vista thing which you don't want to hear =)

eltouco
Blank Cone
Blank Cone
Posts: 89
Joined: 04 Dec 2007 21:32
VLC version: 2.0.5
Operating System: Windows 7 x64
Location: France

Re: different YUV rendering between directX and direct3D

Postby eltouco » 09 Dec 2007 14:07

Normal TV and DVD's use 16-235 range for colors, so one that keeps those ranges correctly is usually better. Direct3D uses Direct3D API for rendering and DirectX uses DirectDraw, so Direct3D requires somewhat more calculating power from displayer adapter, but it also enable some neat tricks, which unfortunately don't exist in VLC yet.

http://www.virtualdub.org/blog/pivot/entry.php?id=105
has more info about Vista thing which you don't want to hear =)
Thanks, interresting info.

but you wrote that keeping the range 16-235 from a YUV source to a range 16-235 to PC Screen is the right thing to do, but if level 16 is black on a TV and on DVD, it is displayed a dark Gray on a PC screen, am I right ?

To my eyes, the direct3D (directx 9 on XP) render is visually better, I have a scene on DVd with two character one has a grey suit and the other a black suit.

With DirectX output, they both have black suit
With direct3D ouput, one have a black suit the other one a grey suit.

Wich one is right ?

Touco

Touco

BlackShark
New Cone
New Cone
Posts: 8
Joined: 05 Mar 2007 16:16

Re: different YUV rendering between directX and direct3D

Postby BlackShark » 09 Dec 2007 15:16

Search for a portion of your movie where you know you should have true black, like a fade to black transition or the end credits.
The wrong one will display that black gray, while the right on will display it black.

eltouco
Blank Cone
Blank Cone
Posts: 89
Joined: 04 Dec 2007 21:32
VLC version: 2.0.5
Operating System: Windows 7 x64
Location: France

Re: different YUV rendering between directX and direct3D

Postby eltouco » 09 Dec 2007 23:44

Search for a portion of your movie where you know you should have true black, like a fade to black transition or the end credits.
The wrong one will display that black gray, while the right on will display it black.
Thanks, that was a pretty good idea.

A made a test and realize that it doesn't have to do with DirectX or Direct3D but with the hardware accelration of YUV->RGB

when this option is set, on a scene with "sure" blak (end credit) if I make a capture screen on check the level on photoshop the black is at an RBG value of (16,16,16) which apperas as a whashed out black

when this option is off, on the same test, the black is at RGB value (0,0,0)

I think my graphic card drivers (lastest release of an ATI x850XT) are buggy on that features

I made some few more test comparison, the edge seems to bu a bit blurry with Direct3D and sharp with DirectX

I don't why since the difference between directX output and Direct3D are not well documented regarding the features it gives

thansk for your help

Touco


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 52 guests