|
Rockbox mail archiveSubject: Re: berzerk peak meter? Alpha testers wanted.Re: berzerk peak meter? Alpha testers wanted.
From: Paul Suade <paul.suade_at_laposte.net>
Date: Tue, 24 Sep 2002 13:04:09 +0200 One way to compute log10 : int fflog10 (unsigned short x) { return ((long long)fflog2(x) * 19728) >> 16; } basicaly : log10(x) = log2(x)*log10(2). i'm planning to generate SH1 assembly for fflog2 and fflog10 to examine its efficiency and if something can be better done. ----- Original Message ----- From: "Philipp Pertermann" <philipp.pertermann_at_web.de> To: <rockbox_at_cool.haxx.se> Sent: Tuesday, September 24, 2002 8:01 AM Subject: Re: berzerk peak meter? Alpha testers wanted. > From: "Nielsen Linus (ext)" > > > > 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! > > Don't worry: thats only for generating the table values. We > will calculate them offline and put them into an unsigned > short array of constants. > > Paul: Thank you very much. I'll try this. > > Phil > Received on 2002-09-24 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |