Re: Unmolested audio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Faber wrote:
> On Thursday 12 June 2008 20:10:04 Chris Smith wrote:
> > On Thursday 12 June 2008, Florian Faber wrote:
> > > What makes you think converting a 16 bit unsigned integer to a IEEE
> > > 32 bit float and back would change the value?
> > Should have used a 24 bit example. I'm of the opinion that with it
> > the process is not always a bit perfect translation. But I'm open to
> > correction.
> 
> On IEEE 32 bit floats the mantissa is 23 bit, so there might be 
> situations where you loose the LSB.

If the conversion is done properly, 24-bit integers should be
preserved exactly in IEEE 32-bit floats.

The mantissa is 23 bits plus sign bit and exponent.  The sign bit
allows it to cover the full range of 24 bit values, except for the
single unnegatable integer value -0x800000.  But the exponent allows
that to be stored exactly too.

That's if the 24 bit integer is signed.  If it's unsigned, then you
would lose the LSB for values larger than +0x800000.  So samples
should always be treated as _signed_ for floating point conversion.
Since it makes no sense to use floating point unsigned audio, that's fine.

-- Jamie

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux