[MPlayer-dev-eng] [TOOLS] PSNR plot utility
Zoltan Hidvegi
mplayer at hzoli.2y.net
Fri Apr 29 19:31:01 CEST 2005
I wrote a simple utility I've been using for a while to calculate and
plot PSNR values. The main reason I wrote this is to better
understand the quality of multi-pass encoding, after I saw that in
many cases mult-pass encoding increases global PSNR at the expense of
allowing some really bad looking scenes. In other words, the global
PSNR may be high, even if 2% of the movie is almost unwatchable. I
did not like this so much, that recently I only use constant QP lavc
encoding with well chosen lmin=lmax and v[bi]_q(factor|offset).
It can also use an edl file to only calculate the PSNR of a section of
the movie, assuming constant frame rate. By default only the average
PSNR is shown, use -p to invoke GNUPlot to plot the distribution.
Only the luma PSNR is used for plot, as that's what I care about the
most, but it would be trivial to use chroma only or average.
Also, frames with PSNR above a threshold (default 60.0) are ignored to
prevent extensive black regions with near infinite PSNR inflate the
average.
It also have an option to show the PSNR of given frame types (I, P or B).
Use -x to use the given exponent averaging the per frame MSE (default
1). Only -x1 will give you the correct PSNR, but it may be
informative to use -x2 or other higher power distinguish encoding with
the same global PSNR but one with even overal quality vs. one with
some parths high quality while other parts crappy. I.e. in evaluating
multi-pass encoding options, it may be worth looking at -x2 averages.
If you think this tool is useful, I can check it in under TOOLS.
Zoli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: psnrcalc.c
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050429/c77deccb/attachment.txt>
More information about the MPlayer-dev-eng
mailing list