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

OECF

R

G

B

Figure 28.4 Conventional luma/colour difference encoder. Numerical coefficients here are for SD; unfortunately, different coefficients were standardized for HD.

Figure 28.4 shows a time delay element in the luma path. Luma is delayed by a time interval equal to the transit delay of chroma through the chroma bandlimiting filters.

Eq 28.1 BT.601 Y’PBPR encoding matrix (for SD)

 

0.299

0.587

0.114

 

 

0.331

 

P = −0.169

0.5

 

0.5

0.419

 

 

0.081

For the derivation of this matrix, and a more precise expression, see PBPR components for SD, on page 359.

 

LUMA

ENCODING

COMPENSATING

WEIGHTED SUM

 

MATRIX

 

DELAY

R’

 

 

Y’

 

 

 

 

 

+0.299

 

 

 

 

 

Y’

G’

 

 

 

 

 

 

 

 

+0.587

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

B’

+0.114

 

 

COLOUR

 

CHROMA

 

 

 

DIFFERENCE

 

 

 

 

SUBTRACT

SUBSAMPLING

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+0.564

 

 

 

 

 

PB

 

 

 

 

 

 

 

 

 

 

 

 

 

-0.564

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+0.713

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PR

 

 

 

 

-0.713

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Conventional luma/colour difference coding

I explained constant luminance on page 107. True constant luminance coding remains an intriguing possibility, but at present all video systems use nonconstant luminance coding, which I will now describe.

A conventional luma/colour difference encoder is shown in Figure 28.4 above. First, a nonlinear transfer function is applied to each of the red, green, and blue linear (tristimulus) components. Then luma is formed as a weighted sum of gamma-corrected R’, G’, and B’ components. B’-Y’ and R’-Y’ colour difference components are formed by subtraction; in Figure 28.4, scaling to analog PB and PR components is indicated. Finally, the colour difference components are lowpass filtered.

The highlight rectangle in Figure 28.4 groups together the weighted adder that forms luma with the pair of colour difference subtractors; the combination is equivalent to matrix multiplication by the 3× 3 matrix P shown in Equation 28.1 in the margin. The numerical values used in Equation 28.1, in Figure 28.4, and in subsequent figures in this chapter all reflect the BT.601 luma coefficients used in SD. Unfortunately, the coefficients for HD are different, as I will describe in Component video colour coding for HD, on page 369.

Figure 28.5 illustrates a conventional luma/colour difference decoder. In a digital decoder, the colour difference (chroma) components are horizontally (and,

CHAPTER 28

LUMA AND COLOUR DIFFERENCES

341

R’

R

 

 

 

 

 

DECODING

 

 

 

GREEN

 

 

 

 

 

 

 

MATRIX

 

 

WEIGHTED SUM

 

 

 

 

 

 

 

 

 

 

 

Y’

 

 

 

 

 

 

 

 

 

+

1

 

 

 

EOCF

 

 

 

 

 

 

 

 

 

 

0.587

 

 

 

 

 

 

 

 

 

 

 

 

 

 

-

0.299

 

G’

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CHROMA

 

COLOUR

 

0.587

 

 

 

 

 

 

 

 

 

 

 

 

 

INTERPOLATE

DIFFERENCE

 

-0.114

 

 

 

 

 

 

 

 

 

 

ADD

 

 

 

 

 

 

 

 

 

 

PB

 

 

 

 

0.587

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+10.577

 

 

 

 

 

 

 

B’

 

 

 

 

 

 

 

 

 

 

 

 

 

 

+1

 

 

 

 

 

 

 

 

 

PR

 

 

 

 

 

 

 

 

 

 

 

 

+10.730

 

 

 

 

 

 

 

 

G

B

+1

Figure 28.5 Conventional luma/colour difference decoder, Parameter values here are those of SD. In a historical analog SD television receiver, chroma interpolation is implicit, and requires no circuitry: I draw these components with dashed outlines. In a historical analog SD television receiver, the EOCF is inherent in the CRT, and similarly requires no components.

Eq 28.2 BT.601 Y’PBPR decoding matrix (for SD)

 

1

0

1.402

P−1

 

0.344

 

 

= 1

0.714

 

 

1.772

0

 

 

1

 

in some applications, spatially) interpolated; in an analog decoder, no circuitry is required to perform this function. Luma is added to the colour difference components to reconstruct nonlinear blue and red components. A weighted sum of luma, blue, and red is then formed to reconstruct the nonlinear green component.

The blue and red colour difference adders and the weighted adder that recovers green, all enclosed by the highlight rectangle in Figure 28.5, can be considered together as multiplication by the 3× 3 matrix P-1 shown in Equation 28.2. These values are for SD; the matrix for HD is different.

To produce linear-light tristimulus components, all three components are subject to the inverse transfer function sketched at the right with dashed outlines. Usually, a decoder is used with a CRT that has an intrinsic 2.4-power function, or with some other display that incorporates a 2.4-power function; in either case, the transfer function need not be explicitly computed.

Luminance and luma notation

In Luminance from red, green, and blue, on page 258, I described how relative (linear-light) luminance,

342

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

See Appendix A, YUV and luminance considered harmful, on page 567.

Figure 28.6 Luminance and luma notation is necessary because different primary chromaticity sets, different luma coefficients, and different component scale factors are in use. Unity scaling suffices for components in this chapter; in succeeding chapters, other scale factors will be introduced.

proportional to intensity, can be computed as an appropriately weighted sum of RGB.

In video, the luminance of colour science isn’t computed. Instead, we compute a nonlinear quantity luma as a weighted sum of nonlinear (gammacorrected) R’G’B’. The weights – or luma coefficients – are related to the luminance coefficients. The luma coefficients specified in BT.601 have been ubiquitous for SD, but new and different weights have been introduced in HD standards. In my opinion, the luma coefficients need not and should not have been changed for HD: Complexity is added to upconversion and downconversion in studio and consumer equipment, for no improvement in performance or quality.

Television standards documents historically used the prime symbol () – often combined with the letter E for voltage – to denote a component that incorporates gamma correction. For example, E’R historically denoted the gamma-corrected red channel. Gamma correction is nowadays so taken for granted in video that the E and the prime symbol are usually elided. This has led to much confusion among people attempting to utilize video technology in other domains.

The existence of several standard sets of primary chromaticities, the introduction of new coefficients, and continuing confusion between luminance and luma all beg for a notation to distinguish among the many possible combinations. In the absence of any standard notation, I was compelled to invent my own.

Figure 28.6 below sketches the notation that I use. The base symbol is Y, R, G, or B. The subscript denotes the standard specifying the chromaticities of the primaries

Luminance or luma

Prime indicates

coefficients: BT.601

nonlinear (gamma-

or BT.709

corrected, or luma)

 

component

601219Y709

Scaling: 1 (implicit),

Chromaticity: BT.709,

steps, or millivolts

SMPTE RP 145, or EBU

CHAPTER 28

LUMA AND COLOUR DIFFERENCES

343

Figure 28.7 Typesetting Y’CBCR is a challenge! Luma coefficient set, scaling, and chromaticities are set out as in

Figure 28.6. The prime should always be present, to distinguish luma from the luminance of colour science. C is appropriate for digital signals, P for analog. Subscripts B and R serve as tags, not variables: They should be in roman type, not italics. B comes before R.

Figure 28.6.

Luma details; see

Luma

Prime indicates

coefficients

(nonlinear) luma

C for digital, P for analog

601219Y709’ CBCR

Scaling

 

Chromaticity

Roman (for tag),

not italic type

 

and white. An unprimed letter indicates a linear-light tristimulus component (R, G, or B), or relative luminance (Y). A prime symbol () indicates a nonlinear (gammacorrected) component (R’, G’, and B’), or luma (Y’).

For luminance or luma, a leading superscript indicates the standard specifying the weights used. Historically the weights of BT.601 were implicit, but recent HD standards such as BT.709 and SMPTE ST 274 call for different weights. Finally, the leading subscript indicates the overall scaling of the signal. If omitted, an overall scaling of unity is implicit, otherwise an integer such as 219, 255, or 874 specifies the black-to-white excursion in a digital system, or a number such as 661, 700, or 714 specifies the analog excursion in millivolts.

Typesetting Y’CBCR (or Y’PBPR) is a challenge!

I illustrate the main points in Figure 28.7 above. I augment Y’ with a leading superscript and subscript and a trailing subscript, according to the conventions of Figure 28.6. Without these elements, the intended colour cannot be determined with certainty. I place

a single prime on the Y. Some authors prime the CB and CR as well, but I consider that practice to be obsessive and pedantic. Practical, deployed image coding systems are either perceptually coded in all three colour components or (rarely) fully linear-light in all three. Since there are no “hybrid” systems (linear-light luminance with nonlinear colour differences, or perceptually coded luma with linear-light colour differences), there is no need to triplicate the prime.

344

DIGITAL VIDEO AND HD ALGORITHMS AND INTERFACES

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