********************************************************************
function: residue backend 0, 1 and 2 implementation
- last mod: $Id$
********************************************************************/
}
}
-static int ilog(unsigned int v){
- int ret=0;
- while(v){
- ret++;
- v>>=1;
- }
- return(ret);
-}
-
static int icount(unsigned int v){
int ret=0;
while(v){
bitmask of one indicates this partition class has bits to write
this pass */
for(j=0;j<info->partitions;j++){
- if(ilog(info->secondstages[j])>3){
+ if(ov_ilog(info->secondstages[j])>3){
/* yes, this is a minor hack due to not thinking ahead */
oggpack_write(opb,info->secondstages[j],3);
oggpack_write(opb,1,1);
look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks));
for(j=0;j<look->parts;j++){
- int stages=ilog(info->secondstages[j]);
+ int stages=ov_ilog(info->secondstages[j]);
if(stages){
if(stages>maxstage)maxstage=stages;
look->partbooks[j]=_ogg_calloc(stages,sizeof(*look->partbooks[j]));