aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-11-01 14:46:17 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-11-02 16:25:17 +0100
commit0b699920f3c0b2e30969b38ce59226653f9d80ec (patch)
tree9f0ce18b32e34765c3abc73758963af487c41eca /libavcodec
parent1e7ff5ac6923996f7292c82f102c68384fbc9d97 (diff)
downloadffmpeg-0b699920f3c0b2e30969b38ce59226653f9d80ec.tar.gz
lagarith: Correctly compute hash_shift
All the values are unsigned. Bug-Id: 907 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/lagarithrac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lagarithrac.c b/libavcodec/lagarithrac.c
index edfb18fb74..f9e4e5c928 100644
--- a/libavcodec/lagarithrac.c
+++ b/libavcodec/lagarithrac.c
@@ -45,7 +45,7 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length)
l->range = 0x80;
l->low = *l->bytestream >> 1;
- l->hash_shift = FFMAX(l->scale - 8, 0);
+ l->hash_shift = FFMAX(l->scale, 8) - 8;
for (i = j = 0; i < 256; i++) {
unsigned r = i << l->hash_shift;