ref: 52554fc5db12e5b460ea66893eb00c18c28619cb
parent: ad15d5dea00cb8bc8b249ff8231827b84bcecd21
author: Erik de Castro Lopo <erikd@mingus>
date: Fri May 26 06:41:21 EDT 2006
Fix knock on effects of calc_snr.c fixes.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-26 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
+
+ * tests/calc_snr.c
+ Fix minor bug in analysis routines.
+
+ * tests/varispeed_test.c tests/snr_bw_test.c
+ Fix knock on effects of above change.
+
2006-05-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
* src/Makefile.am
--- a/tests/snr_bw_test.c
+++ b/tests/snr_bw_test.c
@@ -74,12 +74,12 @@
8,
BOOLEAN_FALSE,
{ { 1, { 0.01111111111 }, 3.0, 1, 28.0, 1.0 },
- { 1, { 0.01111111111 }, 0.6, 1, 37.0, 1.0 },
- { 1, { 0.01111111111 }, 0.3, 1, 37.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.6, 1, 36.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.3, 1, 36.0, 1.0 },
{ 1, { 0.01111111111 }, 1.0, 1, 150.0, 1.0 },
{ 1, { 0.01111111111 }, 1.001, 1, 38.0, 1.0 },
{ 2, { 0.011111, 0.324 }, 1.9999, 2, 14.0, 1.0 },
- { 2, { 0.012345, 0.457 }, 0.456789, 1, 32.0, 1.0 },
+ { 2, { 0.012345, 0.457 }, 0.456789, 1, 12.0, 1.0 },
{ 1, { 0.3511111111 }, 1.33, 1, 10.0, 1.0 }
}
},
@@ -88,12 +88,12 @@
8,
BOOLEAN_FALSE,
{ { 1, { 0.01111111111 }, 3.0, 1, 73.0, 1.0 },
- { 1, { 0.01111111111 }, 0.6, 1, 74.0, 1.0 },
- { 1, { 0.01111111111 }, 0.3, 1, 74.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.6, 1, 73.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.3, 1, 73.0, 1.0 },
{ 1, { 0.01111111111 }, 1.0, 1, 150.0, 1.0 },
{ 1, { 0.01111111111 }, 1.001, 1, 77.0, 1.0 },
- { 2, { 0.011111, 0.324 }, 1.9999, 2, 97.0, 0.94 },
- { 2, { 0.012345, 0.457 }, 0.456789, 1, 60.0, 0.96 },
+ { 2, { 0.011111, 0.324 }, 1.9999, 2, 16.0, 0.94 },
+ { 2, { 0.012345, 0.457 }, 0.456789, 1, 26.0, 0.96 },
{ 1, { 0.3511111111 }, 1.33, 1, 22.0, 0.99 }
}
},
@@ -102,7 +102,7 @@
9,
BOOLEAN_TRUE,
{ { 1, { 0.01111111111 }, 3.0, 1, 100.0, 1.0 },
- { 1, { 0.01111111111 }, 0.6, 1, 100.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.6, 1, 99.0, 1.0 },
{ 1, { 0.01111111111 }, 0.3, 1, 100.0, 1.0 },
{ 1, { 0.01111111111 }, 1.0, 1, 150.0, 1.0 },
{ 1, { 0.01111111111 }, 1.001, 1, 100.0, 1.0 },
@@ -117,7 +117,7 @@
9,
BOOLEAN_TRUE,
{ { 1, { 0.01111111111 }, 3.0, 1, 100.0, 1.0 },
- { 1, { 0.01111111111 }, 0.6, 1, 100.0, 1.0 },
+ { 1, { 0.01111111111 }, 0.6, 1, 99.0, 1.0 },
{ 1, { 0.01111111111 }, 0.3, 1, 100.0, 1.0 },
{ 1, { 0.01111111111 }, 1.0, 1, 149.0, 1.0 },
{ 1, { 0.01111111111 }, 1.001, 1, 100.0, 1.0 },
--- a/tests/varispeed_test.c
+++ b/tests/varispeed_test.c
@@ -34,13 +34,13 @@
{
puts ("") ;
printf (" Zero Order Hold interpolator : ") ;
- varispeed_test (SRC_ZERO_ORDER_HOLD, 45.0) ;
+ varispeed_test (SRC_ZERO_ORDER_HOLD, 10.0) ;
printf (" Linear interpolator : ") ;
- varispeed_test (SRC_LINEAR, 85.0) ;
+ varispeed_test (SRC_LINEAR, 10.0) ;
printf (" Sinc interpolator : ") ;
- varispeed_test (SRC_SINC_FASTEST, 125.0) ;
+ varispeed_test (SRC_SINC_FASTEST, 115.0) ;
puts ("") ;
@@ -140,7 +140,7 @@
snr = calculate_snr (output, src_data.output_frames_gen, 1) ;
if (target_snr > snr)
- { printf ("\n\nLine %d : snr (%3.1f) does not meet target (%3.1f)\n\n", __LINE__, target_snr, snr) ;
+ { printf ("\n\nLine %d : snr (%3.1f) does not meet target (%3.1f)\n\n", __LINE__, snr, target_snr) ;
save_oct_float ("varispeed.mat", input, src_data.input_frames, output, src_data.output_frames_gen) ;
exit (1) ;
} ;