* [Bluez-devel] fixed-point sbc decoder
@ 2005-10-24 22:29 Brad Midgley
0 siblings, 0 replies; 4+ messages in thread
From: Brad Midgley @ 2005-10-24 22:29 UTC (permalink / raw)
To: bluez-devel
Victor,
I was working on the fixed point decoder. I also found and reorganized
the inner loop around another optimization... the code I've written
works when using floating point but something is not right in the fixed
point. Can you have a quick look?
What I do is
btsco$ make && ./sbc/sbcdec t1.sbc
I suspect I'm not be doing the 64 to 32 bit conversions right...
http://bluetooth-alsa.sf.net/fixed/fixed-decode.patch
http://bluetooth-alsa.sf.net/fixed/t1.sbc
The latter is just an audio file, but as a bonus it's a friend's band
(and probably too noisy to be a good test :)
Brad
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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] fixed-point sbc decoder
@ 2005-10-25 7:28 Victor Shcherbatyuk
2005-10-27 3:07 ` Brad Midgley
0 siblings, 1 reply; 4+ messages in thread
From: Victor Shcherbatyuk @ 2005-10-25 7:28 UTC (permalink / raw)
To: bluez-devel
Brad,
I'll take a look in coming days.
Victor.
=20
-----Original Message-----
From: bluez-devel-admin@lists.sourceforge.net
[mailto:bluez-devel-admin@lists.sourceforge.net] On Behalf Of Brad
Midgley
Sent: Tuesday, October 25, 2005 0:30 AM
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] fixed-point sbc decoder
Victor,
I was working on the fixed point decoder. I also found and reorganized
the inner loop around another optimization... the code I've written
works when using floating point but something is not right in the fixed
point. Can you have a quick look?
What I do is
btsco$ make && ./sbc/sbcdec t1.sbc
I suspect I'm not be doing the 64 to 32 bit conversions right...
http://bluetooth-alsa.sf.net/fixed/fixed-decode.patch
http://bluetooth-alsa.sf.net/fixed/t1.sbc
The latter is just an audio file, but as a bonus it's a friend's band
(and probably too noisy to be a good test :)
Brad
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course Free
Certification Exam for All Training Attendees Through End of 2005 Visit
http://www.jboss.com/services/certification for more information
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
This e-mail message contains information which is confidential and may be=
privileged. It is intended for use by the addressee only. If you are not=
the intended addressee, we request that you notify the sender immediatel=
y and delete or destroy this e-mail message and any attachment(s), withou=
t copying, saving, forwarding, disclosing or using its contents in any ot=
her way. TomTom N.V., TomTom International BV or any other company belong=
ing to the TomTom group of companies will not be liable for damage relati=
ng to the communication by e-mail of data, documents or any other informa=
tion.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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] fixed-point sbc decoder
2005-10-25 7:28 Victor Shcherbatyuk
@ 2005-10-27 3:07 ` Brad Midgley
2005-10-27 5:33 ` Brad Midgley
0 siblings, 1 reply; 4+ messages in thread
From: Brad Midgley @ 2005-10-27 3:07 UTC (permalink / raw)
To: bluez-devel
Victor,
> I'll take a look in coming days.
thanks... for now I'm running floating and fixed point side-by-side and
watching for sign errors to find overflow. I was putting too many
precision bits in the fixed point synmatrix and it was overflowing and
coming out with the wrong sign in the product...
hey I noticed something that doesn't look right:
#define SP8(val) (val >> SCALE_PROTO8_TBL)
this is used in the tables for the 32-bit encoder. but this is not right
for negative values. Their sign will flip because it's a logical (not
arithmetic) shift. it's safer to do something like:
#define SP8(val) (val/(1<<SCALE_PROTO8_TBL))
don't you think? the divide will be done at compile time and it will
preserve the sign bit.
Brad
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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] fixed-point sbc decoder
2005-10-27 3:07 ` Brad Midgley
@ 2005-10-27 5:33 ` Brad Midgley
0 siblings, 0 replies; 4+ messages in thread
From: Brad Midgley @ 2005-10-27 5:33 UTC (permalink / raw)
To: bluez-devel
Victor,
>>I'll take a look in coming days.
fwiw, I committed fixed point decoding such as it is to cvs after
finding and eliminating some overflow problems. it's noisy but at least
functional. so you can just check it out of cvs (I didn't want to commit
what I had before that was nonfunctional but at least this is borderline)
> #define SP8(val) (val/(1<<SCALE_PROTO8_TBL))
actually, I found this needs to look like
#define SP8(val) (((int32_t)val)/(1<<SCALE_PROTO8_TBL))
I guess because all the literals in the array init look like they're
unsigned. This kind of fix may need to be applied in a few other places.
I am very proud of the latest optimization. I eliminated the shift/copy
of the main array by reordering it. The result is going to benefit from
unrolling since I was also able to make the array access into sbc_proto
always the same in every pass.
brad
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
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:[~2005-10-27 5:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-24 22:29 [Bluez-devel] fixed-point sbc decoder Brad Midgley
-- strict thread matches above, loose matches on Subject: below --
2005-10-25 7:28 Victor Shcherbatyuk
2005-10-27 3:07 ` Brad Midgley
2005-10-27 5:33 ` 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).