[MEncoder-users] new doom9 codec comparission (submission)

Loren Merritt lorenm at u.washington.edu
Wed Dec 14 13:56:09 CET 2005


On Wed, 14 Dec 2005, Corey Hickey wrote:

> At the same bitrate, my best snow encodes do beat my best mpeg-4 encodes;
> however, if snow isn't reaching the target bitrate for you, that could mean
> it doesn't have a chance to look significantly better.
>
> Also, Rich Felker just pointed out that snow quantizers aren't really
> comparable. It may well be that having the same minimum quantizer for both
> codecs means snow is disproportionately limited in how accurately it can
> encode a movie. Rich, can you please confirm/refute that and maybe elaborate
> a bit?

I can confirm that. Snow at qscale=2 is both much lower bitrate and lower 
quality than mpeg4 at qscale=2.

In mpeg1/2/4, vqscale maps directly onto a quantizer. (At least, as long 
as vqscale is an integer).
In Snow (and ffmpeg-wrapped x264), the internal quantizer is a completely 
different scale: it's logarithmic instead of linear. In order to present a 
somewhat uniform user interface, the internal quantizer is mapped onto 
qscale. But that mapping is arbitrary. Additionally, since you're 
quantizing different things (wavelet vs dct, etc) there is no simple way 
to derive a scale that would make them equivalent.
When I came up with the mapping qp=12+6*log2(qscale) for x264, it was 
based entirely on experimental evidence that this qp is at a similar 
place in the R-D curve as mpeg4 at a given qscale. Either Snow has not 
undergone the same test, or it has changed enough since then that the 
original scale no longer holds.

>>>   pass 1: vpass=1:vqscale=1
>>> *At this point, make a backup of divx2pass.log.
>>>
>>>   pass 2: vpass=3:vbitrate=xxx:lmin=2  <--that's the default
>>> *Was the target bitrate met? If not, overwrite divx2pass.log with the
>>> backup, lower lmin by 0.2 and try again.
>>
>> Doesn't that mean we could have multiple second passes, thus turning the
>> whole process into quad pass or quintuple pass?
>
> Yes, potentially. In the 2-pass method, though, finding an appropriate
> vqscale value for the first pass already takes several tries, so that was
> never really 2-pass either. My approach isn't the panacea of snow encoding,
> but I'm pretty sure it reduces the amount of guesswork and wasted passes.

lavc's 2nd pass ratecontrol should print an error message before encoding 
if it won't be able to fill the target bitrate with the given lmin. I 
don't know what's going wrong.
Of course, if bitrate prediction is very far off it won't know that it 
can't fill the bitrate. But that's not the problem here, since it fails 
to print even if 1st pass at qscale=2 is less than the requested bitrate.

--Loren Merritt




More information about the MEncoder-users mailing list