Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
литература / Digital_Video_and_HD_Second_Edition_Algorithms_and_Interfaces.pdf
Скачиваний:
0
Добавлен:
13.05.2026
Размер:
38.02 Mб
Скачать

Further reading

For an approachable introduction to the concepts, theory, and mathematics of digital signal processing (DSP), see Lyons. For an alternative point of view, see Rorabaugh’s book; it includes the source code for programs to design filters – that is, to evaluate filter coefficients. For comprehensive and theoretical coverage of DSP, see Mitra and Kaiser.

Lyons, Richard G. (1997), Understanding Digital Signal Processing (Reading, Mass.: Addison Wesley).

McClellan, James H. and Parks, Thomas W. (2005), “A personal history of the Parks-McClellan algorithm,” IEEE Signal Processing Magazine 22 (2): 82–86.

Mitra, Sanjit K., and James F. Kaiser (1993), Handbook for Digital Signal Processing (New York: Wiley).

Rorabaugh, C. Britton (1999), DSP Primer (New York:

McGraw-Hill).

220

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

Resampling, interpolation,

and decimation

21

In video and audio signal processing, it is often necessary to take a set of sample values and produce another set that approximates the samples that would have resulted had the original sampling occurred at different instants – at a different rate, or at a different phase. This is called resampling. (In PC parlance, resampling for the purpose of picture resizing is called scaling.) Resampling is an essential part of video processes such as these:

Chroma subsampling (e.g., 4:4:4 to 4:2:2)

Downconversion (e.g., HD to SD) and upconversion (e.g., SD to HD)

Aspect ratio conversion (e.g., 4:3 to 16:9)

Conversion among different sample rates of digital video standards (e.g., 4fSC to 4:2:2, 13.5 MHz)

Picture resizing in digital video effects (DVE)

One-dimensional resampling applies directly to digital audio, in applications such as changing sample rate from 48 kHz to 44.1 kHz. In video, 1-D resampling can be applied horizontally or vertically. Resampling can be extended to a two-dimensional array of samples. Two approaches are possible. A horizontal filter, then a vertical filter, can be applied in cascade (tandem) – this is the separable approach. Alternatively, a direct form of 2-D spatial interpolation can be implemented.

Upsampling produces more result samples than input samples. In audio, new samples can be estimated at

a higher rate than the input, for example when digital audio sampled at 44.1 kHz is converted to the 48 kHz professional rate used with video. In video, upsampling is required in the spatial upconversion from 1280× 720

221

I write resampling ratios in the form input samples:output samples. With my convention, a ratio less than unity is upsampling.

Consider resampling pseudocolour data. If you treat the data as continuous, the resulting image is liable to contain colours not in the source. If you use nearest-neighbour resampling to avoid generating “new” sample values, geometry will suffer.

HD to 1920× 1080 HD: 1280 samples in each input line must be converted to 1920 samples in the output, an upsampling ratio of 2:3.

One way to accomplish upsampling by an integer ratio of 1:n is to interpose n-1 zero samples between each pair of input samples. This causes the spectrum of the original signal to repeat at multiples of the original sampling rate. The repeated spectra are called “images.” (This is a historical term stemming from radio; it has nothing to do with pictures!) These “images” are then eliminated (or at least attenuated) by an anti-imaging lowpass filter. In some upsampling structures, such as the Lagrange interpolator that I will describe later in this chapter, filtering and upsampling are intertwined.

Downsampling produces fewer result samples than input samples. In audio, new samples can be created at a lower rate than the input. In video, downsampling is required when converting 4fSC NTSC digital video to BT.601 (”4:2:2“) digital video: 910 samples in each input line must be converted to 858 samples in the output, a downsampling ratio of 35:33; for each 35 input samples, 33 output samples are produced.

In an original sample sequence, signal content from DC to nearly 0.5fS can be represented. After downsampling, though, the new sample rate may be lower than that required by the signal bandwidth. After downsampling, meaningful signal content is limited by the Nyquist criterion at the new sampling rate – for example, after 4:1 downsampling, signal content is limited to 18 of the original sampling rate. To avoid the introduction of aliases, lowpass filtering is necessary prior to, or in conjunction with, downsampling. The corner frequency depends upon the downsampling ratio; for example, a 4:1 ratio requires a corner less than 0.125fS. Downsampling with an integer ratio of n:1 can be thought of as prefiltering (antialias filtering) for the new sampling rate, followed by the discarding of n-1 samples between original sample pairs.

Resampling produces new samples that assume that neighbouring input samples are related by a continuous function. If the underlying function is not continuous, problems can be expected. For example, pseudocolour images are not continuous: They cannot be meaningfully resampled without creating artifacts.

222

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

Figure 21.1 Two-times upsampling starts by interposing zero samples between original sample pairs. This would result in the folded spectral content of the original signal appearing in-band at the new rate. These “images” are removed by a resampling filter.

Figure 21.2 An original signal exhibits folding around half the sampling frequency. This is inconsequential providing that the signal is properly reconstructed. When the signal is upsampled or downsampled, the folded portion must be handled properly or aliasing will result.

1

0

0

1

0

0

1:2-upsampled signal

Folded spectrum (“image”) prior to resampling (anti-imaging) filter

Folded spectrum following resampling filter

0.5 1.0 Frequency, 1:2-upsampled fs

UPSAMPLING

Original signal

Folding around half-sampling frequency

0.5

1.0 Frequency, original fs

DOWNSAMPLING

Figure 21.3 Two-to-one downsampling requires a resampling filter to meet the Nyquist criterion at the new sampling rate. The solid green line shows the spectrum of the filtered signal; the shaded line shows its folded portion. Resampling without filtering would preserve the original baseband spectrum, but folding around the new sampling rate would cause alias products shown here in the crosshatched region.

1

2:1-downsampled

 

signal

Folded spectrum without resampling

Alias products

Signal spectrum

(antialiasing) filter

0

00.5 1 Frequency, 2:1-downsampled fs

Figure 21.2, at the center above, sketches the spectrum of an original signal. Figure 21.1 shows the frequency domain considerations of upsampling; Figure 21.3 shows the frequency domain considerations of downsampling. These examples show ratios of 1:2 and 2:1; however, the concepts apply to resampling at any ratio.

CHAPTER 21

RESAMPLING, INTERPOLATION, AND DECIMATION

223

Соседние файлы в папке литература