[vorbis-dev] Fixed vs. Floating Point primer. was: Implementing Vorbis in hard ware

Borgerding, Mark A. MarkAB at xetron.com
Tue Jan 23 07:01:40 PST 2001



Let me chime in with a few facts regarding DSPs.  It may be review to anyone
who has programmed DSPs, but some may find it informative.

        Fixed-Point vs. Floating Point DSP chips

Floating Point DSPs make the best/easiest compiler targets.  Most of the
standard operations present in ANSI C translate fairly well into floating
point DSP assembly.  This reduces the need for assembly optimization.

Fixed point processors, as the name would suggest, cannot deal with
exponents directly.  They are a pain to program, because at every operation,
the programmer must keep dynamic range and overflow in mind. Something as
simple as adding two floats c=a+b becomes a difficult task.
        if ( b.exp > a.exp ) {
         c.mant = b.mant + ( a.mant >> ( b.exp - a.exp ));
           c.exp = b.exp;
        }else{
         c.mant = a.mant + ( b.mant >> ( a.exp - b.exp ));
           c.exp = a.exp;
        }
      /* overflow has not even been taken into account here, nor has
post-scaling */
        

So why would anyone use fixed point DSPs?  

        Cost) floating point hardware is more complicated than fixed point,
thus more expensive.

        Energy) more transistors at a given feature size and clock speed
require more watts

The fixed point chips often supply specialized instructions to aid in
floating point emulation.  For example, TI 54x and 55x include a
single-cycle instruction that gets the number of significant bits in an
accumulator.

I've programmed a couple of TI DSP chips. One float, and one fixed.  The
floating point was certainly easier to program, since I never delved into
assembly (but I didn't get stellar performance either).  Programming the
fixed point (TMS320C54x series) was a little more difficult, but pretty
rewarding.  The assembly routines were 10-20 times more efficient than their
C counter parts.

So I guess my point is this:  If we just want to say that Vorbis is
available for a DSP chip, then start with a floating point platform (I've
heard good things about ADI's Sharcs).  But if we want to make it most
attractive for portable player companies, then a fixed-point DSP algorithm
will probably be better received.

We should probably get vendor comments.  What chips do they use?  What do
they plan on using?  Are they willing to sponsor GPL development?  For
example, I might be willing to pledge some development time in exchange for
an eval board.

Berkely Design Technologies seems to be a good source for objective DSP
info.  Their official report is pretty costly, but the have summary material
at:
http://www.bdti.com/procsum/index.htm

(On a personal note, the TMS320C55x looks really sweet.)

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list