summaryrefslogtreecommitdiff
path: root/libavfilter/vf_ssim.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-29 00:17:19 -0400
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-29 19:02:05 -0400
commitb8e19808071c87c271896685d3c5038a6c469f5b (patch)
tree905ea45b1383f042f4bd1191c34ac9880c7d3fe9 /libavfilter/vf_ssim.c
parentec66bcc0e75ca839e82f3c87ebfa7cd90bc1c089 (diff)
avfilter/vf_ssim: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavfilter/vf_ssim.c')
-rw-r--r--libavfilter/vf_ssim.c2
1 files changed, 1 insertions, 1 deletions
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,