Rockbox mail archiveSubject: Log base 2
Log base 2
From: Jeff Waltzer <jeffwaltzer_at_yahoo.com>
Date: Thu, 19 Sep 2002 11:17:58 -0700 (PDT)
One could do a primitive approximation of a Log base 2 function by
rotating the bits to find the left most location set bit. This would be
good if all you need is a number from 0 to 15.
--- Jack Peel <jhp_at_cypress.com> wrote:
> Philipp Pertermann wrote:
> > From: "Jack Peel" <jhp_at_cypress.com>
> > > > > Also could you put "clip" "lights" on it so that if
> > the MP3 goes
> > > > > to full scale it shows a different symbol and it hangs
> > out longer
> > > > > so that we know if the MP3 itself is clipping ?
> > > >
> > > > Yes, I could.
> > Now I fiddled a bit with that. I don't like it much because
> > it is incredibly unreliable. The 'quasi peak detector' of
> > the mas is very 'quasi' but not so much a 'peak detector'.
> > If we don't read the peak value exactly when it happens we
> > miss it. I now installed a polling thread that reads out the
> > mas quite often but still many peaks remain undetected. So
> > the whole peak meter is a toy and not a reliable measuring
> > tool.
> > Phil
> Well, in theory the human ear cannot hear a clip if it is only a few
> samples long, so we would only be interested in seeing a "clip" if
> it were several samples long. But after thinking about it, seeing the
> peak level indicators at full scale will tell you enough. And the user
> can set how long they stick around already. It would be nice however
> to do the "set until reset" function on the peak meters :) The only
> problem is how do we easily reset them without having to go through
> 3 levels of menus :) I guess you could just add it to one of the F2 or
> key functions from the wps screen.
> Any luck with the linear to log conversion ?
> I was thinking about the lookup table issue, and you could probably drop
> a couple of bits off of the number to reduce the size of the table and
> would probably never be able to tell. Since it is a 15 bit number you
> probably drop 5 bits and I would never be able to tell, maybe even 7
> Another Idea is that we only really care about the accuracy when we are
> close to the top so you might be able to "shape" the table to have
> more accuracy at the top. The Idea is that -1 dB and -2 dB are VERY
> difference, however -41 dB and -42 dB are not. It may however be
> too much coding trouble to handle the shaped table.
> Just some Ideas :)
Whoever fights monsters should see to it that in the process he doesn't become a monster.
--Frederick Wilhelm Nietsche
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
Received on 2002-09-19