mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
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>
This commit is contained in:
parent
ec66bcc0e7
commit
b8e1980807
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user