PDA

View Full Version : 4:2:0 chroma subsampling in MPEG - do any decoders avoid color bleeding?


LigH
26th January 2004, 21:17
Dear XviD and ffdshow developers,

because we just ask ourselves in the german doom9/Gleitz forum, I just decided to ask you: Chrominance is stored with 4:2:0 subsampling in MPEG video, so as well in XviD video. Decoding well saturated red or blue areas often shows obvious small blockiness.

Do your decoders (XviD filter / ffdshow) try to avoid this "color bleeding" - and if "yes", how (e.g. by interpolating colors or by one of the post-processing modes) and when (always, or "enableable")?

I remember that once I found a HQ patch for DivX 3.11a which patched the codec (probably from doubling to linear interpolation, which takes a little more time but looks better); so I just wonder how "modern" decoders work in this part.

Soulhunter
27th January 2004, 22:33
Again, the chroma up-sampling stuff... :D

So far, I know 3 ways to solve this problem, but not all will work for everyone... ;)

Here (http://forum.doom9.org/showthread.php?s=&postid=390365) is a short thread about it !!!

Here (http://forum.doom9.org/showthread.php?s=&threadid=38304) is a long one... :p

I know Im not a developer, but I hope this info helps you anyhow !!!


Bye

MfA
27th January 2004, 22:57
XviD just spits out YV12 if it is able, but I doubt it uses nearest neighbour upsampling if it is forced to usample chroma ... probably just uses linear interpolation twice (I would read the source code, but people have been known to fall to the ground foaming at the mouth when reading colorspace.c).

Most graphics cards probable use linear or cubic.

You could do better by detecting edges on the luma plane and using that info to interpolate chroma.

sh0dan
27th January 2004, 23:02
Originally posted by MfA
XviD just spits out YV12 if it is able, but I doubt it uses nearest neighbour upsampling if it is forced to usample chroma ...
.. but it does. ;)

ok - I know it is point upsampling in RGB mode - YUY2 seems similar in the source.

It is usually related to hardware, when chroma blocking occurs in YV12 mode. It seems like ATi and Matrox have an edge over nVidia in that area.

CruNcher
27th January 2004, 23:32
best and not as slow as converttorgb32 is to use MPC and VMR9-Renderless , works perfect on my Geforce 3 and the latest forceware :)

LigH
27th January 2004, 23:35
Thank you all for your great help - of course, overlays must be hardware dependent. Now that I read it, I can easily follow the mentioned statements!