Log in

View Full Version : Artifacts even with highest quality?


zokik
7th April 2003, 22:13
I am not sure where is actually my problem, is it the limit of the codecs, a decoder failure, or smth else.

I captured an avi clip (huffyuv compressed) and if I save it with huffyuv compression or uncompressed RGB the picture is fine. With any lossy codec I always get the same artifacts, no matter the codec or quality setting. I tried these codecs with 1-pass and highest quality (or lowest quantizer, whatever was there to set): Koepi's stable xvid dated 4. oct 2002, divx 4.12, divx 5.02 with and without qp, gmc and b-frames, MS-mpeg4 v3. This is from the original clip:

http://www.mobisux.com/tabla/files/770000-huffyuv.gif

The artifacts alwasy looked like this:

http://www.mobisux.com/tabla/files/770001-divx.gif

I tried encoding in virtual dub 1.5.1, vdub mod 1.4.13 and Avi utl 0.97f - always got the same results.

For playback I use ffdshow and whatever I tried (postprocessing, decode using xvid, ...) didn't solve the problem. Both pictures here are from virtual dub mod window, 100% size.

To make things even more strange, with mplayer (linux) I see those artifacts even in the original huffyuv coded avi. So I thought maybe the catch is in huffyuv decoder. I booted windows again, saved the clip as uncompressed avi which also plays fine, without artifacts. Then I encoded to divx directly from that uncompressed avi and again I got those same damn artifacts.

Acaila
8th April 2003, 14:44
Something seems to be wrong with those pictures, because I can't even access them.

zokik
8th April 2003, 15:26
Are you stil not able to see them? That server seemed to be down a few times today, should work now.

Anyway, I attached a gif containing an image from the original, divx 5.02 and xvid encoded movie clip, respectively. The quality degradation occurs in all scenes with some red colour area, as in this image on the border of red and blue. Now imagine how bad it looks resized to full screen.

Acaila
8th April 2003, 17:46
What you are seeing is unfortunately unavoidable. DivX and XviD store the final video in YV12 colorspace, which subsamples chroma to attain extra compression.

RGB: full chroma
HuffYUV (YUY2): full vertical chroma, 1/2 horizontal chroma
DivX,XviD (=YV12): 1/2 vertical chroma, 1/2 horizontal chroma

The lower chroma density causes banding artifacts on large even colored planes. Most people see it appear soonest on red areas.

What can be the case with the linux mplayer is that it decodes the video with a YV12 overlay, thereby causing a colorspace conversion on HuffYUV files during playback.

zokik
8th April 2003, 19:23
Thanks for this info. At least it makes sense now. So there is really no way to get better picture with reasonable filesize? I mean, are there any other codecs I could use for this purpose?

As I said before, I captured to avi with lossless huffyuv compression, now I just tested huffyuv with conversion to yuy2 (it says this is slightly lossy, I assume because of this "only 1/2 horiz. chroma") and it looks the same to me. So I guess a codec that can store data also in yuy2 colorspace would be good, if only filesize would be much smaller than with huffyuv. I'm trying to fit about 80 minutes of south park (resolution 384 x 284) on 1 cd. Mission impossible?

Acaila
8th April 2003, 20:31
I only ever used DivX and XviD, and those only store video in YV12 (like all MPEG 4 codecs do). I have no idea what lossy codecs store video in YUY2. Maybe RV9 or WM9 or something?

Sirber
9th April 2003, 02:38
I think RV9 is in YV12.