[FFmpeg-devel] [PATCH 2/5] vp56rac: Replace /256 with >>8
David Conrad
lessen42
Tue Jun 15 15:02:15 CEST 2010
---
libavcodec/vp56.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 3d98b9e..edbdcdd 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -192,7 +192,7 @@ static inline void vp56_init_range_decoder(VP56RangeCoder *c,
static inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
{
- unsigned int low = 1 + (((c->high - 1) * prob) / 256);
+ unsigned int low = 1 + (((c->high - 1) * prob) >> 8);
unsigned int low_shift = low << 8;
int bit = c->code_word >= low_shift;
--
1.7.1
More information about the ffmpeg-devel
mailing list