Re: SBC loudness bug?

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

 



On Wednesday 22 December 2010 16:14:16 Christian Hoene wrote:
> Hello,
> 
> Mr. Hagen Hentschel was telling me that the BlueZ SBC implementation still
> has an bug.

Yes, unfortunately bluez sbc *decoder* is still as bad as it used to be. There
easily may be more than one bug in it.

I feel somewhat responsible for not bringing sbc decoder into a better shape
earlier. But at that time, only properly working and fast sbc *encoder* was
needed for A2DP bluetooth stereo headsets support in Nokia N900. Moreover, I
had run out of allocated time to this task (due to actually having to fix some
bluez sbc encoder bugs in addition to doing just performance optimizations) and
had to wrap up this activity even before all the planned ARM NEON optimizations
had been implemented.

Fortunately I had some spare time on the last summer vacation to spend on bluez
sbc codec. It was a tough choice deciding between either fixing the decoder or
adding missing ARM NEON optimizations to the encoder. But in the end I decided
to get at least one thing done right (the encoder), especially considering that
it happens to be referred from several places as an example of ARM NEON
optimizations. And I just did not feel right about having clearly incomplete
stuff there :) So the encoder got more optimizations [1][2], and the decoder
remained the way it was (it is still in my low priority TODO list).

> As compared to Bluetooth's reference implementation the signal
> is twotimes too silent. We told me, that in the last step of calculating
> the PCM samples a 1 bit right shift was done too much.
> 
> A correct implementation for C# can be found at
> http://sourceforge.net/projects/sbcsharp/
> 
> Sorry, due to time limits I cannot provide you with a patch...

Even without looking at the changes (after all, it's not so easy without a
patch), I guess it's more like a band aid. The whole decoder needs to be
seriously reworked. At least dropping the current synthesis filter
completely and reimplementing it straight according to A2DP spec is
necessary. We can't verify whether the current filter is correct, and also
its low precision is likely masking the other bugs and deviations from the
spec. I had some notes about it earlier in [3].

I have no idea when this all might be done unless somebody steps up for this
task (Hagen?). Or unless I myself somehow get an opportunity to work on fixing
sbc decoder full time for at least a week (next summer vacation?).


1. http://marc.info/?l=linux-bluetooth&m=127781938327437&w=2
2. http://marc.info/?l=linux-bluetooth&m=127807359119577&w=2
3. http://marc.info/?l=linux-bluetooth&m=126106163120842&w=2

-- 
Best regards,
Siarhei Siamashka

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux