[FFmpeg-cvslog] avcodec/rangecoder: avoid float operation
Michael Niedermayer
git at videolan.org
Mon Jun 1 22:01:37 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 1 21:49:14 2015 +0200| [f805d7be4c602a3c6ee017676125c0bd94e9adae] | committer: Michael Niedermayer
avcodec/rangecoder: avoid float operation
Use integers, avoid potential rounding issues
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f805d7be4c602a3c6ee017676125c0bd94e9adae
---
libavcodec/rangecoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rangecoder.c b/libavcodec/rangecoder.c
index 29fb909..e4c5763 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));
More information about the ffmpeg-cvslog
mailing list