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@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
parent
b8e1980807
commit
b45daad2aa
2
ffmpeg.c
2
ffmpeg.c
@ -1244,7 +1244,7 @@ static void do_video_out(AVFormatContext *s,
|
|||||||
|
|
||||||
static double psnr(double d)
|
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)
|
static void do_video_stats(OutputStream *ost, int frame_size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user