HOME

TheInfoList



OR:

Sample-rate conversion, sampling-frequency conversion or resampling is the process of changing the
sampling rate In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or s ...
or sampling frequency of a
discrete signal In mathematical dynamics, discrete time and continuous time are two alternative frameworks within which variables that evolve over time are modeled. Discrete time Discrete time views values of variables as occurring at distinct, separate "poi ...
to obtain a new discrete representation of the underlying
continuous signal In mathematical dynamics, discrete time and continuous time are two alternative frameworks within which variables that evolve over time are modeled. Discrete time Discrete time views values of variables as occurring at distinct, separate "poi ...
. Application areas include
image scaling In computer graphics and digital imaging, image scaling refers to the resizing of a digital image. In video technology, the magnification of digital material is known as upscaling or resolution enhancement. When scaling a vector graphic image ...
and audio/visual systems, where different sampling rates may be used for engineering, economic, or historical reasons. For example,
Compact Disc Digital Audio Compact Disc Digital Audio (CDDA or CD-DA), also known as Digital Audio Compact Disc or simply as Audio CD, is the standard format for audio compact discs. The standard is defined in the '' Red Book'' technical specifications, which is why t ...
and
Digital Audio Tape Digital Audio Tape (DAT or R-DAT) is a signal recording and playback medium developed by Sony and introduced in 1987. In appearance it is similar to a Compact Cassette, using 3.81 mm / 0.15" (commonly referred to as 4 mm) magnetic t ...
systems use different sampling rates, and American television, European television, and movies all use different
frame rate Frame rate, most commonly expressed in frame/s, or FPS, is typically the frequency (rate) at which consecutive images (Film frame, frames) are captured or displayed. This definition applies to film and video cameras, computer animation, and moti ...
s. Sample-rate conversion prevents changes in speed and pitch that would otherwise occur when transferring recorded material between such systems. More specific types of resampling include: ''
upsampling In digital signal processing, upsampling, expansion, and interpolation are terms associated with the process of sample rate conversion, resampling in a multi-rate digital signal processing system. ''Upsampling'' can be synonymous with ''expansion'' ...
'' or ''upscaling''; ''
downsampling In digital signal processing, downsampling, compression, and decimation are terms associated with the process of ''resampling'' in a multi-rate digital signal processing system. Both ''downsampling'' and ''decimation'' can be synonymous with ''co ...
'', ''downscaling'', or ''decimation''; and ''
interpolation In the mathematics, mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points. In engineering and science, one ...
''. The term multi-rate digital signal processing is sometimes used to refer to systems that incorporate sample-rate conversion.


Techniques

Conceptual approaches to sample-rate conversion include: converting to an analog continuous signal, then re-sampling at the new rate, or calculating the values of the new samples directly from the old samples. The latter approach is more satisfactory since it introduces less noise and distortion. Two possible implementation methods are as follows: # If the ratio of the two sample rates is (or can be approximated by) a fixed rational number ''L''/''M'': generate an intermediate signal by inserting ''L'' − 1 zeros between each of the original samples.
Low-pass filter A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filt ...
this signal at half of the lower of the two rates. Select every ''M''-th sample from the filtered output, to obtain the result. # Treat the samples as geometric points and create any needed new points by interpolation. Choosing an interpolation method is a trade-off between implementation complexity and conversion quality (according to application requirements). Commonly used are: zero-order hold (for film/video frames),
cubic Cubic may refer to: Science and mathematics * Cube (algebra), "cubic" measurement * Cube, a three-dimensional solid object bounded by six square faces, facets or sides, with three meeting at each vertex ** Cubic crystal system, a crystal system w ...
(for image processing) and windowed
sinc function In mathematics, physics and engineering, the sinc function ( ), denoted by , has two forms, normalized and unnormalized.. In mathematics, the historical unnormalized sinc function is defined for by \operatorname(x) = \frac. Alternatively, ...
(for audio). The two methods are mathematically identical: picking an interpolation function in the second scheme is equivalent to picking the impulse response of the filter in the first scheme. Linear interpolation is equivalent to a triangular impulse response; windowed sinc approximates a brick-wall filter (it approaches the desirable brick-wall filter as the number of points increases). The length of the impulse response of the filter in method 1 corresponds to the number of points used in interpolation in method 2. In method 1, a slow pre-computation (such as the
Remez algorithm The Remez algorithm or Remez exchange algorithm, published by Evgeny Yakovlevich Remez in 1934, is an iterative algorithm used to find simple approximations to functions, specifically, approximations by functions in a Chebyshev space that are the ...
) can be used to obtain an optimal (per application requirements) filter design. Method 2 will work in more general cases, e.g. where the ratio of sample rates is not rational, or two real-time streams must be accommodated, or the sample rates are time-varying. See decimation and
upsampling In digital signal processing, upsampling, expansion, and interpolation are terms associated with the process of sample rate conversion, resampling in a multi-rate digital signal processing system. ''Upsampling'' can be synonymous with ''expansion'' ...
for further information on sample-rate conversion filter design/implementation.


Examples


Film and television

The slow-scan TV signals from the
Apollo Apollo is one of the Twelve Olympians, Olympian deities in Ancient Greek religion, ancient Greek and Ancient Roman religion, Roman religion and Greek mythology, Greek and Roman mythology. Apollo has been recognized as a god of archery, mu ...
Moon missions were converted to the conventional TV rates for the viewers at home. Digital interpolation schemes were not practical at that time, so analog conversion was used. This was based on a TV rate camera viewing a monitor displaying the Apollo slow-scan images. Movies (shot at 24 frames per second) are converted to television (roughly 50 or 60 fields per second). To convert a 24 frame/sec movie to 60 field/sec television, for example, alternate movie frames are shown 2 and 3 times, respectively. For 50 Hz systems such as
PAL Phase Alternating Line (PAL) is a color encoding system for analog television. It was one of three major analogue colour television standards, the others being NTSC and SECAM. In most countries it was broadcast at 625 lines, 50 fields (25 ...
each frame is shown twice. Since 50 is not exactly 2×24, the movie will run 50/48 = 4% faster, and the audio pitch will be 4% higher, an effect known as PAL speed-up. This is often accepted for simplicity, but more complex methods are possible that preserve the running time and pitch. Every twelfth frame can be repeated 3 times rather than twice, or digital interpolation (see above) can be used in a
video scaler A video scaler is a system that converts video signals from one display resolution to another; typically, scalers are used to convert a signal from a lower resolution (such as 480p standard definition) to a higher resolution (such as 1080i hig ...
.


Audio

Audio on
Compact Disc The compact disc (CD) is a Digital media, digital optical disc data storage format co-developed by Philips and Sony to store and play digital audio recordings. It employs the Compact Disc Digital Audio (CD-DA) standard and was capable of hol ...
has a sampling rate of 44.1 kHz; to transfer it to a digital medium that uses 48 kHz, method 1 above can be used with ''L'' = 160, ''M'' = 147 (since 48000/44100 = 160/147). For the reverse conversion, the values of ''L'' and ''M'' are swapped. Per above, in both cases, the low-pass filter should be set to 22.05 kHz.


See also

Sample rate conversion in multiple dimensions: *
Multivariate interpolation In numerical analysis, multivariate interpolation or multidimensional interpolation is interpolation on ''multivariate functions'', having more than one variable or defined over a multi-dimensional domain. A common special case is bivariate inter ...
Techniques and processing that may involve sample-rate conversion: *
Oversampling In signal processing, oversampling is the process of sampling (signal processing), sampling a signal at a sampling frequency significantly higher than the Nyquist rate. Theoretically, a bandwidth-limited signal can be perfectly reconstructed if ...
*
Transcoding Transcoding is the direct digital-to-digital conversion of one encoding to another, such as for video data files, audio files (e.g., MP3, WAV), or character encoding (e.g., UTF-8, ISO/IEC 8859). This is usually done in cases where a target ...
Techniques used in related processes: *
Dither Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and video data, and is ofte ...


Notes


References


Further reading

* {{cite book , last1=Crochiere , first1=R.E. , last2=Rabiner , first2=L.R. , title=Multirate Digital Signal Processing , year=1983 , publisher=Prentice-Hall , location=Englewood Cliffs, NJ , isbn=0136051626 , url=https://kupdf.net/download/multirate-digital-signal-processing-crochiere-rabiner_58a7065b6454a7e80bb1e993_pdf


External links


Digital Audio Resampling Home Page

Multi-Rate Processing and Sample Rate Conversion: A Tutorial

The Quest For The Perfect Resampler
(PDF)

* ttp://en.dsplib.org/content/resampling_lagrange_ex.html Using Farrow filter on the basis of piecewise cubic polynomial interpolation for digital signal resampling Digital signal processing