public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] SBC: Some remarks and a question
@ 2006-09-15 12:00 Hohl, Fritz
  2006-09-15 12:13 ` Peter Wippich
  2006-09-15 14:46 ` Brad Midgley
  0 siblings, 2 replies; 4+ messages in thread
From: Hohl, Fritz @ 2006-09-15 12:00 UTC (permalink / raw)
  To: Bluez-devel

Hello,

I (try to) use the SBC package inside btsco 0.42 and want to 
give some feedback on things I noticed:

SBC in general
--------------

Compared to the Philips reference en/decoder, the 
decoded sound using the floating-point version 
is much more quiet. 

The USE_FIXED version is even more quiet (a (signal-disturbing) 
"<<= 2" operation seems to bring the signal to about the original 
level, so it is really quiet).

How much MIPS does the implementation needs?
I read that once some Philips guy told something
about 5 MIPS, but it was not clear what types of 
MIPS he meant nor to which version this applied.
Compared to MP3 encoding and decoding, what are your
experiences?


sbcenc.c
--------

bug?: Files of a size <= the buffer size (i.e. 2048) 
      are not processed.

bug?: not all option shortcuts (-* forms instead of --*) can
      be used (also holds true in sbcdec.c).

feature: I wrote (imperfect) sbcenc and sbcdec versions that consume and
         produce canonical .wav files, respectively.
         Is somebody interested?
         

----addendum 1-----------------------------------------

Proposal to add at least some lines 
to the important functions:

int sbc_encode(sbc_t *sbc, void *data, int count)
----------------------------------------------
Encodes PCM samples into one frame of SBC-encoded data. The PCM samples
starts at data and are of length count. The encoded data 
is of length sbc->len is then stored in sbc->data.

Returns the length of the encoded PCM data

Please note that for encoding an entire stream, you might 
have to use sbc_encode multiple times as it encodes only 
into 1 frame per call. 


int sbc_decode(sbc_t *sbc, void *data, int count)
----------------------------------------------
Decodes one frame of SBC-encoded data. The SBC-encoded data
starts at data and is of length count. The decoded data 
of length sbc->len is then stored in sbc->data.

Returns the length of the frame that was decoded.

Please note that for decoding an entire stream, you might 
have to use sbc_decode multiple times as it decodes only 
1 frame per call. 


Regards,
  Fritz

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [Bluez-devel] SBC: Some remarks and a question
@ 2006-09-15 15:15 Hohl, Fritz
  0 siblings, 0 replies; 4+ messages in thread
From: Hohl, Fritz @ 2006-09-15 15:15 UTC (permalink / raw)
  To: BlueZ development

Hello,
 
> > The USE_FIXED version is even more quiet (a (signal-disturbing) "<<=

> > 2" operation seems to bring the signal to about the original level,
so 
> > it is really quiet).
> there are some ops like this that are to avoid fixed point overflows.
> when the encoder overflows, it generates an annoying "pop" 
> noise in the stream.

Certainly. I just want to point out that the encoded-decoded sound
differs in loudness from the original by a multiplication factor of 4
(on the PCM signal). That is quite an amount...

> > How much MIPS does the implementation needs?
> > I read that once some Philips guy told something about 5 MIPS, but
it 
> > was not clear what types of MIPS he meant nor to which version this
applied.
> > Compared to MP3 encoding and decoding, what are your experiences?
> I haven't measured it and I've only tried it on a pxa255 at 
> 400mhz but I think someone had success with an arm 7...

I tried it with a 80Mhz MicroBlaze, and it seem to work in real-time (at
least 
either encoding or decoding), but still, the implementatio seems to me
to use much more 
compute power than 1/10 of the MP3 encoding or 1/5 of the MP3 decoding
needs.

> > ----addendum 1-----------------------------------------
> > Proposal to add at least some lines
> > to the important functions:
> which problems are these proposals addressing?

The problem of not having any documentation for the ones that 
want to use the codec on the sbc_encode and sbc_decode level?

One of my several problems to understand the software was e.g. 
to know that the PCM data for encoding and the decoded PCM
data is Little Endian.

Regards,
  Fritz

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-09-15 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-15 12:00 [Bluez-devel] SBC: Some remarks and a question Hohl, Fritz
2006-09-15 12:13 ` Peter Wippich
2006-09-15 14:46 ` Brad Midgley
  -- strict thread matches above, loose matches on Subject: below --
2006-09-15 15:15 Hohl, Fritz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox