[FFmpeg-devel] [PATCH 10/11] avfilter/vf_ssim: use log10 instead of log()/log(10)
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 29 18:37:03 CET 2015
On Thu, Oct 29, 2015 at 12:20:08AM -0400, Ganesh Ajjanagadde wrote:
> This is likely more precise and conveys the intent better.
>
> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> ---
> libavfilter/vf_ssim.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c
> index ce1e3db..6b2a8d7 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) - log10(weight - ssim));
LGTM
note, this can be simplified further but thats maybe off topic in
relation to switching to log10
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151029/22bdbe59/attachment.sig>
More information about the ffmpeg-devel
mailing list