linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] sbc synthesis inconsistencies
@ 2005-09-04  5:07 Brad Midgley
  2005-09-05  9:24 ` Peter Wippich
  0 siblings, 1 reply; 3+ messages in thread
From: Brad Midgley @ 2005-09-04  5:07 UTC (permalink / raw)
  To: BlueZ Mailing List

Guys,

Have any of you looked closely at this? It comes straight from the spec 
for a2dp on page 66:


	/* Build a 80 values vector U */
	for (i = 0; i <= 4; i++) {
		for (j = 0; j < 8; j++) {
			state->U[ch][i * 16 + j] = state->V[ch][i * 32 + j];
			state->U[ch][i * 16 + j + 8] = state->V[ch][i * 32 + j + 24];
		}
	}

But isn't this code only populating u[ch][0..63] and not through 79 like 
the comment suggests? So the u[ch][64..79] terms are always 0 right?

This isn't the only thing that looks wrong in the spec. We also have a 
sliding window of v[] values that moves 16 values in each pass. The 
vector is 160 elements long even though the code above never accesses 
anything beyond the 128th value!

It's amazing this stuff even works as poorly specified as it is :(

BTW, in our code it looks like sbc_synthesize_eight was multiplying 
sbc_proto_8_80 by -4 where it should be -8. I changed that in cvs.

Brad


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] sbc synthesis inconsistencies
  2005-09-04  5:07 [Bluez-devel] sbc synthesis inconsistencies Brad Midgley
@ 2005-09-05  9:24 ` Peter Wippich
  2005-09-05 13:42   ` Brad Midgley
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Wippich @ 2005-09-05  9:24 UTC (permalink / raw)
  To: BlueZ Mailing List


Hi,

outer loop goes from i=0 up to i=4 -> 5 times * 8 * 2 = 80

Ciao,

Peter

On Sat, 3 Sep 2005, Brad Midgley wrote:

> Guys,
>
> Have any of you looked closely at this? It comes straight from the spec
> for a2dp on page 66:
>
>
> 	/* Build a 80 values vector U */
> 	for (i = 0; i <= 4; i++) {
> 		for (j = 0; j < 8; j++) {
> 			state->U[ch][i * 16 + j] = state->V[ch][i * 32 + j];
> 			state->U[ch][i * 16 + j + 8] = state->V[ch][i * 32 + j + 24];
> 		}
> 	}
>
> But isn't this code only populating u[ch][0..63] and not through 79 like
> the comment suggests? So the u[ch][64..79] terms are always 0 right?
>
> This isn't the only thing that looks wrong in the spec. We also have a
> sliding window of v[] values that moves 16 values in each pass. The
> vector is 160 elements long even though the code above never accesses
> anything beyond the 128th value!
>
> It's amazing this stuff even works as poorly specified as it is :(
>
> BTW, in our code it looks like sbc_synthesize_eight was multiplying
> sbc_proto_8_80 by -4 where it should be -8. I changed that in cvs.
>
> Brad
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Bluez-devel mailing list
> Bluez-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

|	Peter Wippich 			Voice: +49 30 46776411		|
|	G&W Instruments GmbH		fax:   +49 30 46776419		|
|	Gustav-Meyer-Allee 25, Geb. 12	Email: pewi@gw-instruments.de	|
|	D-13355 Berlin  / Germany					|




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] sbc synthesis inconsistencies
  2005-09-05  9:24 ` Peter Wippich
@ 2005-09-05 13:42   ` Brad Midgley
  0 siblings, 0 replies; 3+ messages in thread
From: Brad Midgley @ 2005-09-05 13:42 UTC (permalink / raw)
  To: bluez-devel

Peter

> outer loop goes from i=0 up to i=4 -> 5 times * 8 * 2 = 80

Yes, thanks... I missed the <= (working too late).

I also remembered that Henryk was always testing the decoder against sbc 
files on the filesystem which simplifies testing. I'm going to have 
another whack at the simplification step and then try unrolling things.

Brad


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2005-09-05 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-04  5:07 [Bluez-devel] sbc synthesis inconsistencies Brad Midgley
2005-09-05  9:24 ` Peter Wippich
2005-09-05 13:42   ` Brad Midgley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).