Sample-rate conversion (SRC) refers to the process of translating a sequence of discrete data samples with a certain sampling rate into another sequence with a different sampling rate, while preserving the information contained in the original sequence. Sample rate conversion can be a relatively simple technique where the two sample rates are related by a fairly small integer ratio. For example, if the ratio of sample rates is 4:5, the input signal only needs to be upsampled by a factor of four and then, after appropriate filtering, down-sampled by a factor of five.
FIG. 1 illustrates an example of such a Prior Art sample rate conversion technique. In this Prior Art embodiment, input data may be upsampled by a factor of M in upsampler 110, to produce an upsampled data stream. Upsampling may comprise the process of creating new intermediate samples by inserting samples of value zero as intermediate values. Upsampled data may be filtered in low pass filter 120, which may comprise a digital filter. The resultant data may be downsampled by a factor of N in downsampler 130 which may decimate unwanted data samples. Downsampling may comprise decimating (eliminating) intermediate sample values to create a new sample set at the desired output sample rate.
Low pass filter 120 may be used to eliminate spectral “images” produced when upsampling. Such images are illustrated in FIG. 2. Referring to FIG. 2, the sample data at rate fs is illustrated, along with image data produced during upsampling at sample rates 2fs and 3fs. FIG. 3 illustrates how filtering may be used to eliminate undesirable images while preserving desirable data, as illustrated in FIG. 4 to produce sample rate converted data as illustrated in FIG. 5.
In the example given above for a ratio of sample rates of 4:5, M would equal 4 and N would equal 5. Such a Prior Art sample rate conversion technique may be suitable for relatively simple rate conversions. However, not all scenarios where sample rate conversion is desired have such simple sample rate ratios. For example, when converting by more drastic ratios (e.g., 124:359) the amount of processing required to upsample and then downsample may be prohibitive.
As compared to the simpler scenario where the sampling rates are related by a relatively simple ratio, the term “asynchronous sample-rate conversion” is often used to signify situations where the ratios are rather ill-defined numbers such that their least common multiple is a very large number. Asynchronous sample rate conversion is particularly applicable in cases where data is at the “same” sampling rate, but created with a different clock crystal, and thus at a slightly different sampling frequency. Thus, one set of data might have a sample rate of a “fast” 48 KHz and another might have a sample rate of a “slow” 48 KHz. Such ratios like this that are close to 1:1, but not exact, fall into the category of “asynchronous sample-rate conversion.” Asynchronous sample-rate converters are commonly used when bridging two systems that are on different sampling rates and/or master operating clocks.
Additionally, in the field of audio, there are various standards that utilize different sampling rates such as 32 KHz, 44.1 KHz, 48 KHz, and so on, and sample rate converters are commonly used to interconnect different systems with the different standards.
There are times when a digital data stream needs to be converted to a different sampling frequency and in addition, be filtered in some way. One way to accomplish this task would be to have a sample rate conversion block followed by (or preceded by) a filter block. Such a setup would look like one of the block diagrams illustrated in FIG. 10. In the two Prior Art embodiments of FIG. 10, an input signal u(k) 1710 may be fed to a sample rate converter 1720 and a digital filter 1730, in either order depending upon which side of the SRC the filtering is performed. Sample rate converter 1720, as discussed previously herein, alters the sample rate of the digital input data u(k) to a different sampling rate than the input signal, and may be either synchronous or asynchronous. Digital filter 1730 may perform a number of digital filtering operations as desired by a user to alter the input signal. Output signal y(k) is thus suitably filtered and converted for a desired end use.
Applications for such sample rate conversion and digital filtering are relatively common, particularly in the digital audio arts. The Prior Art solutions of FIG. 10, while intuitive, require separate components and/or software for the digital filtering and sample rate conversion steps. Given that both functions may be required in a number of applications, it would be advantageous to combine both functions into one system, to reduce the complexity of hardware and/or software.