1
0
Fork 0
forked from len0rd/rockbox

Use clz instruction to calculate integer logarithms, speeds up decoding of one flac 8 sample by 12%.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23783 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nils Wallménius 2009-11-29 15:21:00 +00:00
parent 07fe3562a1
commit 685ca2672e
2 changed files with 10 additions and 0 deletions

View file

@ -1,7 +1,9 @@
bitstream.c
decoder.c
shndec.c
#if !(defined(CPU_ARM) && (ARM_ARCH > 4))
tables.c
#endif
#if defined(CPU_COLDFIRE)
coldfire.S
#elif defined(CPU_ARM)

View file

@ -21,6 +21,13 @@
#include <limits.h>
#if (defined(CPU_ARM) && (ARM_ARCH > 4))
static inline int av_log2(uint32_t v)
{
return 31 - __builtin_clz(v);
}
#else
/* From libavutil/common.h */
extern const uint8_t ff_log2_tab[256];
@ -41,6 +48,7 @@ static inline int av_log2(unsigned int v)
return n;
}
#endif
/**
* @file golomb.h