From f805d7be4c602a3c6ee017676125c0bd94e9adae Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 1 Jun 2015 21:49:14 +0200 Subject: [PATCH] avcodec/rangecoder: avoid float operation Use integers, avoid potential rounding issues Signed-off-by: Michael Niedermayer --- libavcodec/rangecoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c index 29fb909668..e4c5763e4d 100644 --- a/libavcodec/rangecoder.c +++ b/libavcodec/rangecoder.c @@ -133,7 +133,7 @@ int main(void) av_lfg_init(&prng, 1); ff_init_range_encoder(&c, b, SIZE); - ff_build_rac_states(&c, 0.05 * (1LL << 32), 128 + 64 + 32 + 16); + ff_build_rac_states(&c, (1LL << 32) / 20, 128 + 64 + 32 + 16); memset(state, 128, sizeof(state));