annotate src/libsamplerate-0.1.8/doc/quality.html @ 168:ceec0dd9ec9c

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