summaryrefslogtreecommitdiff
path: root/libavcodec/lagarithrac.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-27 01:33:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-04 02:03:33 +0200
commit4fb4bf7289de2ceb58d1700f60b5c049f7907391 (patch)
tree3009830d1a493b2431c08edee7c68764f31f46ca /libavcodec/lagarithrac.h
parent625ffa145704458b4cf85ef558221b2e50628877 (diff)
downloadffmpeg-4fb4bf7289de2ceb58d1700f60b5c049f7907391.tar.gz
avcodec/lagarithrac.h/lag_get_rac: drop apparently unneeded operations
Diffstat (limited to 'libavcodec/lagarithrac.h')
-rw-r--r--libavcodec/lagarithrac.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/lagarithrac.h b/libavcodec/lagarithrac.h
index 9892d11fb3..ebc6bef22d 100644
--- a/libavcodec/lagarithrac.h
+++ b/libavcodec/lagarithrac.h
@@ -93,10 +93,9 @@ static inline uint8_t lag_get_rac(lag_rac *l)
*/
low_scaled = FASTDIV(l->low - (l->low >> 24), div);
shift -= l->hash_shift;
- shift &= 31;
- low_scaled = (low_scaled << shift) | (low_scaled >> (32 - shift));
+ low_scaled = (low_scaled >> (32 - shift));
/* low_scaled is now a lower bound of low/range_scaled */
- val = l->range_hash[(uint8_t) low_scaled];
+ val = l->range_hash[low_scaled];
while (l->low >= range_scaled * l->prob[val + 1])
val++;
}