[FFmpeg-user] psnr range

Nicolas George george at nsup.org
Wed Jun 26 11:26:40 EEST 2019


Carl Eugen Hoyos (12019-06-26):
> The source code contains the following line in vf_psnr.c:
> return 10.0 * log10(pow_2(max) / (mse / nb_frames))
> so a likely range is 0-100

You are reading the formula upside down: x/max would have a range [0;1]
(possibly later converted to a percentage), but max/x has range [1;+∞].
And indeed, +∞ is a possible value for lossless encoding.

Then the logarithm turns the range to [0:+∞].

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190626/ac2c6973/attachment.sig>


More information about the ffmpeg-user mailing list