public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
To: Jaska Uimonen <jaska.uimonen@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [RFC/PATCH] sbc: new filtering function for 8 band fixed point encoding
Date: Fri, 12 Dec 2008 19:14:48 +0200	[thread overview]
Message-ID: <200812121914.48340.siarhei.siamashka@nokia.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0812021203290.6346@xena.cft.ca.us>

On Fri, 28 Nov 2008, Jaska Uimonen wrote:
> I did some testing on the current 8 band fixed point
> encoding and it seems to attenuate frequencies below 800Hz
> and above 18kHz. There might be some other stuff happening
> also, because at least to me the bass seemed to lack some
> "definition".
> I didn't quite understand how the current tables are calculated
> and how the filtering works so I wrote a new filtering function
> and calculated new filter tables for it. It is written
> using 16 bit fixed point without any platform specific optimizations.
> I only unrolled some loops etc. I tried to follow the
> flow chart in MPEG-1 annex c.

> +/*
> + * to produce this Q15 format table:
> + *
> + * Get the filter coeffs from the spec and multiply them by 2^15.
> + */
> +static const signed short _sbc_proto_fixed8[80] = {
> +       0, 5, 11, 18, 26, 37, 48, 58, 65, 68,
> +       65, 52, 29, -5, -54, -114, 185, 263, 342, 417,
> +       480, 521, 531, 501, 423, 290, 95, -161, -479, -855,
> +       -1280, -1742, 2228, 2719, 3197, 3643, 4039, 4366, 4612, 4764,
> +       4815, 4764, 4612, 4366, 4039, 3643, 3197, 2719, -2228, -1742,
> +       -1280, -855, -479, -161, 95, 290, 423, 501, 531, 521,
> +       480, 417, 342, 263, -185, -114, -54, -5, 29, 52,
> +       65, 68, 65, 58, 48, 37, 26, 18, 11, 5
> +};

Just remembered to check this. Precision and audio quality should be a bit
better if the original floating values are not truncated, but rounded when put
into tables.

For example, the fifth element is 26 in _sbc_proto_fixed8 table, but it was
26.998194372608 after multiplication and before conversion to integer.
Using 27 would have been a bit more correct here.

-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2008-12-12 17:14 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 [this message]
2008-12-12 19:19     ` Brad Midgley
2008-12-15 12:54       ` Siarhei Siamashka
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=200812121914.48340.siarhei.siamashka@nokia.com \
    --to=siarhei.siamashka@nokia.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