Linux bluetooth development
 help / color / mirror / Atom feed
From: "Henryk Plötz" <henryk@ploetzli.ch>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] libsbc optimizing
Date: Sat, 21 May 2005 00:04:12 +0200	[thread overview]
Message-ID: <20050521000412.1499f11e.henryk@ploetzli.ch> (raw)
In-Reply-To: <428BD03E.9000307@xmission.com>

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

Moin,

Am Wed, 18 May 2005 17:31:10 -0600 schrieb Brad Midgley:

> Can I get help with the ranges for bits[ch][sb] in sbc_unpack_frame
> and  the state.* vectors if they're bounded?
> 
> How about this first little patch?

This doesn't particularly aid readability so I'd suggest to keep the old
code in a comment to explain what it should do. Apart from that it looks
fine and you're doing some clever things. So if it improves performance,
go ahead.

I thought about it: Do you have long integers on that platform or will
they be slow too? Basically there should be no number greater than 2^16
anywhere (I'll have to check that, though) and we only need add,
multiply and shift. 

A naive fixed point implementation would be to use a 32 bit integers and
shift the original value left 16 bits (multiplying by 2^16) leaving 16
bits before and 16 bits after the decimal point. Add and Shift will work
as usual, but for multiply additional 16 bits (e.g. an integer type with
at least 48 bits) are needed.

-- 
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-05-20 22:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 23:31 [Bluez-devel] libsbc optimizing Brad Midgley
2005-05-20 22:04 ` Henryk Plötz [this message]
2005-05-21  0:14   ` Brad Midgley
2005-05-21  0:28     ` Brad Midgley
2005-05-24 16:55       ` Brad Midgley
2005-05-24 17:10         ` Marcel Holtmann
2005-05-24 17:59           ` 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=20050521000412.1499f11e.henryk@ploetzli.ch \
    --to=henryk@ploetzli.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox