summaryrefslogtreecommitdiff
path: root/libavcodec/lagarithrac.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-11-10 17:43:17 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2015-11-10 17:43:17 +0100
commit2503aa6bd9125593f7a5c730915685e515f83907 (patch)
tree35d88d28a563ea84708aed3ac5e2f4c98774e4de /libavcodec/lagarithrac.c
parentd786cdff1ca5e24cff7207118bc6c8a4ed124cef (diff)
parent0b699920f3c0b2e30969b38ce59226653f9d80ec (diff)
downloadffmpeg-2503aa6bd9125593f7a5c730915685e515f83907.tar.gz
Merge commit '0b699920f3c0b2e30969b38ce59226653f9d80ec'
* commit '0b699920f3c0b2e30969b38ce59226653f9d80ec': lagarith: Correctly compute hash_shift Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/lagarithrac.c')
-rw-r--r--libavcodec/lagarithrac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lagarithrac.c b/libavcodec/lagarithrac.c
index 37ac2cf570..3d36d1b9e9 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((int)l->scale - 10, 0);
+ l->hash_shift = FFMAX(l->scale, 10) - 10;
for (i = j = 0; i < 1024; i++) {
unsigned r = i << l->hash_shift;