From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
To: "ext Brad Midgley" <bmidgley@gmail.com>
Cc: "Jaska Uimonen" <jaska.uimonen@nokia.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [RFC/PATCH] sbc: new filtering function for 8 band fixed point encoding
Date: Mon, 15 Dec 2008 14:54:19 +0200 [thread overview]
Message-ID: <200812151454.19090.siarhei.siamashka@nokia.com> (raw)
In-Reply-To: <d89ddf300812121119o601fe1acs229741960a98835c@mail.gmail.com>
On Friday 12 December 2008 21:19:20 ext Brad Midgley wrote:
> Guys
>
> One mistake we made was not keeping track of what functions we were
> applying to the published tables as we worked things to look less and
> less like the pseudocode in the spec. So if you start again from one
> of the tables in the spec, keep a comment like
>
> /* ourtable(x) = (int32)(table1(x) << 16) */
This part can be probably done just by having a macro, something like
#define F_TO_Q15(x) (int16_t)((x>0) ? ((x)*(1<<15)+0.5) : ((x)*(1<<15)-0.5))
And then using plain floating point numbers from the SBC specification in the
table, wrapped into this macro. Though I wonder if it is possible to use such
conditional expression in the static table initializer list with all versions
of gcc/other compilers.
> Which in this case would mean that in ourtable we've shifted the
> original table1 float value left 16 bits and truncated it to an int32.
>
> I also combined tables or split tables to simplify our loop logic or
> eliminate operations; an explanation in a comment would have been
> appropriate.
Yes, any transformations or simplifications should be extensively commented.
So that it will be always possible to reproduce them or verify their
correctness.
Can anybody try to remember/explain what transformations were applied to
the existing fixed point implementation?
--
Best regards,
Siarhei Siamashka
next prev parent reply other threads:[~2008-12-15 12:54 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 13:35 [RFC/PATCH] sbc: new filtering function for 8 band fixed point encoding Jaska Uimonen
2008-11-28 14:18 ` Marcel Holtmann
2008-11-28 14:24 ` Jelle de Jong
2008-11-28 15:20 ` Jaska Uimonen
2008-11-28 18:13 ` David Sainty
2008-11-28 15:14 ` Jaska Uimonen
2008-12-02 20:15 ` Jim Carter
2008-12-12 17:14 ` Siarhei Siamashka
2008-12-12 19:19 ` Brad Midgley
2008-12-15 12:54 ` Siarhei Siamashka [this message]
2008-12-15 15:16 ` Brad Midgley
2008-12-16 22:37 ` Siarhei Siamashka
2008-12-17 8:16 ` Jaska Uimonen
2008-12-19 22:12 ` Siarhei Siamashka
2008-12-22 23:30 ` Siarhei Siamashka
2008-12-23 1:00 ` Marcel Holtmann
2008-12-23 8:20 ` Jaska.Uimonen
2008-12-23 11:14 ` Siarhei Siamashka
2008-12-23 10:45 ` Siarhei Siamashka
2008-12-23 11:48 ` Marcel Holtmann
2008-12-29 9:16 ` Testing SBC filtering functions Christian Hoene
2008-12-29 10:00 ` Marcel Holtmann
2008-12-29 10:55 ` Christian Hoene
2008-12-29 12:03 ` Marcel Holtmann
2008-12-29 12:31 ` Christian Hoene
2008-12-29 12:41 ` Marcel Holtmann
2008-12-29 13:11 ` Christian Hoene
2008-12-29 13:17 ` Marcel Holtmann
2009-01-01 14:29 ` Testing SBC encoder correctness with sbctester works Christian Hoene
2008-12-29 11:06 ` Testing SBC filtering functions Siarhei Siamashka
2008-12-29 12:04 ` Marcel Holtmann
2008-12-29 14:36 ` Siarhei Siamashka
2008-12-29 15:04 ` Siarhei Siamashka
2008-12-29 10:46 ` [RFC/PATCH] sbc: new filtering function for 8 band fixed point encoding Siarhei Siamashka
2008-12-29 11:56 ` Marcel Holtmann
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=200812151454.19090.siarhei.siamashka@nokia.com \
--to=siarhei.siamashka@nokia.com \
--cc=bmidgley@gmail.com \
--cc=jaska.uimonen@nokia.com \
--cc=linux-bluetooth@vger.kernel.org \
/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