[FFmpeg-cvslog] avutil/intmath: Change debruijn_ctz64 to use 8bit elements

Michael Niedermayer git at videolan.org
Sun Oct 11 05:45:11 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Oct 11 04:21:01 2015 +0200| [2a4d1a66e853263c04aa3e2720bde2d0d246d4fb] | committer: 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: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a4d1a66e853263c04aa3e2720bde2d0d246d4fb
---

 libavutil/intmath.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/intmath.h b/libavutil/intmath.h
index b412385..ec7286a 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,



More information about the ffmpeg-cvslog mailing list