PDA

View Full Version : Resizing for RV9


karl_lillevold
19th January 2003, 23:52
I finally got around to running some simple resizing tests for RV9 compression. I found that even though Lanczos may give you the ultimate resize quality, it significantly affects compressibility, in fact so much that I would recommend Neutral Bicubic (B=0, C=0.5) in most cases. I tried an animation source, and a grainy, high spatial detail source, with fixed quality 90, 1000 frames, resizing from 720x354 to 640x272:

Animation
Bicubic Neutral : 6544 KB
Lanczos : 7089 KB
Bicubic Soft : 5790 KB
Bicubic Sharp : 6902 KB
SimpleResize : 6261 KB

Grainy, high detail film
Bicubic Neutral : 19784 KB
Lanczos : 22268 KB
Bicubic Soft : 17600 KB
Bicubic Sharp : 21701 KB
SimpleResize : 18990 KB

Bicubic Soft has B=0.333, C=0.333, while Sharp is B=0, C=0.75.
It is clear that the 10% extra bits spent for Lanczos when using fixed quality, will cause the encoder to have to use a higher quantizer to reach the same target bitrate when the bitrate is constrained. Even though Lanczos may preserve a little more detail than Neutral Bicubic, it is rarely worth the sacrificed compressibility. The lost visual quality from the higher quantization can be seen much easier than any difference in video quality due to the resizing chosen.

For these fixed high quality encodes, I have a really hard time seeing any visual difference between Lanczos and neutral bicubic, even though the Lanczos resized video required 10% more bits. SimpleResize is just a little softer, and Bicubic Soft the softest looking video.

It would seem the increased resolution obtained through anamorphic encoding where no resizing is necessary is then probably a better option than Lanczos, if you have enough bits to spend.

Here are a couple of links with some more information:

http://www.avisynth.org/index.php?page=Resize
o quote from this : "You have to set b + 2 * c = 1 for the numerically most accurate filter. This gives for b = 0 the maximum value for c = 0.5, which is the Catmull-Rom spline and a good suggestion for sharpness.", which supports Neutral as being a good balance between compressibility and artificial sharpness.

http://www.animemusicvideos.org/guides/avtech/avspostresize.html
o (on this page "soft" means what is usually called "neutral", or B=0, C=0.5).

These experiments were not too thorough, so I am curious to hear your experience. Is Lanczos ever worth the the loss in compressibility? When is it a good idea to move to SimpleResize or Bicubic Soft for even better compressibility? Bilinear (SimpleResize) actually works very well for shrinking, both visually, and for compressibility, and is very fast.

sam_b
20th January 2003, 00:58
I use lanczos only when near saturation of the codec, in which case it just seems to make it look sharper, with few side effects. On grainy or old film it's almost impossible to compress if you use lanczos I find. But for dark films I almost always use lanczos to help alleviate blocking (as it keeps more noise, and looks nice) and they usually have the bitrate to spare.

I'm a fan of roundabout 0.33,0.33 for most DVB caps, which often need 2Mbps+