From b8e19808071c87c271896685d3c5038a6c469f5b Mon Sep 17 00:00:00 2001 From: Ganesh Ajjanagadde Date: Thu, 29 Oct 2015 00:17:19 -0400 Subject: avfilter/vf_ssim: use log10 instead of log()/log(10) This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer Signed-off-by: Ganesh Ajjanagadde --- libavfilter/vf_ssim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter/vf_ssim.c') 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, -- cgit v1.2.3