From 2a4d1a66e853263c04aa3e2720bde2d0d246d4fb Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 11 Oct 2015 04:21:01 +0200 Subject: avutil/intmath: Change debruijn_ctz64 to use 8bit elements This reduces the memory & cache need from 256 to 64 bytes the code also seems faster with this change Signed-off-by: Michael Niedermayer --- libavutil/intmath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavutil') diff --git a/libavutil/intmath.h b/libavutil/intmath.h index b412385e53..ec7286a539 100644 --- a/libavutil/intmath.h +++ b/libavutil/intmath.h @@ -167,7 +167,7 @@ static av_always_inline av_const int ff_ctz_c( int v ) * http://supertech.csail.mit.edu/papers/debruijn.pdf. */ static av_always_inline av_const int ff_ctzll_c(long long v) { - static const int debruijn_ctz64[64] = { + static const uint8_t debruijn_ctz64[64] = { 0, 1, 2, 53, 3, 7, 54, 27, 4, 38, 41, 8, 34, 55, 48, 28, 62, 5, 39, 46, 44, 42, 22, 9, 24, 35, 59, 56, 49, 18, 29, 11, 63, 52, 6, 26, 37, 40, 33, 47, 61, 45, 43, 21, 23, 58, 17, 10, -- cgit v1.2.3