DSPRelated.com
Forums

Ogg/Vorbis on a dsPic

Started by hamilton March 18, 2012
Tim Wescott <tim@seemywebsite.com> writes:

> On Wed, 21 Mar 2012 21:28:31 -0500, Randy Yates wrote: > >> Tim, if it wasn't obvious, my point is this: real men used fixed-point. >> :) >> >> --Randy > > That's how I feel, too. But many of my customers seem to feel that real > (business)men ship product before they're obsolete. So there is a place > for floating point computation.
If you have the computational horsepower available, I guess there's no disgrace in it. -- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Tim Wescott <tim@seemywebsite.com> wrote:
> On Wed, 21 Mar 2012 21:28:31 -0500, Randy Yates wrote:
>> Tim, if it wasn't obvious, my point is this: real men used fixed-point.
> That's how I feel, too. But many of my customers seem to feel that real > (business)men ship product before they're obsolete. So there is a place > for floating point computation.
I might have written this too many times now, but there are many things that are best done in fixed point. According to Knuth, related to his work on TeX, typesetting is one of them. I remember finding out that postscript can't do a 180 degree rotation correctly. Doing the rotation in floating point, it generates a matrix using its approximation of cos(pi) and sin(pi), but sin(approximate pi) isn't exactly zero. Or maybe it was the 90 degree rotation, but even so, such rotations shouldn't depend on how well you can represent pi in floating point. There used to be machines with 16 bit integers and 64 bit floating point, encouraging people to use floating point for larger integer values. Hopefully that has been fixed by now. For quantities with a natural relative uncertainty, floating point is a good choice. That is true for much of science and engineering. But quantities with an absolute uncertainty are best done in fixed point. -- glen
glen herrmannsfeldt <gah@ugcs.caltech.edu> writes:

> Tim Wescott <tim@seemywebsite.com> wrote: >> On Wed, 21 Mar 2012 21:28:31 -0500, Randy Yates wrote: > >>> Tim, if it wasn't obvious, my point is this: real men used fixed-point. > >> That's how I feel, too. But many of my customers seem to feel that real >> (business)men ship product before they're obsolete. So there is a place >> for floating point computation. > > I might have written this too many times now, but there are many > things that are best done in fixed point. According to Knuth, > related to his work on TeX, typesetting is one of them.
Convolution or correlation is another. Being able to accumulate the sum with little or no error and then quantize once (with rounding and possibly even noise-shaping) at the end is going to have less and better-controlled noise. I think r b-j has covered this here several times before. --Randy PS:
> [...] > natural relative uncertainty
> [...] > absolute uncertainty
?? Don't know these terms. Are they defined? -- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Randy Yates <yates@digitalsignallabs.com> wrote:

(snip, I wrote)
>> I might have written this too many times now, but there are many >> things that are best done in fixed point. According to Knuth, >> related to his work on TeX, typesetting is one of them.
(snip)
>> natural relative uncertainty >> [...] >> absolute uncertainty
> ?? Don't know these terms. Are they defined?
Absolute uncertainty does not depend on the size of the quantity being measured, relative uncertainty does. You can measure astronomical scale lengths and atomic scale lengths to about 8 digits, that is, the uncertainty is about the same fraction of the quantity being measured. That is relative uncertainty. For digital typography, the uncertainty in the position on the page depends on the device resolution, and not on the size of the character being printed. That is absolute (independent of the size) uncertainty. The eye is surprisingly sensitive to some positioning errors. The lattice constant for a Si crystal is 543.1020504pm, +/- 0.0000089pm, for a relative uncertainty of 1.6e-8. The aphelion distance for the earth's orbit is 152,098,232km. Though I don't see an uncertainty, as written it should be about 1 part in 1e8. The period for the earth around the sun is 365.256363004 days. Again, no uncertainty but as written about 1 part in 1e12. -- glen
On Thu, 22 Mar 2012 21:23:52 +0000, glen herrmannsfeldt wrote:

> Tim Wescott <tim@seemywebsite.com> wrote: >> On Wed, 21 Mar 2012 21:28:31 -0500, Randy Yates wrote: > >>> Tim, if it wasn't obvious, my point is this: real men used >>> fixed-point. > >> That's how I feel, too. But many of my customers seem to feel that >> real (business)men ship product before they're obsolete. So there is a >> place for floating point computation. > > I might have written this too many times now, but there are many things > that are best done in fixed point. According to Knuth, related to his > work on TeX, typesetting is one of them. > > I remember finding out that postscript can't do a 180 degree rotation > correctly. Doing the rotation in floating point, it generates a matrix > using its approximation of cos(pi) and sin(pi), but sin(approximate pi) > isn't exactly zero. Or maybe it was the 90 degree rotation, but even so, > such rotations shouldn't depend on how well you can represent pi in > floating point. > > There used to be machines with 16 bit integers and 64 bit floating > point, encouraging people to use floating point for larger integer > values. Hopefully that has been fixed by now. > > For quantities with a natural relative uncertainty, floating point is a > good choice. That is true for much of science and engineering. > > But quantities with an absolute uncertainty are best done in fixed > point.
I agree with you in the main. Except that it is a tendency for engineers to forget that actually shipping product is part of the whole optimization thing; having followed the whole Motorola vs. Intel thing since the late 70's, I feel like I've been educated in the value of having a klunky product early as opposed to an elegant product that gets released just a bit too late. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
On Fri, 23 Mar 2012 00:55:57 -0500, Tim Wescott
<tim@seemywebsite.please> wrote:

>On Thu, 22 Mar 2012 21:23:52 +0000, glen herrmannsfeldt wrote: > >> Tim Wescott <tim@seemywebsite.com> wrote: >>> On Wed, 21 Mar 2012 21:28:31 -0500, Randy Yates wrote: >> >>>> Tim, if it wasn't obvious, my point is this: real men used >>>> fixed-point. >> >>> That's how I feel, too. But many of my customers seem to feel that >>> real (business)men ship product before they're obsolete. So there is a >>> place for floating point computation. >> >> I might have written this too many times now, but there are many things >> that are best done in fixed point. According to Knuth, related to his >> work on TeX, typesetting is one of them. >> >> I remember finding out that postscript can't do a 180 degree rotation >> correctly. Doing the rotation in floating point, it generates a matrix >> using its approximation of cos(pi) and sin(pi), but sin(approximate pi) >> isn't exactly zero. Or maybe it was the 90 degree rotation, but even so, >> such rotations shouldn't depend on how well you can represent pi in >> floating point. >> >> There used to be machines with 16 bit integers and 64 bit floating >> point, encouraging people to use floating point for larger integer >> values. Hopefully that has been fixed by now. >> >> For quantities with a natural relative uncertainty, floating point is a >> good choice. That is true for much of science and engineering. >> >> But quantities with an absolute uncertainty are best done in fixed >> point. > >I agree with you in the main. > >Except that it is a tendency for engineers to forget that actually >shipping product is part of the whole optimization thing; having followed >the whole Motorola vs. Intel thing since the late 70's, I feel like I've >been educated in the value of having a klunky product early as opposed to >an elegant product that gets released just a bit too late.
For me that lesson wasn't so much about time to market, but being in the right place at the right time. Intel got the socket in the IBM PC, and that made an enormous difference. Some thing for Microsoft. Likewise the Amiga was, IMHO, anyway, pretty advanced in hardware and OS compared to competitors, but never got traction for a number of reasons. You often have to have more than just the best product to be successful, and you can often be successful with a sucky product (e.g., Microsoft). Eric Jacobsen Anchor Hill Communications www.anchorhill.com
hamilton wrote:

> Has anyone worked with Ogg/Vorbis on a dsPIC ?? > > Which model of dsPIC did you need to use to get reasonable stereo sound > out of it ?? > > That is, if its possible at all.
I would suggest that you ask this question on the Vorbis mailing list. http://lists.xiph.org/mailman/listinfo/vorbis Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/