|
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 12:06:12 +0200 I didn't bother to precalculate them because I was tested on a PC with different formulas : it is much easier to do so. But I thought of a precalculated table for the firmware (only 16 short integers and supposedly we really need log2 of course), so there is no problem at all, because you can easily get rid of double calculus. Example : z,y and x are short integers. if you want to do : z = y * log2(x); (log2 returning a double result) Well you just need to do : z = (y * fflog2(x)) >> 16; (it is very important to multiply first before shifting right for the precision) Don't forget you need to shift bits right 16 times because the integer part of result of fflog2(x) is in the higher 16-bit word everytime you want to get rid of the fractional part of a 16.16 bits result and stored it in a short integer. ----- Original Message ----- From: "Nielsen Linus (ext)" <Linus.Nielsen_at_elema.siemens.se> To: <rockbox_at_cool.haxx.se> Sent: Tuesday, September 24, 2002 8:12 AM Subject: RE: berzerk peak meter? Alpha testers wanted. > > > 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. > > Maybe I misunderstood you, but I hope you realize that we don't have FP > support at all in rockbox. So calculating the tables will not be possible in > the firmware. We'll have to precalculate them. > > /Linus Received on 2002-09-24 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |