Page 1 of 1

different YUV rendering between directX and direct3D

Posted: 04 Dec 2007 22:16
by eltouco
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

Re: different YUV rendering between directX and direct3D

Posted: 05 Dec 2007 21:58
by eltouco
up

Re: different YUV rendering between directX and direct3D

Posted: 06 Dec 2007 01:01
by VLC_help
IIRC Direct3D should work in Vista with Aero enabled. Plain DirectX disables Aero. 16-235 is correct.

Re: different YUV rendering between directX and direct3D

Posted: 08 Dec 2007 00:49
by eltouco
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" ?

Re: different YUV rendering between directX and direct3D

Posted: 09 Dec 2007 12:06
by VLC_help
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 =)

Re: different YUV rendering between directX and direct3D

Posted: 09 Dec 2007 14:07
by eltouco
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

Re: different YUV rendering between directX and direct3D

Posted: 09 Dec 2007 15:16
by BlackShark
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.

Re: different YUV rendering between directX and direct3D

Posted: 09 Dec 2007 23:44
by eltouco
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