audio: remove lsbindex/popcount in favour of host-utils's ctz32

Signed-off-by: malc <av1474@comtv.ru>
This commit is contained in:
malc 2009-09-12 02:39:29 +04:00
parent 8b438ba3f5
commit 057fa65c5d
4 changed files with 5 additions and 23 deletions

View file

@ -112,23 +112,6 @@ struct mixeng_volume nominal_volume = {
#endif
};
/* http://www.df.lth.se/~john_e/gems/gem002d.html */
/* http://www.multi-platforms.com/Tips/PopCount.htm */
uint32_t popcount (uint32_t u)
{
u = ((u&0x55555555) + ((u>>1)&0x55555555));
u = ((u&0x33333333) + ((u>>2)&0x33333333));
u = ((u&0x0f0f0f0f) + ((u>>4)&0x0f0f0f0f));
u = ((u&0x00ff00ff) + ((u>>8)&0x00ff00ff));
u = ( u&0x0000ffff) + (u>>16);
return u;
}
inline uint32_t lsbindex (uint32_t u)
{
return popcount ((u&-u)-1);
}
#ifdef AUDIO_IS_FLAWLESS_AND_NO_CHECKS_ARE_REQURIED
#error No its not
#else