···7474The transfer function defined for SMPTE 170M is the same as the one7575defined in Rec. 709.76767777- L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.0187777+.. math::78787979- L' = 4.5L for -0.018 < L < 0.0187979+ L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.01880808181- L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.0188181+ L' = 4.5L \text{, for } -0.018 < L < 0.0188282+8383+ L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.01882848385Inverse Transfer function:84868585- L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.0818787+.. math::86888787- L = L' / 4.5 for -0.081 < L' < 0.0818989+ L = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.08188908989- L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.0819191+ L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.0819292+9393+ L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.08190949195The luminance (Y') and color difference (Cb and Cr) are obtained with9296the following ``V4L2_YCBCR_ENC_601`` encoding:9797+9898+.. math::939994100 Y' = 0.299R' + 0.587G' + 0.114B'95101···179173Transfer function. Normally L is in the range [0…1], but for the180174extended gamut xvYCC encoding values outside that range are allowed.181175182182- L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.018176176+.. math::183177184184- L' = 4.5L for -0.018 < L < 0.018178178+ L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018185179186186- L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.018180180+ L' = 4.5L \text{, for } -0.018 < L < 0.018181181+182182+ L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018187183188184Inverse Transfer function:189185190190- L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.081186186+.. math::191187192192- L = L' / 4.5 for -0.081 < L' < 0.081188188+ L = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081193189194194- L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081190190+ L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081191191+192192+ L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081195193196194The luminance (Y') and color difference (Cb and Cr) are obtained with197195the following ``V4L2_YCBCR_ENC_709`` encoding:196196+197197+.. math::198198199199 Y' = 0.2126R' + 0.7152G' + 0.0722B'200200···226214that are outside the range [0…1]. The resulting Y', Cb and Cr values are227215scaled and offset:228216229229- Y' = (219 / 256) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 256)217217+.. math::230218231231- Cb = (224 / 256) * (-0.1146R' - 0.3854G' + 0.5B')219219+ Y' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256}232220233233- Cr = (224 / 256) * (0.5R' - 0.4542G' - 0.0458B')221221+ Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B')222222+223223+ Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B')234224235225The xvYCC 601 encoding (``V4L2_YCBCR_ENC_XV601``, :ref:`xvycc`) is236226similar to the BT.601 encoding, but it allows for R', G' and B' values237227that are outside the range [0…1]. The resulting Y', Cb and Cr values are238228scaled and offset:239229240240- Y' = (219 / 256) * (0.299R' + 0.587G' + 0.114B') + (16 / 256)230230+.. math::241231242242- Cb = (224 / 256) * (-0.169R' - 0.331G' + 0.5B')232232+ Y' = \frac{219}{256} * (0.299R' + 0.587G' + 0.114B') + \frac{16}{256}243233244244- Cr = (224 / 256) * (0.5R' - 0.419G' - 0.081B')234234+ Cb = \frac{224}{256} * (-0.169R' - 0.331G' + 0.5B')235235+236236+ Cr = \frac{224}{256} * (0.5R' - 0.419G' - 0.081B')245237246238Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range247239[-0.5…0.5]. The non-standard xvYCC 709 or xvYCC 601 encodings can be···320304Transfer function. Note that negative values for L are only used by the321305Y'CbCr conversion.322306323323- L' = -1.055(-L) :sup:`1/2.4` + 0.055 for L < -0.0031308307307+.. math::324308325325- L' = 12.92L for -0.0031308 ≤ L ≤ 0.0031308309309+ L' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308326310327327- L' = 1.055L :sup:`1/2.4` - 0.055 for 0.0031308 < L ≤ 1311311+ L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308312312+313313+ L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1328314329315Inverse Transfer function:330316331331- L = -((-L' + 0.055) / 1.055) :sup:`2.4` for L' < -0.04045317317+.. math::332318333333- L = L' / 12.92 for -0.04045 ≤ L' ≤ 0.04045319319+ L = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045334320335335- L = ((L' + 0.055) / 1.055) :sup:`2.4` for L' > 0.04045321321+ L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045322322+323323+ L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045336324337325The luminance (Y') and color difference (Cb and Cr) are obtained with338326the following ``V4L2_YCBCR_ENC_SYCC`` encoding as defined by339327:ref:`sycc`:328328+329329+.. math::340330341331 Y' = 0.2990R' + 0.5870G' + 0.1140B'342332···425403426404Transfer function:427405428428- L' = L :sup:`1/2.19921875`406406+.. math::407407+408408+ L' = L ^{\frac{1}{2.19921875}}429409430410Inverse Transfer function:431411432432- L = L' :sup:`2.19921875`412412+.. math::413413+414414+ L = L'^{(2.19921875)}433415434416The luminance (Y') and color difference (Cb and Cr) are obtained with435417the following ``V4L2_YCBCR_ENC_601`` encoding:418418+419419+.. math::436420437421 Y' = 0.299R' + 0.587G' + 0.114B'438422···517489518490Transfer function (same as Rec. 709):519491520520- L' = 4.5L for 0 ≤ L < 0.018492492+.. math::521493522522- L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1494494+ L' = 4.5L\text{, for }0 \le L < 0.018495495+496496+ L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1523497524498Inverse Transfer function:525499526526- L = L' / 4.5 for L' < 0.081500500+.. math::527501528528- L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081502502+ L = L' / 4.5\text{, for } L' < 0.081503503+504504+ L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081529505530506The luminance (Y') and color difference (Cb and Cr) are obtained with531507the following ``V4L2_YCBCR_ENC_BT2020`` encoding:508508+509509+.. math::532510533511 Y' = 0.2627R' + 0.6780G' + 0.0593B'534512···550516551517Luma:552518553553- Yc' = (0.2627R + 0.6780G + 0.0593B)'519519+.. math::520520+ :nowrap:554521555555-B' - Yc' ≤ 0:556556-557557- Cbc = (B' - Yc') / 1.9404558558-559559-B' - Yc' > 0:560560-561561- Cbc = (B' - Yc') / 1.5816562562-563563-R' - Yc' ≤ 0:564564-565565- Crc = (R' - Y') / 1.7184566566-567567-R' - Yc' > 0:568568-569569- Crc = (R' - Y') / 0.9936522522+ \begin{align*}523523+ Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\524524+ B' - Yc' \le 0:& \\525525+ &Cbc = (B' - Yc') / 1.9404 \\526526+ B' - Yc' > 0: & \\527527+ &Cbc = (B' - Yc') / 1.5816 \\528528+ R' - Yc' \le 0:& \\529529+ &Crc = (R' - Y') / 1.7184 \\530530+ R' - Yc' > 0:& \\531531+ &Crc = (R' - Y') / 0.9936532532+ \end{align*}570533571534Yc' is clamped to the range [0…1] and Cbc and Crc are clamped to the572535range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.···641610642611Transfer function:643612644644- L' = L :sup:`1/2.6`613613+.. math::614614+615615+ L' = L^{\frac{1}{2.6}}645616646617Inverse Transfer function:647618648648- L = L' :sup:`2.6`619619+.. math::620620+621621+ L = L'^{(2.6)}649622650623Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709.651624···721686722687Transfer function:723688724724- L' = 4L for 0 ≤ L < 0.0228689689+.. math::725690726726- L' = 1.1115L :sup:`0.45` - 0.1115 for 0.0228 ≤ L ≤ 1691691+ L' = 4L\text{, for } 0 \le L < 0.0228692692+693693+ L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1727694728695Inverse Transfer function:729696730730- L = L' / 4 for 0 ≤ L' < 0.0913697697+.. math::731698732732- L = ((L' + 0.1115) / 1.1115) :sup:`1/0.45` for L' ≥ 0.0913699699+ L = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913700700+701701+ L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913733702734703The luminance (Y') and color difference (Cb and Cr) are obtained with735704the following ``V4L2_YCBCR_ENC_SMPTE240M`` encoding:705705+706706+.. math::736707737708 Y' = 0.2122R' + 0.7013G' + 0.0865B'738709···823782The transfer function was never properly defined for NTSC 1953. The Rec.824783709 transfer function is recommended in the literature:825784826826- L' = 4.5L for 0 ≤ L < 0.018785785+.. math::827786828828- L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1787787+ L' = 4.5L\text{, for } 0 \le L < 0.018788788+789789+ L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1829790830791Inverse Transfer function:831792832832- L = L' / 4.5 for L' < 0.081793793+.. math::833794834834- L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081795795+ L = \frac{L'}{4.5} \text{, for } L' < 0.081796796+797797+ L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081835798836799The luminance (Y') and color difference (Cb and Cr) are obtained with837800the following ``V4L2_YCBCR_ENC_601`` encoding:801801+802802+.. math::838803839804 Y' = 0.299R' + 0.587G' + 0.114B'840805···921874The transfer function was never properly defined for this colorspace.922875The Rec. 709 transfer function is recommended in the literature:923876924924- L' = 4.5L for 0 ≤ L < 0.018877877+.. math::925878926926- L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1879879+ L' = 4.5L\text{, for } 0 \le L < 0.018880880+881881+ L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1927882928883Inverse Transfer function:929884930930- L = L' / 4.5 for L' < 0.081885885+.. math::931886932932- L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081887887+ L = \frac{L'}{4.5} \text{, for } L' < 0.081888888+889889+ L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081933890934891The luminance (Y') and color difference (Cb and Cr) are obtained with935892the following ``V4L2_YCBCR_ENC_601`` encoding:893893+894894+.. math::936895937896 Y' = 0.299R' + 0.587G' + 0.114B'938897