You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
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@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ static inline unsigned pow2(unsigned base)
|
|||||||
|
|
||||||
static inline double get_psnr(double mse, uint64_t nb_frames, int max)
|
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)
|
static uint64_t sse_line_8bit(const uint8_t *main_line, const uint8_t *ref_line, int outw)
|
||||||
|
Reference in New Issue
Block a user