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 /libavfilter | |
parent | ec66bcc0e75ca839e82f3c87ebfa7cd90bc1c089 (diff) | |
download | ffmpeg-streaming-b8e19808071c87c271896685d3c5038a6c469f5b.zip ffmpeg-streaming-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>
Diffstat (limited to 'libavfilter')
-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 ce1e3db..7c43e98 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, |