Commit 2a4d1a66 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 971d12b7
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment