annotate src/libsamplerate-0.1.8/doc/quality.html @ 83:ae30d91d2ffe

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