[MPlayer-users] non-mod16 resolutions

Loren Merritt lorenm at u.washington.edu
Tue Sep 14 05:54:17 CEST 2004


On Mon, 13 Sep 2004, D Richard Felker III wrote:

> On Sun, Sep 12, 2004 at 06:05:51PM -0700, Loren Merritt wrote:
>> BTW, multiples of 16 (not just 8) really are a good idea, and are very
>> cheap compared to everything else you could do to improve video quality:
>> At a given PSNR (and I see no reason why this comparison shouldn't be
>> adequately measured by PSNR), A mpeg4 video with both dimensions
>> non-mod16 takes 5-10% higher bitrate than one cropped, downscaled, or
>> even upscaled to the nearest mod16.
>> The penalty is about half that if only one dimension is non-mod16.
>> Even with 4mv and a resolution divisible by 8, you don't get much of
>> that back (though it depends on the content).
>
> Hahaha, wow, I'm glad to finally have some quantitative figures on
> this. The 5-10% figure is huge...I'd like to see some info about test
> methodology.

Method:

- Start with a square video, so that both dimensions are in-phase.
(If you're encoding a 16:9 movie with only bad width, fewer blocks 
will be on the bad edge, so your efficiency loss will be only about 
40% of what's shown in my test. Still you're talking 2-4% worse 
bitrate at high quality.)

- Downscale to various resolutions (every multiple of 2 from 200x200
to 478x478).
It doesn't matter what scaling algorithm you use, as long as all clips are
scaled the same way. (That means you can't include the original resolution
in the comparison, because it would be unscaled.)

- Encode each resolution to 2 pass lavc.
You can't just compare size at qp=2, because quality varies as much as
size does. (The extra error is concentrated near the edge of the screen, 
but concentrated errors are more annoying than distributed ones.) 
You could compare PSNR at a given bitrate, but how much is 1 PSNR in 
real-world terms? So I compared bitrate at a given PSNR.

- Encode to 2 pass lavc some more times, adjusting bitrate until PSNR 
converges to my desired value. (Amortizing the cost of training my 
predictor over all the runs, it took an average of 2.5 tries to get 
within +/- .01 PSNR)

- Repeat with and without 4mv, and with another source video, and with 
some other PSNR values.

- Graph the results.
http://students.washington.edu/lorenm/src/mplayer/lavc_tests/

--Loren Merritt




More information about the MPlayer-users mailing list