Return-Path: Message-ID: <43604483.7070109@xmission.com> From: Brad Midgley MIME-Version: 1.0 To: bluez-devel@lists.sourceforge.net Subject: Re: [Bluez-devel] fixed-point sbc decoder References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 26 Oct 2005 21:07:47 -0600 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<