diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-29 07:08:32 +0300 |
---|---|---|
committer | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-10-30 01:46:00 +0300 |
commit | 4870d8518a9270639983da216797d02fc6c445b5 (patch) | |
tree | 82c3dca93fd87efc684de82790eabd1f560cb413 /libavcodec/snowenc.c | |
parent | 863c9189eeede608a75cf2875bdd684a19a7b0c2 (diff) |
avcodec/snowenc: use log2 instead of log() / log(2...)
This is likely more precise and conveys the intent better.
The expression has also been accordingly simplified.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavcodec/snowenc.c')
-rw-r--r-- | libavcodec/snowenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 7e8269cd92..fb0cd3f474 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1547,7 +1547,7 @@ static void calculate_visual_weight(SnowContext *s, Plane *p){ } } - b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5); + b->qlog= (int)(QROOT * log2(352256.0/sqrt(error)) + 0.5); } } } |