Rec. 709

'''Rec. 709, also known as Rec.709, BT.709, and ITU 709''', is a standard developed by ITU-R for image encoding and signal characteristics of high-definition television.

The most recent version is BT.709-6 released in 2015. BT.709-6 defines the picture characteristics as having a (widescreen) aspect ratio of 16:9, 1080 active lines per picture, 1920 samples per line, and a square pixel aspect ratio.

The first version of the standard was approved by the CCIR as Rec.709 in 1990 (there was also CCIR Rec. XA/11 MOD F in 1989), with the stated goal of a worldwide HDTV standard. The ITU superseded the CCIR in 1992, and subsequently released BT.709-1 in November 1993. These early versions still left many unanswered questions, and the lack of consensus toward a worldwide HDTV standard was evident. So much so, some early HDTV systems such as 1035i30 and 1152i25 were still a part of the standard as late as 2002 in BT.709-5.

Technical details
The standard is freely available at the ITU website, and that document should be used as the authoritative reference. The essentials are summarized below.

Image definition
Recommendation ITU-R BT.709-6 defines a common image format (CIF) where picture characteristics are independent of the frame rate. The image is 1920x1080 pixels, for a total pixel count of 2,073,600.

Previous versions of BT.709 included legacy systems such as 1035i30 and 1152i25 HDTV systems. These are now obsolete, and replaced by the system defined in the 2015 ITU BT.709-6.

Frame rates
BT.709 offers over a variety of frame rates and scanning schemes, which along with separating the picture size from frame rate has provided the flexibility for BT.709 to become the worldwide standard for HDTV. This allows manufacturers to create a single television set or display for all markets world-wide.

BT.709-6 specifies the following frame rates, where P indicates a progressively scanned frame, PsF indicates progressive segmented frames, and I indicates interlaced:


 * 24/P, 24/PsF, 23.976/P, 23.976/PsF
 * match the frame rate used for theatrical motion pictures. The fractional rates are included for compatibility with the "pull-down" rates used with NTSC.


 * 50/P, 25/P, 25/PsF, 50/I (25 fps)
 * regions that formerly used 50 Hz systems such as PAL or SECAM. There are no fractional rates as PAL and SECAM did not have the pull-down issue of NTSC.


 * 60/P, 59.94/P, 30/P, 30/PsF, 29.97/P, 29.97/PsF, 60/I (30 fps), 59.94/I (29.97 fps)
 * regions that formerly used 60 Hz systems such as NTSC. Here again, the fractional rates are for compatibility with legacy NTSC pull-down rates.

Image capture, encoding, and distribution
Per BT.709, cameras may capture in either progressive or interlaced form. Video captured as progressive can be recorded, broadcast, or streamed as progressive or as progressive segmented frame (PsF). Video captured using an interlaced mode must be distributed as interlace unless a de-interlace process is applied in post production.

In cases where a progressive captured image is distributed in segmented frame mode, segment/field frequency must be twice the frame rate. Thus 30/PsF has the same field rate as 60/I.

Primary chromaticities
Note that red and blue and yG are the same as the EBU Tech 3213 (PAL) primaries while the xG is halfway between EBU Tech 3213's xG and SMPTE C's xG (PAL and NTSC are two types of BT.601-6). In coverage of the CIE 1931 color space the Rec. 709 color space (and the derivative sRGB color space) is almost identical to Rec. 601 and covers 35.9%. It also covers 33.24% of CIE 1976 u’v’ and 33.5% of CIE 1931 xy. White point is D65 as specified in 2° standard observer.

Transfer characteristics
Rec. 709 specifies a non-linear OETF (opto-electrical transfer function) which is known as the "camera gamma" and which describes how HDTV camera encodes the linear scene light into a non-linear electrical signal value. Rec. 709 doesn't specify the display EOTF (electro-optical transfer function) which describes how HDTV displays should convert the non-linear electrical signal into linear displayed light, that was done in ITU-R BT.1886. See ITU-R BT.2087 for a detailed description of the options for color conversion from Rec. 709 to Rec. 2020.

'''Rec. 709 OETF''' is as follows, close to 1/1.9 – 1/2.0 pure gamma:

$$V=\begin{cases} 4.500L & L < 0.018\\ 1.099 L^{0.45} - 0.099 & L \ge 0.018 \end{cases} $$

where

4.5\beta = \alpha\beta^{0.45} -\alpha +1 \\ 4.5 = 0.45 \alpha\beta^{-0.55} \end{cases} $$
 * $$V$$ is the non-linear electrical signal value, in the range $$\left[0, 1 \right]$$.
 * $$L$$ is the linear scene luminance, in the range $$\left[0, 1 \right]$$.
 * 1.099 is called α and is the approximate of α = 1 + 5.5 * β = 1.099296826809442...
 * 0.018 is called β and is the approximate of the value 0.018053968510807...
 * 0.099 is α - 1
 * Those values are coming from these simultaneous equations that are required to connect the two curve segments smoothly: $$\begin{cases}

Rec. 709 OETF is linear in the bottom part and then a power function with a gamma 0.45 (about 1/2.222..., which is different from sRGB approximation of 2.2) for the rest of the range. The overall OETF approximate to a pure power function with a gamma 0.50 – 0.53 (about 1/1.9 – 1/2.0). Using any pure gamma as OETF is impossible, because compression into nonlinear values will remove a lot of immediately near black shadows. Thus linear segment was invented and a gamma of 0.45 has been used for the power segment. Old CRTs had a EOTF of 2.35 pure gamma and thus the corresponding correction of 709 OETF to get EOTF linear image (if 1.2 end-to-end gamma is assumed) was a pure gamma of 1.2 / 2.35 = 0.51 = 1/1.9608. It was used in such way by Apple until Display P3 devices came into existence.

In typical production practice the encoding function of image sources (OETF) is adjusted so that the final picture has the desired aesthetic look, as viewed on a reference monitor with a gamma of 2.4 (per ITU-R BT.1886) in a dim reference viewing environment (per ITU-R Rec. BT.2035 it is 10 lux of D65 or D93 in Japan).

'''Rec. 709 inverse OETF''' describes the conversion of the non-linear electrical signal value into the linear scene luminance. It is as follows:

$$L=\begin{cases} \dfrac{V}{4.5} & V < 0.081\\ \left ( \dfrac{ V+0.099 }{ 1.099} \right ) ^{\frac{1}{0.45} } & V \ge 0.081 \end{cases} $$

The display EOTF of HDTV (sometimes referred as the "display gamma"), is not the inverse of the camera OETF. The EOTF is not specified in Rec. 709. It is discussed in EBU Tech 3320 and specified in ITU-R BT.1886 as an equivalent gamma of 2.4, that is deviating from it in black region depending on how deep the black is. This is a higher gamma than the approximately gamma 2.0 of Rec. 709 OETF. The resulting end-to-end system gamma (OOTF) of HD television system is about 1.2 and it has been deliberately designed to provide compensation for the dim surround effect.

Rec. 709 and sRGB share the same primary chromaticities and white point chromaticity; however, sRGB is explicitly output (display) referred with an equivalent gamma of 2.2 (the actual function is also piecewise to avoid near black issues). Display P3 uses sRGB EOTF with its linear segment, a change of that segment from 709 is needed by either using parametric curve encoding of ICC v4 or by using slope limit.

Digital representation
Rec. 709 defines an R’G’B’ encoding and a Y’CBCR encoding, each with either 8 bits or 10 bits per sample in each color channel. In the 8-bit encoding the R’, B’, G’, and Y’ channels have a nominal range of [16..235], and the CB and CR channels have a nominal range of [16..240] with 128 as the neutral value. So in limited range R’G’B’ reference black is (16, 16, 16) and reference white is (235, 235, 235), and in Y’CBCR reference black is (16, 128, 128) and reference white is (235, 128, 128). Values outside the nominal ranges are allowed, but typically they would be clamped for broadcast or for display (except for Superwhite and xvYCC). Values 0 and 255 are reserved as timing references (SAV and EAV), and may not contain color data (for 8 bits, for 10 bits more values are reserved and for 12 bits even more, no values are reserved in files or RGB mode or full range YCbCr digital modes like sYCC or opYCC). Rec. 709's 10-bit encoding uses nominal values four times those of the 8-bit encoding, to ease the conversion it uses simple padding for reference values, for example 240 is just padded by two trailing zeroes and gives 960 for 10 bit maximum chroma. Rec. 709's nominal ranges are the same as those defined in ITU Rec. 601.

Standards conversion
Conversion between different standards of video frame rates and color encoding has always been a challenge for content producers distributing through regions with different standards and requirements. While BT.709 has eased the compatibility issue in terms of the consumer and television set manufacturer, broadcast facilities still use a particular frame rate based on region, such as 29.97 in North America, or 25 in Europe meaning that broadcast content still requires at least frame rate conversion.

Converting standard definition
The vast legacy library of standard-definition programs and content presents further challenges. NTSC, PAL, and SECAM are all interlaced formats in a 4:3 aspect ratio, and at a relatively low resolution. Scaling them up to HD resolution with a 16:9 aspect ratio presents a number of challenges.

First is the potential for distracting motion artifacts due to interlaced video content. The solution is to either up-convert only to an interlaced BT.709 format at the same field rate, and scale the fields independently, or use motion processing to remove the inter-field motion and deinterlace, creating progressive frames. In the latter case, motion processing can introduce artifacts and can be slow to process.

Second is the issue of accommodating the SD 4:3 aspect ratio into the HD 16:9 frame. Cropping the top and/or bottom of the standard-definition frame may or may not work, depending on if the composition allows it and if there are graphics or titles that would be cut off. Alternately, pillar-boxing can show the entire 4:3 image by leaving black borders on the left and right. Sometimes this black is filled with a stretched and blurred form of the image.

In addition, the SMPTE C RGB primaries used in North American standard definition are different than those of BT.709 (SMPTE C is commonly referred to as NTSC, however it is a different set of primaries and a different white point than the 1953 NTSC ). The red and blue primaries for PAL and SECAM are the same as BT.709, with a change in the green primary. Converting the image precisely requires a LUT (lookup table) or a color managed workflow to convert the colors to the new colorspace. However in practice this is often ignored, except in mpv, because even if the player is color managed (most of them are not, including VLC), it can see BT.709 or BT.2020 primaries only.

Luma coefficients
When encoding Y’CBCR video, BT.709 creates gamma-encoded luma (Y’) using matrix coefficients 0.2126, 0.7152, and 0.0722 (together they add to 1). BT.709-1 used slightly different 0.2125, 0.7154, 0.0721 (changed to standard ones in BT.709-2). Although worldwide agreement on a single R’G’B’ system was achieved with Rec. 709, adoption of different luma coefficients (as those are derived from primaries and white point ) for Y’CBCR requires the use of different luma-chroma decoding for standard definition and high definition.

Conversion software and hardware
These problems can be handled with video processing software which can be slow, or hardware solutions which allow for realtime conversion, and often with quality improvements.

Film retransfer
A more ideal solution is to go back to original film elements for projects that originated on film. Due to the legacy issues of international distribution, many television programs that shot on film used a traditional negative cutting process, and then had a single film master that could be telecined for different formats. These projects can re-telecine their cut negative masters to a BT.709 master at a reasonable cost, and gain the benefit of the full resolution of film.

On the other hand for projects that originated on film, but completed their online master using video online methods would need to re-telecine the individual needed film takes and then re-assemble, a significantly greater amount of labor and machine time is required in this case, versus a telecine for a conformed negative. In this case, to enjoy the benefits of the film original would entail much higher costs to conform the film originals to a new HD master.

Relationship to sRGB
sRGB was created after the early development of Rec.709. The creators of sRGB chose to use the same primaries and white point as Rec.709, but changed the tone response curve (sometimes referred to as gamma) to better suit the intended use in offices and brighter conditions than television viewing in a dark living room.