[FFmpeg-cvslog] avfilter/vf_psnr: use log10 instead of log()/log(10)
Ganesh Ajjanagadde
git at videolan.org
Thu Oct 29 23:53:49 CET 2015
ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Thu Oct 29 00:16:34 2015 -0400| [59d37f5a4e7014ee0e44af051f092fff9917399b] | committer: Ganesh Ajjanagadde
avfilter/vf_psnr: use log10 instead of log()/log(10)
This is likely more precise and conveys the intent better.
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=59d37f5a4e7014ee0e44af051f092fff9917399b
---
libavfilter/vf_psnr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c
index 36bbab2..bce5c51 100644
--- a/libavfilter/vf_psnr.c
+++ b/libavfilter/vf_psnr.c
@@ -72,7 +72,7 @@ static inline unsigned pow2(unsigned base)
static inline double get_psnr(double mse, uint64_t nb_frames, int max)
{
- return 10.0 * log(pow2(max) / (mse / nb_frames)) / log(10.0);
+ return 10.0 * log10(pow2(max) / (mse / nb_frames));
}
static uint64_t sse_line_8bit(const uint8_t *main_line, const uint8_t *ref_line, int outw)
More information about the ffmpeg-cvslog
mailing list