[FFmpeg-user] psnr range
le_chiffre at bondvillian.com
Thu Jun 27 01:33:53 EEST 2019
Thanks. For reference, yes libvmaf does limit the psnr. 60dB for 8-bit
video, 72dB for 10-bit. Google tells me that indeed, 60dB is the limit of
visual perception, give or take.
The computation is the same:
double eps = 1e-10;
*score = MIN(10 * log10(peak * peak / MAX(noise_, eps)), psnr_max);
I assume ffmpeg also has a floor value for MSE, to prevent divide-by-zero,
just not seen in the snippet posted.
On Wed, Jun 26, 2019 at 1:26 AM Nicolas George <george at nsup.org> wrote:
> 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:+∞].
> Nicolas George
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user