mirror of
https://github.com/xiph/opus.git
synced 2025-06-06 07:21:03 +00:00
Removing the 64-bit part of the range coder.
This commit is contained in:
parent
b6a3b0c464
commit
2b08d7a210
5 changed files with 2 additions and 118 deletions
|
@ -37,30 +37,3 @@ int ec_ilog(ec_uint32 _v){
|
|||
#endif
|
||||
}
|
||||
|
||||
int ec_ilog64(ec_uint64 _v){
|
||||
#if defined(EC_CLZ64)
|
||||
return EC_CLZ64_0-EC_CLZ64(_v);
|
||||
#else
|
||||
ec_uint32 v;
|
||||
int ret;
|
||||
int m;
|
||||
ret=!!_v;
|
||||
m=!!(_v&((ec_uint64)0xFFFFFFFF)<<32)<<5;
|
||||
v=(ec_uint32)(_v>>m);
|
||||
ret|=m;
|
||||
m=!!(v&0xFFFF0000)<<4;
|
||||
v>>=m;
|
||||
ret|=m;
|
||||
m=!!(v&0xFF00)<<3;
|
||||
v>>=m;
|
||||
ret|=m;
|
||||
m=!!(v&0xF0)<<2;
|
||||
v>>=m;
|
||||
ret|=m;
|
||||
m=!!(v&0xC)<<1;
|
||||
v>>=m;
|
||||
ret|=m;
|
||||
ret+=!!(v&0x2);
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue