[MPlayer-dev-eng] [PATCH] synch to x264 r50 / mencgen
Loren Merritt
lorenm at u.washington.edu
Thu Sep 30 18:33:33 CEST 2004
On Thu, 30 Sep 2004, Romain Dolbeau wrote:
> Loren Merritt wrote:
>
>> It looks like mencgen is using the "Y", "U", and "V" PSNR fields.
>
> Yep, it is. Then recompute All using the lavc formula, which give
> about the same results as the All from x264. I hoped it would
> make the PSNR sort of comparable (isn't it all about "my PSNR is
> bigger than yours" ? :-)
All is already calculated from Y,U,V using the lavc formula.
The problem is that Y,U,V are calculated wrong.
>> Don't.
>> They are completely bogus, and will favor bad rate-control decisions.
>> (I didn't manage to convince the x264 maintainers to remove them, since the
>> H.264 reference codec uses the same broken metrics.)
>> The only correct PSNR value reported is "Global".
>
> Could you explain the differences between them ?
Y,U,V,Avg are arithmetic means of the frame-wise PSNRs.
PSNR is a log scale, so it's meaning to take a mean. Consider a video
where half the frames are supposed to be pure black (and were encoded
with no errors, PSNR=infinity but capped to 100), and the other half are
supposed to be detailed, but were encoded as black anyway (PSNR ~= 0).
x264's Y,U,V,Avg PSNRs will all be 50 (i.e. good quality), even though
the video sucks. Global (calculated the same way as lavc's and xvid's
PSNR) will be about 3.
> more important,
> are Global and All giving the same order when sorting ? After all,
> that's all mencgen care about.
It should give the same order much of the time, as long as your options
affect each frame equally. But that is definitely not true of rate-control
options, and will probably also screw up frameref and scenecut.
--Loren Merritt
-------------- next part --------------
Index: mplayer.1
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/man/en/mplayer.1,v
retrieving revision 1.758
diff -u -r1.758 mplayer.1
--- mplayer.1 30 Sep 2004 13:08:26 -0000 1.758
+++ mplayer.1 30 Sep 2004 16:19:34 -0000
@@ -6939,7 +6939,14 @@
.
.TP
.B psnr | nopsnr
-Print signal-to-noise ratio statistics (default: off).
+Print signal-to-noise ratio statistics.
+.br
+.I NOTE:
+The 'Y', 'U', 'V', and 'Avg' PSNR fields in the summary are not
+mathematically sound (they are simply the average of per-frame PSNRs).
+They are kept only for comparison to the JM reference codec.
+For all other purposes, please use either the 'Global' PSNR, or the per-frame
+PSNRs printed by log=3.
.
.
.\" --------------------------------------------------------------------------
More information about the MPlayer-dev-eng
mailing list