Hi!
Let me reply only partially,
On Mon, Oct 16, 2017 at 01:10:13AM +0200, Tim Janik wrote:
> Btw, the slow suites of resampler tests are still available to
> be run manually with:
>
> make tests-testresampler-check-perf # passes fine
>
> make tests-testresampler-check-all
>
>
> The later fails here, with:
>
> tests/testresampler accuracy --up --precision=24 --freq-scan=50,18000,50
> --max-threshold=126.5 # ideally: 144dB
> # accuracy test for factor 2 upsampling using SSE instructions
> # input frequency range used [ 50.00 Hz, 18000.00 Hz ] (SR = 44100.0 Hz,
> freq increment = 50.00)
> # max difference between correct and computed output: 0.000000 =
> -126.489977 dB
> # (threshold given by user: -126.500000 dB)
> tests/testresampler.cc:523: assertion failed: max_diff_db <
> options.max_threshold_db
>
> Not sure how bad this is, input is appreciated.
The threshold problem is not bad, I looked at the actual output. This can be
easily fixed by a minimal change to the threshold option. Fix is in my branch.
However we have a bigger problem, which I found while looking at the issue:
Both, the FPU and SSE variant of the resampler code need to be tested
(depending on the testresampler --fpu option). From looking at the source code
testresampler tries to enforce this by passing --bse-force-fpu bse_init_test()
if the FPU variant is to be tested. However, currently this doesn't have the
desired effect. So we always test SSE (and never test FPU), which is bad.
Option #1: make --bse-force-fpu do what it used to do.
Option #2: I looked at what bse/tests/blocktests.cc does. Apparently the FPU is
used if we init without Bse::cstrings_to_vector ("load-core-plugins=1", NULL)
I've committed a complete solution based on that on the resampler-test-fix
branch of my beast repo. If you want to go that way, I'd recommend removing
the bse-force-fpu option completely.
https://github.com/swesterfeld/beast/tree/resampler-test-fix
Cu... Stefan
--
Stefan Westerfeld, http://space.twc.de/~stefan
diff --git a/tests/testresampler.cc b/tests/testresampler.cc
index 991fa0d..96dc1f6 100644
--- a/tests/testresampler.cc
+++ b/tests/testresampler.cc
@@ -55,6 +55,7 @@ struct Options {
BseResampler2Precision precision;
bool filter_impl_verbose;
string program_name;
+ bool fpu;
Options() :
block_size (128),
@@ -66,7 +67,8 @@ struct Options {
max_threshold_db (0),
precision (BSE_RESAMPLER2_PREC_96DB),
filter_impl_verbose (false),
- program_name ("testresampler")
+ program_name ("testresampler"),
+ fpu (false)
{
}
void parse (int *argc_p, char **argv_p[]);
@@ -284,6 +286,8 @@ Options::parse (int *argc_p,
resample_type = RES_SUBSAMPLE;
else if (check_arg (argc, argv, &i, "--oversample"))
resample_type = RES_OVERSAMPLE;
+ else if (check_arg (argc, argv, &i, "--fpu"))
+ fpu = true;
}
/* resort argc/argv */
@@ -641,16 +645,13 @@ perform_test()
int
main (int argc, char **argv)
{
- /* preprocess args: allow using --fpu instead of --bse-force-fpu,
- * because its a really common use case for the resampler test
- */
- for (int i = 0; i < argc; i++)
- if (strcmp (argv[i], "--fpu") == 0)
- argv[i] = g_strdup ("--bse-force-fpu"); /* leak, but we don't care */
+ options.parse (&argc, &argv); // parse test options first, to setup options.fpu
/* load plugins */
- bse_init_test (&argc, argv, Bse::cstrings_to_vector ("load-core-plugins=1", NULL));
- options.parse (&argc, &argv);
+ if (options.fpu)
+ bse_init_test (&argc, argv);
+ else
+ bse_init_test (&argc, argv, Bse::cstrings_to_vector ("load-core-plugins=1", NULL)); /* load sse impl */
if (argc == 2)
{
_______________________________________________
beast mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/beast