You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

180 lines
6.2KB

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