All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Midgley <bmidgley@xmission.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] fixed-point sbc decoder
Date: Wed, 26 Oct 2005 21:07:47 -0600	[thread overview]
Message-ID: <43604483.7070109@xmission.com> (raw)
In-Reply-To: <C70061B183DE09419568AB2060C52A950104B2D3@arion.intra.local>

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

  reply	other threads:[~2005-10-27  3:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25  7:28 [Bluez-devel] fixed-point sbc decoder Victor Shcherbatyuk
2005-10-27  3:07 ` Brad Midgley [this message]
2005-10-27  5:33   ` Brad Midgley
  -- strict thread matches above, loose matches on Subject: below --
2005-10-24 22:29 Brad Midgley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43604483.7070109@xmission.com \
    --to=bmidgley@xmission.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.