Log in

View Full Version : Just a random question about near-black scenes.


gizmotech
7th February 2004, 07:53
Hi guys,

Just to start something different, I was wondering if I could get an explination as to why xvid, and most mpeg-4 codecs seem to handle near-dark scenes in normal quant2 differently then brighter scenes. What I mean by this is when I've watched encoding of cartoon sources w/ near black colors, however with distinict color sperations, pre-xvid the edge is properly defined, and useable. After encoding the edge loses the distinct colors and the edge itself becomes distorted.

Now this same thing doesn't seem to happen (could be a visual error on my part) @ quant 2 on bright areas in the same source, so my question is why does xvid perform this type of edge destruction, and overall near-black/ near-dark scene edge/detail destruction.

Tomorrow I will take a screen shot or two to demonstrate my problem, but I think some of you know what I'm talking about.

PS: This isn't a problem limited only to xvid, as it also effects divx. Just in different ways.

Gizmo. Who hopes he makes more sense after 6 hours of sleep ;)

sysKin
7th February 2004, 08:33
Okay imagine a scene. Think about watching the scene with two different brighness/contrast settings. Unless you set the brighness or contrast horribly high or horribly low, you notice the same amount of details - it's just a picture, the same edges and the same objects which move the same way.

For xvid however, the dark scene has less energy to code. It has less picture, because the dynamic range of the whole picture (the difference between darkest and brightest pixel) is smaller. As a result, the dark scene will have smaller bitrate and will look worse...

This is a HVS theory, which should be implemented as a HVS model. This is part of what I'm planning to do as soon as I'm allowed to - after 1.0 is out.

BTW This is why PSNR, perhaps, could be modified to be more useful. SNR states for signal-to-noise, but the "signal" is assumed to be in full picture range, from white to black. It might make sense often, but perhaps the "signal" should be calculated as an energy of the picture with DC component (and possibly some lowest-frequency components) discarded. Dunno really.

Radek

gizmotech
7th February 2004, 19:12
Ahh ok.

Good to know I'm not completely insane then. I guess I'll just have to patiently wait till they let you lose again to see improvements in dark scenes.

Gizmo