Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-21 17:46:38 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 17:50:03 +0300
commit114a2eb272077b68bc8e0f2ee8fd6fc85a8e07c2 (patch)
treed11ce3dc892c86e032185994f596cd7edbdf5f44 /libavcodec/cngenc.c
parentd301a13427d970671258593ef14dc87f8e24555a (diff)
avcodec: Use av_clip_uintp2() where possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cngenc.c')
-rw-r--r--libavcodec/cngenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c
index bf5f7bf54b..58918aa958 100644
--- a/libavcodec/cngenc.c
+++ b/libavcodec/cngenc.c
@@ -87,7 +87,7 @@ static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
energy /= frame->nb_samples;
if (energy > 0) {
double dbov = 10 * log10(energy / 1081109975);
- qdbov = av_clip(-floor(dbov), 0, 127);
+ qdbov = av_clip_uintp2(-floor(dbov), 7);
} else {
qdbov = 127;
}