summaryrefslogtreecommitdiff
path: root/libavcodec/snowenc.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-29 00:08:32 -0400
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-10-29 18:46:00 -0400
commit4870d8518a9270639983da216797d02fc6c445b5 (patch)
tree82c3dca93fd87efc684de82790eabd1f560cb413 /libavcodec/snowenc.c
parent863c9189eeede608a75cf2875bdd684a19a7b0c2 (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.c2
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);
}
}
}