From e4fd7b1fea7e2d3306f159d285ea420a1f250dcc Mon Sep 17 00:00:00 2001 From: James Almer Date: Sat, 23 Sep 2017 13:23:27 -0300 Subject: [PATCH] avcodec/opusenc_psy: use av_clip_uintp2() Fixes fate-source. Signed-off-by: James Almer --- libavcodec/opusenc_psy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c index e6858f1856..bb673bef68 100644 --- a/libavcodec/opusenc_psy.c +++ b/libavcodec/opusenc_psy.c @@ -299,7 +299,7 @@ static void celt_gauge_psy_weight(OpusPsyContext *s, OpusPsyStep **start, } tonal /= 1333136.0f; - f_out->spread = av_clip(lrintf(tonal), 0, 3); + f_out->spread = av_clip_uintp2(lrintf(tonal), 2); rate = ((float)s->avctx->bit_rate) + frame_bits*frame_size*16; rate *= s->lambda;