[FFmpeg-devel] [PATCH 01/11] ffmpeg: use log10 instead of log()/log(10)
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Oct 29 05:19:59 CET 2015
This is more concise and conveys the intent better.
Furthermore, it is likely more precise as well due to lack of floating
point division.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index f91fb7b..148c21b 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)
--
2.6.2
More information about the ffmpeg-devel
mailing list