diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-29 00:17:19 -0400 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-29 19:02:05 -0400 |
commit | b8e19808071c87c271896685d3c5038a6c469f5b (patch) | |
tree | 905ea45b1383f042f4bd1191c34ac9880c7d3fe9 | |
parent | ec66bcc0e75ca839e82f3c87ebfa7cd90bc1c089 (diff) | |
download | ffmpeg-b8e19808071c87c271896685d3c5038a6c469f5b.tar.gz |
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>
-rw-r--r-- | libavfilter/vf_ssim.c | 2 |
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, |