Bundle libsamplerate
[audio-libsamplerate.git] / libsamplerate / doc / quality.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML>
3
4 <HEAD>
5 <TITLE>
6 Secret Rabbit Code (aka libsamplerate)
7 </TITLE>
8 <META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
9 <META NAME="Version" CONTENT="libsamplerate-0.1.8">
10 <META NAME="Description" CONTENT="The Secret Rabbit Code Home Page">
11 <META NAME="Keywords" CONTENT="libsamplerate sound resample audio dsp Linux">
12 <LINK REL=StyleSheet HREF="SRC.css" TYPE="text/css" MEDIA="all">
13 </HEAD>
14
15 <BODY TEXT="#FFFFFF" BGCOLOR="#000000" LINK="#FB1465" VLINK="#FB1465" ALINK="#FB1465">
16 <!-- pepper -->
17 <CENTER>
18 <IMG SRC="SRC.png" HEIGHT=100 WIDTH=760 ALT="SRC.png">
19 </CENTER>
20 <!-- pepper -->
21 <BR>
22 <!-- pepper -->
23 <TABLE ALIGN="center" WIDTH="98%">
24 <TR>
25 <TD VALIGN="top">
26 <BR>
27 <DIV CLASS="nav">
28 <BR>
29 <A HREF="index.html">Home</A><BR>
30 <A HREF="license.html">License</A><BR>
31 <A HREF="history.html">History</A><BR>
32 <A HREF="download.html">Download</A><BR>
33 <A HREF="quality.html">Quality</A><BR>
34 <A HREF="api.html">API</A><BR>
35 <A HREF="bugs.html">Bug Reporting</A><BR>
36 <A HREF="win32.html">On Win32</A><BR>
37 <A HREF="faq.html">FAQ</A><BR>
38 <A HREF="lists.html">Mailing Lists</A><BR>
39 <A HREF="ChangeLog">ChangeLog</A><BR>
40 <BR>
41 <DIV CLASS="block">
42 Author :<BR>Erik de Castro Lopo
43 <!-- pepper -->
44 <BR><BR>
45 <!-- pepper -->
46
47 </DIV>
48 <IMG SRC=
49 "/cgi-bin/Count.cgi?ft=6|frgb=55;55;55|tr=0|md=6|dd=B|st=1|sh=1|df=src_qual.dat"
50 HEIGHT=30 WIDTH=100 ALT="counter.gif">
51 </DIV>
52
53 </TD>
54 <!-- pepper -->
55 <!-- ######################################################################## -->
56 <!-- pepper -->
57 <TD VALIGN="top">
58 <DIV CLASS="block">
59
60 <H1><B>SRC Quality</B></H1>
61 <CENTER><P>
62 <B>This document not yet complete.</B><BR>
63 </P></CENTER>
64 <P>
65 When measuring the performance of a Sample Rate Converter, there are three
66 factors to consider:
67 </P>
68 <UL>
69 <LI><B>Signal-to-Noise Ratio</B> - a measure of how much noise the sample
70 rate conversion process adds to the signal.
71 This is measured in decibels (dB) and the higher this value the
72 better.
73 For most sample rate converters, the SNR will vary depending on
74 the input signal and the ratio between input and output sample
75 rates.
76 The only valid comparison of SNR is between the worst case for
77 for each converter.
78 <LI><B>Bandwidth</B> - most sample rate converters attenuate high
79 frequencies as part of their operation.
80 Bandwidth can be measured by finding the frequency where the
81 attenuation is 3dB and expressing that as a percentage of the full
82 bandwidth at that sampling rate.
83 <LI><B>Speed</B> - the faster the better <B>:-)</B>.
84 </UL>
85
86 <P>
87 There are a number of sample rate converters available for downloading
88 but I will limit the comparison ot Secret Rabbit Code to the following:
89 </P>
90 <UL>
91 <LI><A HREF="http://www.mega-nerd.com/SRC/download.html">sndfile-resample</A>
92 which is a program (which uses libsamplerate) from the <B>examples/</B>
93 directory of the Secret Rabbit Code source code distribution.
94 <LI><A HREF="http://www-ccrma.stanford.edu/~jos/resample/Available_Software.html">
95 Resample</A>
96 by Julius O Smiths which seems to have been the first high quality converter
97 available as source code.
98 <LI><A HREF="http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/ResampAudio.html">ResampAudio</A>
99 which is part of
100 <A HREF="http://www.tsp.ece.mcgill.ca/MMSP/Documents/Software/AFsp/AFsp.html">
101 Audio File Programs and Routines</A>
102 by Peter Kabal.
103 <LI><A HREF="http://home.sprynet.com/~cbagwell/sox.html">SoX</A> which is maintained
104 by Chris Bagwell.
105 SoX is also able to perform some low quality sample rate conversions but these
106 will not be investigated.
107 <LI><A HREF="http://shibatch.sourceforge.net/">Shibatch</A> which seems to be a
108 frequency domain sample rate converter.
109 Unfortunately, this converter does not handle arbitrary conversion ratios and
110 hence could not be properly compared to the other converters.
111 <LI><A HREF="http://sr-convert.sourceforge.net/">sr-convert</A> is another
112 converter which does not handle arbitrary conversion ratios.
113 </UL>
114
115 <P>
116 It should be noted that the first three converters above are based on the algorithm
117 by <A HREF="http://www-ccrma.stanford.edu/~jos/resample/"> Julius O. Smith</A>
118 which emulates the conversion of the digital signal to an analogue one and then
119 sampling the analogue signal at the new sample rate.
120 </P>
121
122 <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
123
124 <H3><B>Methodology</B></H3>
125 <P>
126 Measuring the SNR of a converter is relatively straight forward.
127 Generate an input signal consisting of a windowed sine wave, sample rate
128 convert it and measure the signal-to-noise ratio of the output signal.
129 A typical length for the original file is 30000 samples.
130 </P>
131 <P>
132 The bandwidth of a sample rate converter is a little more difficult to measure.
133 Currently this is done by generating two short files containing a windowed
134 sine wave.
135 The frequencies of the sine waves are 0.35 and 0.495 of the sample rate.
136 These file are then upsampled by a factor of 2 using the converter under test.
137 If the attenutaion of the lower frquency is less than 3dB and higher frequency is
138 more than 3dB, it is then possible to iteratively increase the lower frequency
139 and decrease the upper frequency keeping the -3dB point bracketed.
140 When the distance between the upper and lower frequency is sufficiently small,
141 it is possible to obtain a very accurate estimate of the -3dB frequency.
142 </P>
143 <P>
144 The speed of a sample rate converter is easy to measure; simply perform a
145 conversion on a large file or a number of smaller files and time the conversion
146 process.
147 </P>
148
149 <P>
150 The above measurement techniques are built into a test program which is delivered
151 with the Secret Rabbit Code source code distibution.
152 This program is able to test the first four of the above converters.
153 </P>
154 <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
155
156 <H3><B>SoX</B></H3>
157 <P>
158 SoX provides three methods of resampling; a linear interpolator, a polyphase
159 resampler and the Julius O. Smith simulated analogue filter method.
160 </P>
161
162 <H3><B>Shibatch</B></H3>
163 <P>
164 Shibach
165 </P>
166
167 <P>
168 <B>More Coming Soon.</B>
169 </P>
170
171 <!-- <A HREF="mailto:aldel@mega-nerd.com">For the spam bots</A> -->
172
173 </DIV>
174 </TD></TR>
175 </TABLE>
176
177 </BODY>
178 </HTML>
179
This page took 0.025292 seconds and 4 git commands to generate.