diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index ce1e3db98e..7c43e98854 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -176,7 +176,7 @@ static float ssim_plane(SSIMDSPContext *dsp, static double ssim_db(double ssim, double weight) { - return 10 * (log(weight) / log(10) - log(weight - ssim) / log(10)); + return 10 * log10(weight / (weight - ssim)); } static AVFrame *do_ssim(AVFilterContext *ctx, AVFrame *main,