Re: [ecasound] lossless conversion broken?

From: Philipp Überbacher <hollunder@email-addr-hidden>
Date: Sat Oct 30 2010 - 23:56:28 EEST

Excerpts from Dan Muresan's message of 2010-10-30 20:22:01 +0200:
> Hi Julien,
>
> >  No it shouldn't be reason for distortion, as float can be much more precise
> > than int. So only the other way round float -> int can introduce distortion
>
> Well, a 32-bit float stores a 23+1 bit mantissa and an 8-bit exponent,
> so the resolution is *at most* the same as for 24-bit PCM. In any
> case, if there's an internal int->float conversion, there must also be
> a float->int conversion when writing the output file.
>
> Theory aside, as my wav -> wav experiment showed there can be 1-bit
> round-off errors, and for a low-level signal those would count more
> than for a full-range signal. I like ecasound's versatility and
> power-features (double-buffering, realtime priority), but I prefer to
> "stay lossless" as far as I can down the processing chain.
>
> -- Dan

Hi Dan,
does your 23+1 refer to the 'hidden' bit in IEEE-754?
23+1 == 24 is true, but don't forget that with floats you also have the
exponent.
The biggest positive number you can store in an int on my system is
2147483647 while there's no issue with much higher numbers for float.
Just try it.
Yes, there can be floating point errors in some cases, with some
operations more likely than with others. I don't think they are
significant enough to affect audio quality.

It is something I'm interested in and I currently do stuff like manual
binary calculations using floats in order to understand these issues.
Maybe I can tell you more in a couple of days, but I don't think that
using floats is an issue.

I haven't looked at the error you observed yet, I simply think that
there usually are no issues.

Philipp

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ecasound-list mailing list
Ecasound-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Oct 31 00:15:04 2010

This archive was generated by hypermail 2.1.8 : Sun Oct 31 2010 - 00:15:04 EEST