Re: [ecasound] lossless conversion broken?

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Sun Oct 31 2010 - 23:32:59 EET


On Sun, 31 Oct 2010, Dan Muresan wrote:

> Not to be too too pedantic -- but now that this question is out in the
> open, how does ecasound convert PCM to float? I'm surprised to see


This is unit-tested in libecasound/eca-sample-conversion_test.h:;a=blob;f=libecasound/eca-sample-conversion_test.h;h=fa0c52247290c4886dc98889afde9eaac0f8e70d;hb=HEAD

So this is basicly the "asymmetric" method in:

I'd actually like to change to the symmetric method, based on
discussion of this blog post on jackit-devel (2009 Dec):

So I'm leaning towards symmetric, but not sure when/how to do it properly
(cannot do this in a minor version update). Anyways, the thread(s) also
highlight that the impact is minimal in practise, and based on this I
haven't rushed the change.

So in your test case, sox might convert sine to 32767, while ecasound
would convert it to 32768. This could perhaps explain the one-bit flips
(aside float implementation issues).

You can use an alternative conversion already now by using
the libsndfile one in ecasound. E.g.:
ecasound -f:f32 -i sndfile,foo.wav -o sndfile,bar.wav

This will avoind ecasound's own int2float completely.

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
Ecasound-list mailing list
Received on Mon Nov 1 00:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Nov 01 2010 - 00:15:03 EET