1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Ganesh Ajjanagadde 2015-10-29 00:08:32 -04:00
parent 863c9189ee
commit 4870d8518a

View File

@ -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);
}
}
}