linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: "Frédéric Dalleau" <frederic.dalleau@linux.intel.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v5 00/16] mSBC tests
Date: Mon, 17 Dec 2012 02:33:24 +0200	[thread overview]
Message-ID: <20121217023324.4b1a294b@i7> (raw)
In-Reply-To: <1355497417-10357-1-git-send-email-frederic.dalleau@linux.intel.com>

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

On Fri, 14 Dec 2012 16:03:21 +0100
Frédéric Dalleau  <frederic.dalleau@linux.intel.com> wrote:

> Hi,
> 
> v5 shoudl fix the few remaining issues.  I could test neon and armv6
> and raised verbosity of commit messages.

Thanks for the update. The verbose commit messages make a really big
difference.

> However, before releasing a new version of the library, I believe we should
> write some sort of automated testing and test against another implementation.
> Siarhei shared a script some time ago, it could be a good start.
> But where could we store some decent audio materials? Should we use generators
> like sine wave, or just record ambient sound??

It is a good idea to make use of autotools test framework (a simple
one, not dejagnu based):
    http://www.gnu.org/software/automake/manual/html_node/Tests.html

The tests could generate some deterministic pseudorandom data and
encode it with the sbc encoder.

Testing for potential overflows and the other bugs in the code is quite
effective with the plain uniformly distributed random data. The
checksums (CRC32 or some cryptographic hashes) can be calculated for
the encoded data and compared with the reference values. This test
ensures that the code works exactly as it used to work before (no
regressions, no improvements).

Additionally some sine waves (or more complex signals consisting
of multiple pseudorandom sine waves) can be used for one more test,
which could check the errors accumulated for the encoding/decoding
roundtrip.

And finally, an integrated benchmark would be also useful in this
sbc test framework. Compressing/decompressing white noise may not
provide relevant results, but maybe some sine waves can be selected
which represent more "realistic" audio data. Or one can be compared
to each other, and if there are no significant differences in
performance for different data, then it's easier for us.

An example of an autotools based test framework employing pseudorandom
data generation and checksums verification can be found in the pixman
library:
    http://cgit.freedesktop.org/pixman
Coincidentally, I looked into pseudorandom number generators recently
and found this one to be quite good:
    http://burtleburtle.net/bob/rand/smallprng.html

As for comparing with the reference sbc encoder/decoder (win32
binary), I used to have one more script. It is attached.

-- 
Best regards,
Siarhei Siamashka

[-- Attachment #2: sbc_encode_test.rb --]
[-- Type: application/x-ruby, Size: 3067 bytes --]

      parent reply	other threads:[~2012-12-17  0:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 15:03 [PATCH v5 00/16] mSBC tests Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 01/16] sbc: Add encoder_state to analysis functions Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 02/16] sbc: Break 4 blocks processing to variable steps Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 03/16] sbc: Rename sbc_analyze_4b_xx to sbc_analyze_xx Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 04/16] sbc: add odd member variable to sbc_encoder_state Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 05/16] sbc: Add mmx primitive for 1b 8s analysis Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 06/16] sbc: Add armv6 " Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 07/16] sbc: Add iwmmxt primitive for 1b 8s encoding Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 08/16] sbc: Add plain C primitive for 1b 8s analysis Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 09/16] sbc: Use plain C primitive if doing msbc on neon Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 10/16] sbc: Fix input reordering for 15 blocks case Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 11/16] sbc: Add SBC_MSBC flag to enable 15 block encoding Frédéric Dalleau
2012-12-19 17:41   ` Marcel Holtmann
2012-12-14 15:03 ` [PATCH v5 12/16] sbc: Add support for mSBC frame header Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 13/16] sbc: Update sbcdec for msbc Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 14/16] sbc: Update sbcenc " Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 15/16] sbc: Update sbcinfo " Frédéric Dalleau
2012-12-14 15:03 ` [PATCH v5 16/16] sbc: Update copyrights Frédéric Dalleau
2012-12-17  0:33 ` Siarhei Siamashka [this message]

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=20121217023324.4b1a294b@i7 \
    --to=siarhei.siamashka@gmail.com \
    --cc=frederic.dalleau@linux.intel.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;
as well as URLs for NNTP newsgroup(s).