public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: "Henryk Plötz" <henryk@ploetzli.ch>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Elimination of pow() in SBC code
Date: Sun, 28 Nov 2004 02:57:50 +0100	[thread overview]
Message-ID: <20041128025750.00e11da4.henryk@ploetzli.ch> (raw)
In-Reply-To: <1101599506.18467.6.camel@pegasus>

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

Moin,

Am Sun, 28 Nov 2004 00:51:46 +0100 schrieb Marcel Holtmann:

> the pow() function is the only reason for linking with -lm and it is
> only used in one place with a limit range of parameters.

Oh yes, that occurence of pow(2.0, x) is in older code I forgot about.
(And before -lm was necessary for cos(), too)

> So what is the range of scale_factor[ch][sb]. From a quick testing a
> saw that it ranges from 0 - 15. Is this always true? 

Yes, scale_factor is a 4 bit integer (Table 12.13 of A2DP) and there
should be no way of getting it bigger. If there was this would be a bug.

> If yes, then I would use a pre-calculated array for 2^x.

Isn't 1<<x good enough for that?

-- 
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:[~2004-11-28  1:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 23:51 [Bluez-devel] Elimination of pow() in SBC code Marcel Holtmann
2004-11-28  1:57 ` Henryk Plötz [this message]
2004-11-28 12:15   ` Marcel Holtmann
2004-11-28  2:38 ` Brad Midgley
2004-11-28 13:32   ` Marcel Holtmann
2004-11-28 15:57     ` 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=20041128025750.00e11da4.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