From d8ae0dfd999db6721892a1242e0baaa34af5135d Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 27 May 2014 01:33:59 +0200 Subject: avcodec/lagarithrac: increase LUT from 256 to 1024 bytes about 2 cycles (~1%) faster lag_get_rac() Signed-off-by: Michael Niedermayer --- libavcodec/lagarithrac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libavcodec/lagarithrac.c') diff --git a/libavcodec/lagarithrac.c b/libavcodec/lagarithrac.c index 895acb0d35..c24064607c 100644 --- a/libavcodec/lagarithrac.c +++ b/libavcodec/lagarithrac.c @@ -45,9 +45,9 @@ 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 - 8, 0); + l->hash_shift = FFMAX((int)l->scale - 10, 0); - for (i = j = 0; i < 256; i++) { + for (i = j = 0; i < 1024; i++) { unsigned r = i << l->hash_shift; while (l->prob[j + 1] <= r) j++; -- cgit v1.2.3