View Full Version : Why isn't Xvid's black true black.
Koppel
9th June 2008, 18:54
I've noticed that colors in xvid encodes are a little washed out and did a test to confirm that.
Made a #000000 solid with text in After Effects CS3 and rendered in both xvid and uncompressed format.
Viewed both videos with Media Player Classic and took snapshots. The uncompressed one had real blacks but the xvid encode had this:
http://priits.com/Koppel/xvid_black.bmp
The black on this picture is:
R: 16
G: 16
B: 16
Why is that and what am I doing wrong?
Xvid ver: Xvid-1.1.3-27042008 _Final Release_
Media Player Classic ver: 6.4.9.0
Dark Shikari
9th June 2008, 19:09
This is because After Effects is using the TV luma scale (16-235), which Xvid is compressing under, but your decoder is not converting back to the PC luma scale (0-255).
Koppel
9th June 2008, 19:25
So the problematic part is my decoder, the Media Player Classic, right?
What should I use to view my xvid encoded stuff the way it's meant to be? Use another player or install something to enable PC luma scale in Media Player Classic.
And what about Virtual Dub, is it also using the TV luma scale? If I encode stuff I filmed myself to xvid, are the colors going to be correct with VirtualDub?
Dark Shikari
9th June 2008, 19:26
So the problematic part is my decoder, the Media Player Classic, right?
What should I use to view my xvid encoded stuff the way it's meant to be? Use another player or install something to enable PC luma scale in Media Player Classic.
And what about Virtual Dub, is it also using the TV luma scale? If I encode stuff I filmed myself to xvid, are the colors going to be correct with VirtualDub?It depends both on the decoder and the renderer you use; try switching to Overlay or Haali's renderer in Media Player Classic. I think Haali's might have the option to do the scaling built in; if all else fails the FFDshow decoder can force the conversion if you choose the an option.
Koppel
9th June 2008, 19:50
I tried Haali's Video Renderer, that worked (although scaled my 320x240 file up to 640x480, other files didn't get scaled)
A lot of other people I send my stuff to would still see washed out colors.
Is it the same with x264 videos or is this a reason to start encoding x264?
Dark Shikari
9th June 2008, 20:00
I tried Haali's Video Renderer, that worked (although scaled my 320x240 file up to 640x480, other files didn't get scaled)
A lot of other people I send my stuff to would still see washed out colors.
Is it the same with x264 videos or is this a reason to start encoding x264?I've never seen an x264-encoded video that wasn't encoded using the TV luma scale; such a scale seems pretty widespread to the point where if a decoder doesn't assume that scale, its probably doing things wrong...
Koppel
9th June 2008, 20:19
So its not even possible to encode videos using the full scale 0-255?
Will x264 videos show blacks as true blacks by default and not having to mess with decoders. So the people who I share my stuff with see the correct colors?
Dark Shikari
9th June 2008, 20:22
So its not even possible to encode videos using the full scale 0-255?Of course it is. Its just that most people don't. The encoder has absolutely nothing to do with the TV/PC luma scale; it merely takes what its given and encodes it. There are stream flags to signal one or the other, and TV luma is used by default, I think.Will x264 videos show blacks as true blacks by default and not having to mess with decoders. So the people who I share my stuff with see the correct colors?Again, it depends on the decoder and renderer. Its no different from with Xvid, where a correct decoder/renderer chain should show black as true black.
Koppel
9th June 2008, 20:46
If it should then why aren't the most popular programs doing it by default - it would be the correct way. Most people are dumbusers and they don't need to know how videos are encoded, they just want to see them in as good quality as possible.
It seems that there is no "install xvid and watch" solution. The original Media Player (latest versions 10 an 11 I think) thats in every Windows machine should show things correctly. Incorrect black values are really noticeable, why hasn't the developers set it as default behavior to scale TV luma to PC luma.
Dark Shikari
9th June 2008, 20:47
If it should then why aren't the most popular programs doing it by default - it would be the correct way. Most people are dumbusers and they don't need to know how videos are encoded, they just want to see them in as good quality as possible.All the programs I see do the conversion correctly.
It seems that there is no "install xvid and watch" solution.Yes there is, its called the CCCP or mplayer.
Ranguvar
9th June 2008, 21:23
if all else fails the FFDshow decoder can force the conversion if you choose the an option.
Could you or another please share this? I've been looking for it for a bit.
Dark Shikari
9th June 2008, 21:25
Could you or another please share this? I've been looking for it for a bit.Two ways to do it:
1. Output: unselect everything but RGB (to force FFDshow to do the conversion), then go to the RGB Conversion tab and select Standard or Full Range. Note that the video renderer is what's supposed to be doing the conversion normally, so this will decrease speed by offloading what the video card is supposed to be doing to your CPU.
2. Postprocessing, mplayer, level fix, luminance.
Koppel
9th June 2008, 21:29
What are the programs that do the conversion correctly? Microsofts Media Player is probably the most popular since its in every Windows machine and dumbusers may not consider other players.
I use Media Player Classic - didn't do the conversion correctly until I switched to Haali's Video Renderer
VLC media Player - didn't do the conversion correctly, not even with uncompressed video.
Dark Shikari
9th June 2008, 22:12
What are the programs that do the conversion correctly? Microsofts Media Player is probably the most popular since its in every Windows machine and dumbusers may not consider other players.
I use Media Player Classic - didn't do the conversion correctly until I switched to Haali's Video Renderer
VLC media Player - didn't do the conversion correctly, not even with uncompressed video.More likely, your overlay is at fault, not the media player. In other words, its your graphics card drivers that are responsible.
Koppel
9th June 2008, 22:34
So default nVidia and ATI display drivers are not good? Or just certain version numbers?
professor_desty_nova
10th June 2008, 10:44
In ATI cards, since Catalyst driver 7.7, TV->PC convertion is not happening for SD content (but it works with HD content!) and results in wash out blacks. In this (http://forum.doom9.org/showthread.php?t=128903) thread they explain a registry fix for it (the "UseBT601CSC"="1" fix).
Edit: Don't know if in the last catalyst it's working again.
Isochroma
17th June 2008, 21:50
just set ffdshow to output rgb32 only (UNCHECK every other format, and also UNCHECK "Select closest matching colorspace" and "Allow output format changes during playback".
while you're there you might as well CHECK "High quality YV12 to RGB conversion"
windows vmr mixer clips luma to 16-235 if it receives any YUV format. if you want to use xvid's own dshow decoder, likewise set it also for rgb32.
only exception to this rule is coreavc, which can be set to anything. it uses a secret trick to bypass vmr's clipping. devs are silent on that one.
Ranguvar
17th June 2008, 22:00
it uses a secret trick to bypass vmr's clipping. devs are silent on that one.
How evil.
Soulhunter
21st June 2008, 00:04
I encode everything in fullscale... For playback via my GF8800GT > using MPCs Overlay output < plus > ffdshow with output colorspace set to RGB24 < does the trick!
Bye
Isochroma
21st June 2008, 02:21
Any output that is not a YUV format will bypass the VMR's colorspace converter, passing the full range as it was decoded.
Ranguvar
21st June 2008, 02:34
Any output that is not a YUV format will bypass the VMR's colorspace converter, passing the full range as it was decoded.
Yeah... we were just talking about having a YV12 video, for example, and not forcing ffdshow to do the RGB full-range conversion, but making VMR do said conversion full-range.
Isochroma
21st June 2008, 02:36
I tested ffshow's so-called 'full-range' conversion. Of course all it does is clip the data, if the output is YUV, because whatever it does it still can't control what happens when the VMR renderer gets the data. So in my tests the whites were still grayish, and the blacks dark grey, just that more of the range was squished into them.
Now the situation will be different if you're using overlay or the 'old' renderer. Because I watch alot of anime with subs, I need VMR for subtitle rendering (at full screen resolution), plus it has lots of performance benefits. No questions asked it is worth the extra CPU to preconvert to RGB before sending to the renderer. Along with this comes the extra almost-free benefit of better chroma upsampling than the VMR can do.
Perhaps Haali's renderer can preserve the full range...
Ranguvar
21st June 2008, 02:42
Haali's renderer can preserve the full range.
And yeah... ffdshow needs to output to RGB if you want full range with the VMR renderer. You can force this.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.