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

 

 

2

is quite acceptable for component digital video.

 

 

 

 

 

 

However, if the phase accumulator implements just 8

 

 

 

fractional bits, that positional error will accumulate as

 

 

 

the incremental computation proceeds across the image

 

 

 

row. In this example, with 922 active samples per line,

 

 

 

the error could reach three or four sample intervals at

 

 

 

the right-hand end of the line! This isn’t tolerable. The

 

 

 

solution is to choose a sufficient number of fractional

 

 

 

bits in the phase accumulator to keep the cumulative

 

 

 

error within limits. In this example, 13 bits are suffi-

 

 

 

cient, but only 8 of those bits need to be presented to

 

 

 

the interpolator.

 

 

 

two, such as 256 phases. Phase offsets are computed to

 

 

 

the appropriate degree of precision, and are then

 

 

 

approximated to a binary fraction (in this case having

 

 

 

8 bits) to form the phase offset that is presented to

 

 

 

the interpolator.

 

 

 

If the interpolator implements 8 fractional bits of

1

= 1

· 1

phase, then any computed output sample may exhibit a

positional error of up to ±1512 of a sample interval. This

512

2

8

 

Implementing polyphase interpolators

Polyphase interpolation is a specialization of FIR filtering; however, there are three major implementation differences. First, in a typical FIR filter, the input and output rates are the same; in a polyphase interpolator, the input and output rates are usually different. Second, FIR filters usually have fixed coefficients; in

a polyphase FIR interpolator, the coefficients vary on a sample-by-sample basis. Third, typical FIR filters are symmetrical, but polyphase interpolators are not.

Generally speaking, for a small number of phases – perhaps 8 or fewer – the cost of an interpolator is dominated by the number of multiplication operations, which is proportional to the number of taps. Beyond about 8 taps, the cost of coefficient storage begins to be significant. The cost of the addressing circuitry depends only upon the number of phases.

In the 35:33 downsampler example, I discussed

a hardware structure driven by the input sample rate. Suppose the hardware design requires that the interpolator be driven by the output clock. For 31 of each 33 output clocks, one input sample is consumed; however, for two clocks, two input samples are consumed. This

CHAPTER 21

RESAMPLING, INTERPOLATION, AND DECIMATION

233

Taken literally, decimation involves a ratio of 10:9, not 10:1.

places a constraint on memory system design: Either two paths from memory must be implemented, or the extra 44 samples per line must be accessed during the blanking interval, and be stored in a small buffer. It is easier to drive this interpolator from the input clock. Consider a 33:35 upsampler, from BT.601 to 4fSC NTSC. If driven from the output side, the interpolator produces one output sample per clock, and consumes

at most one input sample per clock. (For 2 of the 35 output clocks, no input samples are consumed.) If

driven from the input side, for 2 of the 33 input clocks, the interpolator must produce two output samples. This is likely to present problems to the design of the FIR filter and the output side memory system.

The lesson is this: The structure of a polyphase interpolator is simplified if it is driven from the high-rate side.

Decimation

In Lagrange interpolation, no account is taken of whether interpolation computes more or fewer output samples than input samples. However, in signal processing, there is a big difference between downsampling – where lowpass filtering is necessary to prevent aliasing – and upsampling, where lowpass filtering is necessary to suppress “imaging.” In signal processing, the term interpolation generally implies upsampling, that is, resampling to any ratio of unity or greater. (The term interpolation also describes phase shift without sample rate change; think of this as the special case of upsampling with a ratio of 1:1.)

Downsampling with a ratio of 10:9 is analogous to the policy by which the Roman army dealt with treachery and mutiny among its soldiers: One in ten of the offending soldiers was put to death. Their term decimation has come to describe downsampling in general.

Lowpass filtering in decimation

Earlier in this chapter, I expressed chroma subsampling as 2:1 decimation. In a decimator, samples are lowpass filtered to attenuate components at and above half the new sampling rate; then samples are dropped. Obviously, samples that are about to be dropped need not

234

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

For details of interpolators and decimators, see Crochiere, Ronald E., and Lawrence R. Rabiner

(1983), Multirate Digital Signal Processing (New York: Prentice-Hall).

be computed! Ordinarily, the sample-dropping and filtering are incorporated into the same circuit.

In the example of halfband decimation for chroma subsampling, I explained the necessity of lowpass filtering to 0.25fS. In the 4fSC NTSC to BT.601 example that I presented in Polyphase interpolators, on

page 231, the input and output sample rates were so similar that no special attention needed to be paid to bandlimiting at the resulting sample rate. If the downsampling ratio is much greater than unity – say 5:4, or greater – then the impulse response must incorporate a lowpass filtering (prefiltering, or antialiasing) function as well as phase shift. To avoid aliasing, the lowpass corner frequency must scale with the downsampling ratio. This may necessitate several sets of filter coefficients having different corner frequencies.

CHAPTER 21

RESAMPLING, INTERPOLATION, AND DECIMATION

235

This page intentionally left blank

Image digitization and

reconstruction 22

One-dimensional sampling theory was described in Filtering and sampling, on page 191.

A sequence of still pictures captured and displayed at a sufficiently high rate – typically between 24 and 60 pictures per second – can create the illusion of motion, as I will describe further on page 51. Sampling in time, in combination with 2-D (spatial) sampling, causes digital video to be sampled in three axes – horizontal, vertical, and temporal – as sketched in Figure 22.1.

One-dimensional sampling theory applies along each of the three axes. I sketch just three temporal samples, because temporal sample count is limited by the number of picture stores provided; picture stores are more expensive than linestores. I sketch five vertical samples: Each vertical sample is associated with

a linestore.

SPATIAL

TEMPORAL

VERTICAL

HORIZONTAL(TRANSVERSE)

Figure 22.1 Spatiotemporal domains

237

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