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. Thanks hamilton
Ogg/Vorbis on a dsPic
Started by ●March 18, 2012
Reply by ●March 21, 20122012-03-21
On Sun, 18 Mar 2012 14:02:59 -0600, 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.Well, we're being helpful. Have you Googled? Try Googling both on your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a fixed-point DSP, and perhaps even embedded Ogg/Vorbis. Depending on how modular the algorithms are, you may be able to just port existing code to work on an embedded "regular old" processor -- getting things fit to a specific DSP chip may well require some hand-written code, or depending on the algorithm you may find that a fast general- purpose processor is better than a purpose-built DSP. I'd tell you more, but that would require looking at the algorithm and code, and I'm not interested enough to do that unless I'm working under contract. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by ●March 21, 20122012-03-21
On 3/21/2012 12:25 PM, Tim Wescott wrote:> On Sun, 18 Mar 2012 14:02:59 -0600, 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. > > Well, we're being helpful. Have you Googled? Try Googling both on your > specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a fixed-point > DSP, and perhaps even embedded Ogg/Vorbis.I found one site that did get MP3s on a dsPIC, but none with Ogg. One site stated that doing Ogg is barely possible without floating point. Thanks for being "helpful". hamilton> > Depending on how modular the algorithms are, you may be able to just port > existing code to work on an embedded "regular old" processor -- getting > things fit to a specific DSP chip may well require some hand-written > code, or depending on the algorithm you may find that a fast general- > purpose processor is better than a purpose-built DSP. > > I'd tell you more, but that would require looking at the algorithm and > code, and I'm not interested enough to do that unless I'm working under > contract. >
Reply by ●March 21, 20122012-03-21
On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote:> On 3/21/2012 12:25 PM, Tim Wescott wrote: >> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >> >> Well, we're being helpful. Have you Googled? Try Googling both on >> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. > > I found one site that did get MP3s on a dsPIC, but none with Ogg. > > One site stated that doing Ogg is barely possible without floating > point. > > Thanks for being "helpful".Well, it's the best I could do. Some fixed-point DSP chips (the TMS320F2812 comes to mind because I have experience with it, but I'm sure there are others) do pretty well with floating point. While they don't have specific floating-point hardware, they do have native instructions that make floating-point algorithms pretty darned quick. So "fixed-point DSP" doesn't necessarily mean that the floating point isn't fast enough. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by ●March 21, 20122012-03-21
Tim Wescott <tim@seemywebsite.com> writes:> On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote: > >> On 3/21/2012 12:25 PM, Tim Wescott wrote: >>> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >>> >>> Well, we're being helpful. Have you Googled? Try Googling both on >>> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >>> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. >> >> I found one site that did get MP3s on a dsPIC, but none with Ogg. >> >> One site stated that doing Ogg is barely possible without floating >> point. >> >> Thanks for being "helpful". > > Well, it's the best I could do. > > Some fixed-point DSP chips (the TMS320F2812 comes to mind because I have > experience with it, but I'm sure there are others) do pretty well with > floating point. While they don't have specific floating-point hardware, > they do have native instructions that make floating-point algorithms > pretty darned quick.Which instruction(s) are you referring to, Tim? -- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Reply by ●March 21, 20122012-03-21
On Wed, 21 Mar 2012 14:51:35 -0500, Randy Yates wrote:> Tim Wescott <tim@seemywebsite.com> writes: > >> On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote: >> >>> On 3/21/2012 12:25 PM, Tim Wescott wrote: >>>> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >>>> >>>> Well, we're being helpful. Have you Googled? Try Googling both on >>>> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >>>> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. >>> >>> I found one site that did get MP3s on a dsPIC, but none with Ogg. >>> >>> One site stated that doing Ogg is barely possible without floating >>> point. >>> >>> Thanks for being "helpful". >> >> Well, it's the best I could do. >> >> Some fixed-point DSP chips (the TMS320F2812 comes to mind because I >> have experience with it, but I'm sure there are others) do pretty well >> with floating point. While they don't have specific floating-point >> hardware, they do have native instructions that make floating-point >> algorithms pretty darned quick. > > Which instruction(s) are you referring to, Tim?Mostly it's the one-cycle multiply and a signed normalize instruction that left-shifts a 32-bit register by the amount necessary to leave just one sign bit, and lets you know how much it is. Or it just determines the amount, and leaves you needing to do the (one clock) shift in the next cycle. At any rate, single-precision floating point is astonishingly fast on that chip, given that it doesn't have specific floating-point hardware. Of course, the tools that come with the chip leave out some of the exception handling of IEEE floating point, which also speeds things up considerably. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by ●March 21, 20122012-03-21
Tim Wescott <tim@seemywebsite.com> writes:> On Wed, 21 Mar 2012 14:51:35 -0500, Randy Yates wrote: > >> Tim Wescott <tim@seemywebsite.com> writes: >> >>> On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote: >>> >>>> On 3/21/2012 12:25 PM, Tim Wescott wrote: >>>>> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >>>>> >>>>> Well, we're being helpful. Have you Googled? Try Googling both on >>>>> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >>>>> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. >>>> >>>> I found one site that did get MP3s on a dsPIC, but none with Ogg. >>>> >>>> One site stated that doing Ogg is barely possible without floating >>>> point. >>>> >>>> Thanks for being "helpful". >>> >>> Well, it's the best I could do. >>> >>> Some fixed-point DSP chips (the TMS320F2812 comes to mind because I >>> have experience with it, but I'm sure there are others) do pretty well >>> with floating point. While they don't have specific floating-point >>> hardware, they do have native instructions that make floating-point >>> algorithms pretty darned quick. >> >> Which instruction(s) are you referring to, Tim? > > Mostly it's the one-cycle multiply and a signed normalize instruction > that left-shifts a 32-bit register by the amount necessary to leave just > one sign bit, and lets you know how much it is. Or it just determines > the amount, and leaves you needing to do the (one clock) shift in the > next cycle.I don't understand - how do any of these help with the exponent? That is, even after multiplying and normalizing the mantissa, you still need to deal with the exponent arithmetic. And then after you're done with the basic arithmetic for both the mantissa and exponent, you still need to pack those two pieces back together. It seems to me that anything close to a standard floating poinbt operation is going to take at least on the order of 6 or 8 cycles - that doesn't seem too darned quick to me, especially when I've been realizing two multiplies per cycle in some my recent C28 assembly (albeit using the special DMAC available with, e.g., the Concerto).> At any rate, single-precision floating point is astonishingly fast on > that chip, given that it doesn't have specific floating-point > hardware.I guess that depends on how easily you're astonished. -- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Reply by ●March 21, 20122012-03-21
Tim, if it wasn't obvious, my point is this: real men used fixed-point. :) --Randy Randy Yates <yates@digitalsignallabs.com> writes:> Tim Wescott <tim@seemywebsite.com> writes: > >> On Wed, 21 Mar 2012 14:51:35 -0500, Randy Yates wrote: >> >>> Tim Wescott <tim@seemywebsite.com> writes: >>> >>>> On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote: >>>> >>>>> On 3/21/2012 12:25 PM, Tim Wescott wrote: >>>>>> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >>>>>> >>>>>> Well, we're being helpful. Have you Googled? Try Googling both on >>>>>> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >>>>>> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. >>>>> >>>>> I found one site that did get MP3s on a dsPIC, but none with Ogg. >>>>> >>>>> One site stated that doing Ogg is barely possible without floating >>>>> point. >>>>> >>>>> Thanks for being "helpful". >>>> >>>> Well, it's the best I could do. >>>> >>>> Some fixed-point DSP chips (the TMS320F2812 comes to mind because I >>>> have experience with it, but I'm sure there are others) do pretty well >>>> with floating point. While they don't have specific floating-point >>>> hardware, they do have native instructions that make floating-point >>>> algorithms pretty darned quick. >>> >>> Which instruction(s) are you referring to, Tim? >> >> Mostly it's the one-cycle multiply and a signed normalize instruction >> that left-shifts a 32-bit register by the amount necessary to leave just >> one sign bit, and lets you know how much it is. Or it just determines >> the amount, and leaves you needing to do the (one clock) shift in the >> next cycle. > > I don't understand - how do any of these help with the exponent? That > is, even after multiplying and normalizing the mantissa, you still need > to deal with the exponent arithmetic. And then after you're done with > the basic arithmetic for both the mantissa and exponent, you still need > to pack those two pieces back together. > > It seems to me that anything close to a standard floating poinbt > operation is going to take at least on the order of 6 or 8 cycles - that > doesn't seem too darned quick to me, especially when I've been realizing > two multiplies per cycle in some my recent C28 assembly (albeit using > the special DMAC available with, e.g., the Concerto). > >> At any rate, single-precision floating point is astonishingly fast on >> that chip, given that it doesn't have specific floating-point >> hardware. > > I guess that depends on how easily you're astonished.-- Randy Yates DSP/Firmware Engineer 919-577-9882 (H) 919-720-2916 (C)
Reply by ●March 22, 20122012-03-22
On Wed, 21 Mar 2012 14:51:35 -0500, Randy Yates wrote:> Tim Wescott <tim@seemywebsite.com> writes: > >> On Wed, 21 Mar 2012 12:28:39 -0600, hamilton wrote: >> >>> On 3/21/2012 12:25 PM, Tim Wescott wrote: >>>> On Sun, 18 Mar 2012 14:02:59 -0600, 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. >>>> >>>> Well, we're being helpful. Have you Googled? Try Googling both on >>>> your specific "Ogg/Vorbis on dsPIC", but also on Ogg/Vorbis on a >>>> fixed-point DSP, and perhaps even embedded Ogg/Vorbis. >>> >>> I found one site that did get MP3s on a dsPIC, but none with Ogg. >>> >>> One site stated that doing Ogg is barely possible without floating >>> point. >>> >>> Thanks for being "helpful". >> >> Well, it's the best I could do. >> >> Some fixed-point DSP chips (the TMS320F2812 comes to mind because I >> have experience with it, but I'm sure there are others) do pretty well >> with floating point. While they don't have specific floating-point >> hardware, they do have native instructions that make floating-point >> algorithms pretty darned quick. > > Which instruction(s) are you referring to, Tim?Aside from the efficient multiply, they have a one-cycle normalize instruction that shifts left until there's no redundant sign bits, which speeds up floating point adds. I rather suspect that they play games with the floating-point library, to take out most of the exceptions that slow down IEEE floating point. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Reply by ●March 22, 20122012-03-22
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. > :) > > --RandyThat'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. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com






