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



Rockbox mail archive

Subject: RE: berzerk peak meter? Alpha testers wanted.

RE: berzerk peak meter? Alpha testers wanted.

From: Nielsen Linus (ext) <"Nielsen>
Date: Tue, 24 Sep 2002 07:12:13 +0200

> 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
Received on 2002-09-24

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy