r3912 - trunk/bse
- From: stw svn gnome org
- To: svn-commits-list gnome org
- Subject: r3912 - trunk/bse
- Date: Wed, 27 Sep 2006 16:01:20 -0400 (EDT)
Author: stw
Date: 2006-09-27 16:01:16 -0400 (Wed, 27 Sep 2006)
New Revision: 3912
Modified:
trunk/bse/ChangeLog
trunk/bse/bseblockutils.cc
trunk/bse/bseblockutils.hh
trunk/bse/bseresamplerimpl.hh
Log:
Wed Sep 27 21:35:12 2006 Stefan Westerfeld <stefan space twc de>
* bseblockutils.cc:
* bseblockutils.hh:
* bseresamplerimpl.hh: Only optionally produce output during the
filter implementation test.
Modified: trunk/bse/ChangeLog
===================================================================
--- trunk/bse/ChangeLog 2006-09-27 18:03:56 UTC (rev 3911)
+++ trunk/bse/ChangeLog 2006-09-27 20:01:16 UTC (rev 3912)
@@ -1,3 +1,10 @@
+Wed Sep 27 21:35:12 2006 Stefan Westerfeld <stefan space twc de>
+
+ * bseblockutils.cc:
+ * bseblockutils.hh:
+ * bseresamplerimpl.hh: Only optionally produce output during the
+ filter implementation test.
+
Wed Sep 27 13:04:49 2006 Stefan Westerfeld <stefan space twc de>
* bsedatahandle-resample.cc: Fixes and cleanups. Upsampling Datahandle
Modified: trunk/bse/bseblockutils.cc
===================================================================
--- trunk/bse/bseblockutils.cc 2006-09-27 18:03:56 UTC (rev 3911)
+++ trunk/bse/bseblockutils.cc 2006-09-27 20:01:16 UTC (rev 3912)
@@ -161,11 +161,12 @@
return FPUResampler2::create_resampler (mode, precision);
}
virtual bool
- test_resampler2()
+ test_resampler2 (bool verbose)
{
/* there is currently only a test for the SSE filter code, so in the
* non-SSE-case we simply always return true
*/
+ g_print ("SSE filter implementation not tested: no SSE support available\n");
return true;
}
};
Modified: trunk/bse/bseblockutils.hh
===================================================================
--- trunk/bse/bseblockutils.hh 2006-09-27 18:03:56 UTC (rev 3911)
+++ trunk/bse/bseblockutils.hh 2006-09-27 20:01:16 UTC (rev 3912)
@@ -132,7 +132,7 @@
Resampler2* create_resampler2 (BseResampler2Mode mode,
BseResampler2Precision precision) { return singleton->create_resampler2 (mode, precision); }
static inline
- bool test_resampler2 () { return singleton->test_resampler2(); }
+ bool test_resampler2 (bool verbose) { return singleton->test_resampler2 (verbose); }
@@ -173,7 +173,7 @@
virtual
Resampler2* create_resampler2 (BseResampler2Mode mode,
BseResampler2Precision precision) = 0;
- virtual bool test_resampler2 () = 0;
+ virtual bool test_resampler2 (bool verbose) = 0;
friend class Block;
static void substitute (Impl *substitute_impl);
};
Modified: trunk/bse/bseresamplerimpl.hh
===================================================================
--- trunk/bse/bseresamplerimpl.hh 2006-09-27 18:03:56 UTC (rev 3911)
+++ trunk/bse/bseresamplerimpl.hh 2006-09-27 20:01:16 UTC (rev 3912)
@@ -218,10 +218,12 @@
* order to be tested can be optionally specified as argument.
*/
static inline bool
-fir_test_filter_sse (const guint max_order = 64)
+fir_test_filter_sse (bool verbose,
+ const guint max_order = 64)
{
int errors = 0;
- printf ("testing SSE filter implementation:\n\n");
+ if (verbose)
+ printf ("testing SSE filter implementation:\n\n");
for (guint order = 0; order < max_order; order++)
{
@@ -230,15 +232,18 @@
taps[i] = i + 1;
AlignedArray<float,16> sse_taps (fir_compute_sse_taps (taps));
- for (unsigned int i = 0; i < sse_taps.size(); i++)
+ if (verbose)
{
- printf ("%3d", (int) (sse_taps[i] + 0.5));
- if (i % 4 == 3)
- printf (" |");
- if (i % 16 == 15)
- printf (" ||| upper bound = %d\n", (order + 6) / 4);
+ for (unsigned int i = 0; i < sse_taps.size(); i++)
+ {
+ printf ("%3d", (int) (sse_taps[i] + 0.5));
+ if (i % 4 == 3)
+ printf (" |");
+ if (i % 16 == 15)
+ printf (" ||| upper bound = %d\n", (order + 6) / 4);
+ }
+ printf ("\n\n");
}
- printf ("\n\n");
AlignedArray<float,16> random_mem (order + 4);
for (guint i = 0; i < order + 4; i++)
@@ -259,7 +264,8 @@
}
if (adiff > 0.0001)
{
- printf ("*** order = %d, adiff = %f\n", order, adiff);
+ if (verbose)
+ printf ("*** order = %d, adiff = %f\n", order, adiff);
errors++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]