Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RE: berzerk peak meter? Alpha testers wanted.
From: Nielsen Linus (ext) (Linus.Nielsen_at_elema.siemens.se)
Date: 2002-09-24


> Okay this code was tested under mingwin et Dev-C++ and it works : it
> computes log2(x) where x is a 16-bit integer and result is a 16.16
> fixedpoint integer.
>
> I will try a log(x) another time.
>
> void generate_log2_table (void)
> {
> int i;
> for(i=0;i<16;i++)
> log2_table[i]=(unsigned
> short)(65536.0*log(1.0+(((double)i)/16.0))/log(2.0));
> }

Floating point? No no no!!! Not in this firmware!

/Linus



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa