[FFmpeg-cvslog] ffmpeg: use log10 instead of log()/log(10)
Ganesh Ajjanagadde
git at videolan.org
Fri Oct 30 00:06:49 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 29 00:01:43 2015 -0400| [b45daad2aa34d17e225e6449fd8cdaeba02ec2be] | committer: Ganesh Ajjanagadde
ffmpeg: use log10 instead of log()/log(10)
This is more concise and conveys the intent better.
Furthermore, it is likely more precise as well due to lack of floating
point division.
Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b45daad2aa34d17e225e6449fd8cdaeba02ec2be
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index afe1cb7..f8b071a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1244,7 +1244,7 @@ static void do_video_out(AVFormatContext *s,
static double psnr(double d)
{
- return -10.0 * log(d) / log(10.0);
+ return -10.0 * log10(d);
}
static void do_video_stats(OutputStream *ost, int frame_size)
More information about the ffmpeg-cvslog
mailing list