Unified · Split
| @@ -4,7 +4,7 @@ noinst_PROGRAMS = misc_test termination_test simple_test callback_test \ · 3 unmodified lines | |||
| 4 | 4 | ||
| 5 | SAMPLRATEDIR =../src | 5 | SAMPLRATEDIR =../src |
| 6 | INCLUDES = -I$(srcdir)/$(SAMPLRATEDIR) | 6 | INCLUDES = -I$(srcdir)/$(SAMPLRATEDIR) |
| 7 | noinst_HEADERS = calc_snr.h util.h | 7 | noinst_HEADERS = util.h |
| 8 | 8 | ||
| 9 | #=============================================================================== | 9 | #=============================================================================== |
| 10 | 10 | ||
| @@ -35,7 +35,7 @@ callback_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la · 24 unmodified lines | |||
| 35 | float_short_test_SOURCES = float_short_test.c util.c util.h | 35 | float_short_test_SOURCES = float_short_test.c util.c util.h |
| 36 | float_short_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la | 36 | float_short_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la |
| 37 | 37 | ||
| 38 | varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c calc_snr.h | 38 | varispeed_test_SOURCES = varispeed_test.c util.c util.h calc_snr.c |
| 39 | varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS) | 39 | varispeed_test_LDADD = $(SAMPLRATEDIR)/libsamplerate.la $(FFTW3_LIBS) |
| 40 | 40 | ||
| 41 | # This program is for evaluating other sample rate converters. | 41 | # This program is for evaluating other sample rate converters. |
| @@ -7,7 +7,6 @@ · 6 unmodified lines | |||
| 7 | #include <samplerate.h> | 7 | #include <samplerate.h> |
| 8 | 8 | ||
| 9 | #include "util.h" | 9 | #include "util.h" |
| 10 | #include "calc_snr.h" | ||
| 11 | 10 | ||
| 12 | #define BUFFER_LEN (1<<23) | 11 | #define BUFFER_LEN (1<<23) |
| 13 | #define SNR_LEN (1<<16) | 12 | #define SNR_LEN (1<<16) |
| @@ -18,7 +18,6 @@ · 17 unmodified lines | |||
| 18 | 18 | ||
| 19 | #include "config.h" | 19 | #include "config.h" |
| 20 | 20 | ||
| 21 | #include "calc_snr.h" | ||
| 22 | #include "util.h" | 21 | #include "util.h" |
| 23 | 22 | ||
| 24 | #if (HAVE_FFTW3 == 1) | 23 | #if (HAVE_FFTW3 == 1) |
| @@ -1,27 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ** Copyright (C) 2002-2004 Erik de Castro Lopo <erikd@mega-nerd.com> | ||
| 3 | ** | ||
| 4 | ** This program is free software; you can redistribute it and/or modify | ||
| 5 | ** it under the terms of the GNU General Public License as published by | ||
| 6 | ** the Free Software Foundation; either version 2 of the License, or | ||
| 7 | ** (at your option) any later version. | ||
| 8 | ** | ||
| 9 | ** This program is distributed in the hope that it will be useful, | ||
| 10 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | ** GNU General Public License for more details. | ||
| 13 | ** | ||
| 14 | ** You should have received a copy of the GNU General Public License | ||
| 15 | ** along with this program; if not, write to the Free Software | ||
| 16 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | double calculate_snr (float *data, int len, int expected_peaks) ; | ||
| 20 | /* | ||
| 21 | ** Do not edit or modify anything in this comment block. | ||
| 22 | ** The arch-tag line is a file identity tag for the GNU Arch | ||
| 23 | ** revision control system. | ||
| 24 | ** | ||
| 25 | ** arch-tag: b35c91c0-a2a7-4628-8c4e-59b582da2f42 | ||
| 26 | */ | ||
| 27 | |||
| @@ -16,6 +16,8 @@ · 15 unmodified lines | |||
| 16 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | 16 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include "config.h" | ||
| 20 | |||
| 19 | #include <stdio.h> | 21 | #include <stdio.h> |
| 20 | #include <stdlib.h> | 22 | #include <stdlib.h> |
| 21 | #include <string.h> | 23 | #include <string.h> |
| @@ -24,9 +26,6 @@ · 2 unmodified lines | |||
| 24 | #include <samplerate.h> | 26 | #include <samplerate.h> |
| 25 | 27 | ||
| 26 | #include "util.h" | 28 | #include "util.h" |
| 27 | #include "calc_snr.h" | ||
| 28 | #include "config.h" | ||
| 29 | |||
| 30 | #define BUFFER_LEN (1<<15) | 29 | #define BUFFER_LEN (1<<15) |
| 31 | #define BLOCK_LEN (12) | 30 | #define BLOCK_LEN (12) |
| 32 | 31 | ||
| @@ -16,20 +16,19 @@ · 15 unmodified lines | |||
| 16 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | 16 | ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #include "config.h" | ||
| 20 | |||
| 19 | #include <stdio.h> | 21 | #include <stdio.h> |
| 20 | #include <stdlib.h> | 22 | #include <stdlib.h> |
| 21 | #include <string.h> | 23 | #include <string.h> |
| 22 | #include <math.h> | 24 | #include <math.h> |
| 23 | #include <time.h> | 25 | #include <time.h> |
| 24 | 26 | ||
| 25 | #include "config.h" | ||
| 26 | |||
| 27 | #if (HAVE_FFTW3) | 27 | #if (HAVE_FFTW3) |
| 28 | 28 | ||
| 29 | #include <samplerate.h> | 29 | #include <samplerate.h> |
| 30 | 30 | ||
| 31 | #include "util.h" | 31 | #include "util.h" |
| 32 | #include "calc_snr.h" | ||
| 33 | 32 | ||
| 34 | #define BUFFER_LEN 50000 | 33 | #define BUFFER_LEN 50000 |
| 35 | #define MAX_FREQS 4 | 34 | #define MAX_FREQS 4 |
| @@ -33,7 +33,6 @@ · 32 unmodified lines | |||
| 33 | #include <math.h> | 33 | #include <math.h> |
| 34 | #include <sys/utsname.h> | 34 | #include <sys/utsname.h> |
| 35 | 35 | ||
| 36 | #include "calc_snr.h" | ||
| 37 | #include "util.h" | 36 | #include "util.h" |
| 38 | 37 | ||
| 39 | #define MAX_FREQS 4 | 38 | #define MAX_FREQS 4 |
| @@ -33,6 +33,8 @@ void deinterleave_data (const float *in, float *out, int frames, int channels) ; · 32 unmodified lines | |||
| 33 | 33 | ||
| 34 | void reverse_data (float *data, int datalen) ; | 34 | void reverse_data (float *data, int datalen) ; |
| 35 | 35 | ||
| 36 | double calculate_snr (float *data, int len, int expected_peaks) ; | ||
| 37 | |||
| 36 | /* | 38 | /* |
| 37 | ** Do not edit or modify anything in this comment block. | 39 | ** Do not edit or modify anything in this comment block. |
| 38 | ** The arch-tag line is a file identity tag for the GNU Arch | 40 | ** The arch-tag line is a file identity tag for the GNU Arch |
| @@ -24,7 +24,6 @@ · 23 unmodified lines | |||
| 24 | #include <samplerate.h> | 24 | #include <samplerate.h> |
| 25 | 25 | ||
| 26 | #include "util.h" | 26 | #include "util.h" |
| 27 | #include "calc_snr.h" | ||
| 28 | 27 | ||
| 29 | #define BUFFER_LEN (1 << 16) | 28 | #define BUFFER_LEN (1 << 16) |
| 30 | 29 | ||