diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-11 04:21:01 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-11 04:21:01 +0200 |
commit | 2a4d1a66e853263c04aa3e2720bde2d0d246d4fb (patch) | |
tree | 38914a56ff25a2549428d10094aa3d078d3e3bd7 /libavutil/intmath.h | |
parent | 971d12b7f9d7be3ca8eb98e6c04ed521f83cbd3c (diff) | |
download | ffmpeg-2a4d1a66e853263c04aa3e2720bde2d0d246d4fb.tar.gz |
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 <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/intmath.h')
-rw-r--r-- | libavutil/intmath.h | 2 |
1 files changed, 1 insertions, 1 deletions
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, |