X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fres0.c;h=6d623d730fbdc673aa8b3f015c5f9525f7e9e971;hb=018ca26dece618457dd13585cad52941193c4a25;hp=bca6e47a1936f05f6b003b774e711ae105db8ccc;hpb=54712186c388cc72c1b2aa188f4a05bcdb84ba39;p=platform%2Fupstream%2Flibvorbis.git diff --git a/lib/res0.c b/lib/res0.c index bca6e47..6d623d7 100644 --- a/lib/res0.c +++ b/lib/res0.c @@ -11,7 +11,6 @@ ******************************************************************** function: residue backend 0, 1 and 2 implementation - last mod: $Id$ ********************************************************************/ @@ -152,15 +151,6 @@ void res0_free_look(vorbis_look_residue *i){ } } -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){ @@ -186,7 +176,7 @@ void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ bitmask of one indicates this partition class has bits to write this pass */ for(j=0;jpartitions;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); @@ -284,7 +274,7 @@ vorbis_look_residue *res0_look(vorbis_dsp_state *vd, look->partbooks=_ogg_calloc(look->parts,sizeof(*look->partbooks)); for(j=0;jparts;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]));