[MPlayer-users] Difference between vqscale and vqmin/vqmax values (quality vs. quantizer?)

D Richard Felker III dalias at aerifal.cx
Wed Jun 2 02:00:03 CEST 2004


On Tue, Jun 01, 2004 at 03:03:48PM -0400, Jason Tackaberry wrote:
> On Tue, 2004-06-01 at 13:59 -0400, D Richard Felker III wrote:
> > per-macroblock, so perhaps this is how it works. Why not RTFS? That's
> 
> RTFS might fly on mplayer-dev, but the reason I asked here is because I
> didn't understand TFS, and hoped that someone could give me a synopsis,
> rather than telling me to RTFS.

I think only the authors (i.e. Michael) really know...

> > > vqscale=3 compare in PSNR to a two-pass with vqmin=3:vqmax=3 (assuming
> > > vbitrate was set sufficiently high enough so as not to get in the way)?
> > 
> > This is nonsense. There's no use for two-pass if quantizer is forced
> > to 3!!
> 
> Of course it's nonsense.  You missed my point.  I was asking if a single
> pass of vqscale=3 was the same (in PSNR) to vqmin=3:vqmax=3 (which are
> only available in two-pass mode, according to the man page).  The

The man page says no such thing. I just read it.

> question was only academic.  (It's probably the case that with
> vqmin=3:vqmax=3 the first pass will be the same as the second, but
> again, the question was academic.)
> 
> The point of my asking this nonsense question was to try to understand
> how vqscale differs from vqmin/vqmax.

The only time it might differ is when B frames are involved.

> Anyway, if I understand what you said correctly, I think the answer to
> that question is that they _do_ differ: encoding with vqscale will vary
> the quantizer per macroblock, but the average quantizer of all
> macroblocks in the frame will be what was passed to vqscale; and
> encoding with vqmin=3:vqmax=3 -- nonsense though it is -- forces each
> macroblock to use quant=3, and then obviously the per-frame quantizer is
> also 3.

No, it doesn't. There are separate qmin/max settings for per-mb
quantizer. I think they're called mbqmin and mbqmax or something.

> I don't know how libavcodec picks which quantizer to use per-macroblock
> (and may never know if it requires that I RTFS and understand it), but

Default is to use the frame quantizer. It will only do otherwise if
you use adaptive quantization (*_mask options) and/or qprd
(rate*distortion optimal choice).

Rich




More information about the MPlayer-users mailing list