sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget?/translations/zh_CN/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/zh_TW/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/it_IT/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/ja_JP/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/ko_KR/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/sp_SP/userspace-api/media/v4l/colorspaces-detailsmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhY/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/colorspaces-details.rsthKubhsection)}(hhh](htitle)}(h Detailed Colorspace Descriptionsh]h Detailed Colorspace Descriptions}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhtarget)}(h.. _col-smpte-170m:h]h}(h]h ]h"]h$]h&]refidcol-smpte-170muh1hhKhhhhhhubh)}(hhh](h)}(h1Colorspace SMPTE 170M (V4L2_COLORSPACE_SMPTE170M)h]h1Colorspace SMPTE 170M (V4L2_COLORSPACE_SMPTE170M)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(hXIThe :ref:`smpte170m` standard defines the colorspace used by NTSC and PAL and by SDTV in general. The default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThe }(hhhhhNhNubh)}(h:ref:`smpte170m`h]hinline)}(hhh]h smpte170m}(hhhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdoc+userspace-api/media/v4l/colorspaces-details refdomainjreftyperef refexplicitrefwarn reftarget smpte170muh1hhhhK hhubho standard defines the colorspace used by NTSC and PAL and by SDTV in general. The default transfer function is }(hhhhhNhNubhliteral)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhubh#. The default Y’CbCr encoding is }(hhhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhtable)}(hhh](h)}(hSMPTE 170M Chromaticitiesh]hSMPTE 170M Chromaticities}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj\ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj\ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj\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)}(h0.155h]h0.155}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(h0.070h]h0.070}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3127h]h0.3127}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK'hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]colsKuh1jZhjIubeh}(h]id1ah ]h"]h$]h&]uh1jGhhhhhNhNubh)}(hThe red, green and blue chromaticities are also often referred to as the SMPTE C set, so this colorspace is sometimes called SMPTE C as well.h]hThe red, green and blue chromaticities are also often referred to as the SMPTE C set, so this colorspace is sometimes called SMPTE C as well.}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hhhhubh)}(hXThe transfer function defined for SMPTE 170M is the same as the one defined in Rec. 709.h]hXThe transfer function defined for SMPTE 170M is the same as the one defined in Rec. 709.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hhhhubh math_block)}(hL' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.018 L' = 4.5L \text{, for } -0.018 < L < 0.018 L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018h]hL' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.018 L' = 4.5L \text{, for } -0.018 < L < 0.018 L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018}hjKsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhK0hhhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hhhhubjJ)}(hL = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081 L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.081 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081h]hL = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081 L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.081 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081}hjksbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhK:hhhhubh)}(htThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hj}hhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh encoding:}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhhhhubjJ)}(hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'h]hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKEhhhhubh)}(hX Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This conversion to Y'CbCr is identical to the one defined in the :ref:`itu601` standard and this colorspace is sometimes called BT.601 as well, even though BT.601 does not mention any color primaries.h](hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This conversion to Y’CbCr is identical to the one defined in the }(hjhhhNhNubh)}(h :ref:`itu601`h]h)}(hjh]hitu601}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjitu601uh1hhhhKMhjubhz standard and this colorspace is sometimes called BT.601 as well, even though BT.601 does not mention any color primaries.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhhhhubh)}(h[The default quantization is limited range, but full range is possible although rarely seen.h]h[The default quantization is limited range, but full range is possible although rarely seen.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhhhhubh)}(h.. _col-rec709:h]h}(h]h ]h"]h$]h&]hՌ col-rec709uh1hhKVhhhhhhubeh}(h](/colorspace-smpte-170m-v4l2-colorspace-smpte170mheh ]h"](1colorspace smpte 170m (v4l2_colorspace_smpte170m)col-smpte-170meh$]h&]uh1hhhhhhhhK expect_referenced_by_name}jhsexpect_referenced_by_id}hhsubh)}(hhh](h)}(h,Colorspace Rec. 709 (V4L2_COLORSPACE_REC709)h]h,Colorspace Rec. 709 (V4L2_COLORSPACE_REC709)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKYubh)}(hX2The :ref:`itu709` standard defines the colorspace used by HDTV in general. The default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_709``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThe }(hjhhhNhNubh)}(h :ref:`itu709`h]h)}(hj"h]hitu709}(hj$hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj.reftyperef refexplicitrefwarnjitu709uh1hhhhK[hjubh[ standard defines the colorspace used by HDTV in general. The default transfer function is }(hjhhhNhNubj)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK[hjhhubjH)}(hhh](h)}(hRec. 709 Chromaticitiesh]hRec. 709 Chromaticities}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahjnubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.640h]h0.640}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.330h]h0.330}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhjIubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h0.300h]h0.300}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhj`ubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h0.600h]h0.600}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjwubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.150h]h0.150}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.060h]h0.060}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3127h]h0.3127}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjnubeh}(h]id2ah ]h"]h$]h&]uh1jGhjhhhNhNubh)}(h6The full name of this standard is Rec. ITU-R BT.709-5.h]h6The full name of this standard is Rec. ITU-R BT.709-5.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubh)}(hTransfer function. Normally L is in the range [0…1], but for the extended gamut xvYCC encoding values outside that range are allowed.h]hTransfer function. Normally L is in the range [0…1], but for the extended gamut xvYCC encoding values outside that range are allowed.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjhhubjJ)}(hL' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018 L' = 4.5L \text{, for } -0.018 < L < 0.018 L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018h]hL' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018 L' = 4.5L \text{, for } -0.018 < L < 0.018 L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018}hj`sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhK|hjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hL = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081 L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081h]hL = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081 L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081 L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKhjhhubh)}(htThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_709`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hhY' = 0.2126R' + 0.7152G' + 0.0722B' Cb = -0.1146R' - 0.3854G' + 0.5B' Cr = 0.5R' - 0.4542G' - 0.0458B'h]hhY' = 0.2126R' + 0.7152G' + 0.0722B' Cb = -0.1146R' - 0.3854G' + 0.5B' Cr = 0.5R' - 0.4542G' - 0.0458B'}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKhjhhubh)}(hWY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5].h]hYY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5].}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h[The default quantization is limited range, but full range is possible although rarely seen.h]h[The default quantization is limited range, but full range is possible although rarely seen.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe ``V4L2_YCBCR_ENC_709`` encoding described above is the default for this colorspace, but it can be overridden with ``V4L2_YCBCR_ENC_601``, in which case the BT.601 Y'CbCr encoding is used.h](hThe }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh\ encoding described above is the default for this colorspace, but it can be overridden with }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5, in which case the BT.601 Y’CbCr encoding is used.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hVTwo additional extended gamut Y'CbCr encodings are also possible with this colorspace:h]hXTwo additional extended gamut Y’CbCr encodings are also possible with this colorspace:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXThe xvYCC 709 encoding (``V4L2_YCBCR_ENC_XV709``, :ref:`xvycc`) is similar to the Rec. 709 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset according to the limited range formula:h](hThe xvYCC 709 encoding (}(hj hhhNhNubj)}(h``V4L2_YCBCR_ENC_XV709``h]hV4L2_YCBCR_ENC_XV709}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(hj hhhNhNubh)}(h :ref:`xvycc`h]h)}(hj<h]hxvycc}(hj>hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj:ubah}(h]h ]h"]h$]h&]refdocj refdomainjHreftyperef refexplicitrefwarnjxvyccuh1hhhhKhj ubh) is similar to the Rec. 709 encoding, but it allows for R’, G’ and B’ values that are outside the range [0…1]. The resulting Y’, Cb and Cr values are scaled and offset according to the limited range formula:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hY' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256} Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B') Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B')h]hY' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256} Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B') Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B')}hjdsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKhjhhubh)}(hXThe xvYCC 601 encoding (``V4L2_YCBCR_ENC_XV601``, :ref:`xvycc`) is similar to the BT.601 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset according to the limited range formula:h](hThe xvYCC 601 encoding (}(hjvhhhNhNubj)}(h``V4L2_YCBCR_ENC_XV601``h]hV4L2_YCBCR_ENC_XV601}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh, }(hjvhhhNhNubh)}(h :ref:`xvycc`h]h)}(hjh]hxvycc}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjxvyccuh1hhhhKhjvubh) is similar to the BT.601 encoding, but it allows for R’, G’ and B’ values that are outside the range [0…1]. The resulting Y’, Cb and Cr values are scaled and offset according to the limited range formula:}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hY' = \frac{219}{256} * (0.2990R' + 0.5870G' + 0.1140B') + \frac{16}{256} Cb = \frac{224}{256} * (-0.1687R' - 0.3313G' + 0.5B') Cr = \frac{224}{256} * (0.5R' - 0.4187G' - 0.0813B')h]hY' = \frac{219}{256} * (0.2990R' + 0.5870G' + 0.1140B') + \frac{16}{256} Cb = \frac{224}{256} * (-0.1687R' - 0.3313G' + 0.5B') Cr = \frac{224}{256} * (0.5R' - 0.4187G' - 0.0813B')}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKhjhhubh)}(hXgY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5] and quantized without further scaling or offsets. The non-standard xvYCC 709 or xvYCC 601 encodings can be used by selecting ``V4L2_YCBCR_ENC_XV709`` or ``V4L2_YCBCR_ENC_XV601``. As seen by the xvYCC formulas these encodings always use limited range quantization, there is no full range variant. The whole point of these extended gamut encodings is that values outside the limited range are still valid, although they map to R', G' and B' values outside the [0…1] range and are therefore outside the Rec. 709 colorspace gamut.h](hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5] and quantized without further scaling or offsets. The non-standard xvYCC 709 or xvYCC 601 encodings can be used by selecting }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_XV709``h]hV4L2_YCBCR_ENC_XV709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_XV601``h]hV4L2_YCBCR_ENC_XV601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhXe. As seen by the xvYCC formulas these encodings always use limited range quantization, there is no full range variant. The whole point of these extended gamut encodings is that values outside the limited range are still valid, although they map to R’, G’ and B’ values outside the [0…1] range and are therefore outside the Rec. 709 colorspace gamut.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h .. _col-srgb:h]h}(h]h ]h"]h$]h&]hՌcol-srgbuh1hhKhjhhhhubeh}(h]()colorspace-rec-709-v4l2-colorspace-rec709jeh ]h"](,colorspace rec. 709 (v4l2_colorspace_rec709) col-rec709eh$]h&]uh1hhhhhhhhKYj}jjsj}jjsubh)}(hhh](h)}(h&Colorspace sRGB (V4L2_COLORSPACE_SRGB)h]h&Colorspace sRGB (V4L2_COLORSPACE_SRGB)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe :ref:`srgb` standard defines the colorspace used by most webcams and computer graphics. The default transfer function is ``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range.h](hThe }(hj%hhhNhNubh)}(h :ref:`srgb`h]h)}(hj/h]hsrgb}(hj1hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]refdocj refdomainj;reftyperef refexplicitrefwarnjsrgbuh1hhhhKhj%ubhn standard defines the colorspace used by most webcams and computer graphics. The default transfer function is }(hj%hhhNhNubj)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh#. The default Y’CbCr encoding is }(hj%hhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubh5. The default Y’CbCr quantization is limited range.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXNote that the :ref:`sycc` standard specifies full range quantization, however all current capture hardware supported by the kernel convert R'G'B' to limited range Y'CbCr. So choosing full range as the default would break how applications interpret the quantization range.h](hNote that the }(hj{hhhNhNubh)}(h :ref:`sycc`h]h)}(hjh]hsycc}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjsyccuh1hhhhKhj{ubh standard specifies full range quantization, however all current capture hardware supported by the kernel convert R’G’B’ to limited range Y’CbCr. So choosing full range as the default would break how applications interpret the quantization range.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hEThe chromaticities of the primary colors and the white reference are:h]hEThe chromaticities of the primary colors and the white reference are:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjH)}(hhh](h)}(hsRGB Chromaticitiesh]hsRGB Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjH ubah}(h]h ]h"]h$]h&]uh1jhjE ubj)}(hhh]h)}(h0.640h]h0.640}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj_ ubah}(h]h ]h"]h$]h&]uh1jhjE ubj)}(hhh]h)}(h0.330h]h0.330}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjv ubah}(h]h ]h"]h$]h&]uh1jhjE ubeh}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.300h]h0.300}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.600h]h0.600}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.150h]h0.150}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.060h]h0.060}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjB ubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj2 ubah}(h]h ]h"]h$]h&]uh1jhj/ ubj)}(hhh]h)}(h0.3127h]h0.3127}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjI ubah}(h]h ]h"]h$]h&]uh1jhj/ ubj)}(hhh]h)}(h0.3290h]h0.3290}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj` ubah}(h]h ]h"]h$]h&]uh1jhj/ ubeh}(h]h ]h"]h$]h&]uh1jhjB ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjubeh}(h]id3ah ]h"]h$]h&]uh1jGhjhhhNhNubh)}(h>These chromaticities are identical to the Rec. 709 colorspace.h]h>These chromaticities are identical to the Rec. 709 colorspace.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hZTransfer function. Note that negative values for L are only used by the Y'CbCr conversion.h]h\Transfer function. Note that negative values for L are only used by the Y’CbCr conversion.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hL' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308 L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308 L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1h]hL' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308 L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308 L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1}hj sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhKhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubjJ)}(hL = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045 L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045 L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045h]hL = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045 L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045 L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045}hj sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjhhubh)}(hThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hj hhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh encoding as defined by }(hj hhhNhNubh)}(h :ref:`sycc`h]h)}(hj h]hsycc}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjsyccuh1hhhhM hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubjJ)}(hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'h]hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'}hj# sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhM hjhhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE 170M/BT.601. The Y'CbCr quantization is limited range.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE 170M/BT.601. The Y’CbCr quantization is limited range.}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h.. _col-oprgb:h]h}(h]h ]h"]h$]h&]hՌ col-oprgbuh1hhMhjhhhhubeh}(h]($colorspace-srgb-v4l2-colorspace-srgbjeh ]h"](&colorspace srgb (v4l2_colorspace_srgb)col-srgbeh$]h&]uh1hhhhhhhhKj}jT jsj}jjsubh)}(hhh](h)}(h(Colorspace opRGB (V4L2_COLORSPACE_OPRGB)h]h(Colorspace opRGB (V4L2_COLORSPACE_OPRGB)}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY hhhhhMubh)}(hX The :ref:`oprgb` standard defines the colorspace used by computer graphics that use the opRGB colorspace. The default transfer function is ``V4L2_XFER_FUNC_OPRGB``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range.h](hThe }(hjj hhhNhNubh)}(h :ref:`oprgb`h]h)}(hjt h]hoprgb}(hjv hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjr ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjoprgbuh1hhhhMhjj ubh{ standard defines the colorspace used by computer graphics that use the opRGB colorspace. The default transfer function is }(hjj hhhNhNubj)}(h``V4L2_XFER_FUNC_OPRGB``h]hV4L2_XFER_FUNC_OPRGB}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj ubh#. The default Y’CbCr encoding is }(hjj hhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjj ubh5. The default Y’CbCr quantization is limited range.}(hjj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjY hhubh)}(hXNote that the :ref:`oprgb` standard specifies full range quantization, however all current capture hardware supported by the kernel convert R'G'B' to limited range Y'CbCr. So choosing full range as the default would break how applications interpret the quantization range.h](hNote that the }(hj hhhNhNubh)}(h :ref:`oprgb`h]h)}(hj h]hoprgb}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjoprgbuh1hhhhM$hj ubh standard specifies full range quantization, however all current capture hardware supported by the kernel convert R’G’B’ to limited range Y’CbCr. So choosing full range as the default would break how applications interpret the quantization range.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM$hjY hhubh)}(hEThe chromaticities of the primary colors and the white reference are:h]hEThe chromaticities of the primary colors and the white reference are:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjY hhubjH)}(hhh](h)}(hopRGB Chromaticitiesh]hopRGB Chromaticities}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hj ubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM0hj8 ubah}(h]h ]h"]h$]h&]uh1jhj5 ubj)}(hhh]h)}(hjh]hx}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjO ubah}(h]h ]h"]h$]h&]uh1jhj5 ubj)}(hhh]h)}(hjh]hy}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hje ubah}(h]h ]h"]h$]h&]uh1jhj5 ubeh}(h]h ]h"]h$]h&]uh1jhj2 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.6400h]h0.6400}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.3300h]h0.3300}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.2100h]h0.2100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.7100h]h0.7100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hj, hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj) ubah}(h]h ]h"]h$]h&]uh1jhj& ubj)}(hhh]h)}(h0.1500h]h0.1500}(hjC hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj@ ubah}(h]h ]h"]h$]h&]uh1jhj& ubj)}(hhh]h)}(h0.0600h]h0.0600}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjW ubah}(h]h ]h"]h$]h&]uh1jhj& ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjw ubah}(h]h ]h"]h$]h&]uh1jhjt ubj)}(hhh]h)}(h0.3127h]h0.3127}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj ubah}(h]h ]h"]h$]h&]uh1jhjt ubj)}(hhh]h)}(h0.3290h]h0.3290}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj ubah}(h]h ]h"]h$]h&]uh1jhjt ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jZhj ubeh}(h]id4ah ]h"]h$]h&]uh1jGhjY hhhNhNubh)}(hTransfer function:h]hTransfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjY hhubjJ)}(hL' = L ^{\frac{1}{2.19921875}}h]hL' = L ^{\frac{1}{2.19921875}}}hj sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMDhjY hhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhjY hhubjJ)}(hL = L'^{(2.19921875)}h]hL = L'^{(2.19921875)}}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMJhjY hhubh)}(htThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMNhjY hhubjJ)}(hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'h]hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'}hj6sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMQhjY hhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE 170M/BT.601. The Y'CbCr quantization is limited range.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE 170M/BT.601. The Y’CbCr quantization is limited range.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjY hhubh)}(h.. _col-bt2020:h]h}(h]h ]h"]h$]h&]hՌ col-bt2020uh1hhM^hjY hhhhubeh}(h](&colorspace-oprgb-v4l2-colorspace-oprgbjM eh ]h"]((colorspace oprgb (v4l2_colorspace_oprgb) col-oprgbeh$]h&]uh1hhhhhhhhMj}jgjC sj}jM jC subh)}(hhh](h)}(h+Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)h]h+Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlhhhhhMaubh)}(hXOThe :ref:`itu2020` standard defines the colorspace used by Ultra-high definition television (UHDTV). The default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_BT2020``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThe }(hj}hhhNhNubh)}(h:ref:`itu2020`h]h)}(hjh]hitu2020}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjitu2020uh1hhhhMchj}ubht standard defines the colorspace used by Ultra-high definition television (UHDTV). The default transfer function is }(hj}hhhNhNubj)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh#. The default Y’CbCr encoding is }(hj}hhhNhNubj)}(h``V4L2_YCBCR_ENC_BT2020``h]hV4L2_YCBCR_ENC_BT2020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj}ubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hj}hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMchjlhhubjH)}(hhh](h)}(hBT.2020 Chromaticitiesh]hBT.2020 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohj"ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj8ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhj`ubah}(h]h ]h"]h$]h&]uh1jhj]ubj)}(hhh]h)}(h0.708h]h0.708}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjwubah}(h]h ]h"]h$]h&]uh1jhj]ubj)}(hhh]h)}(h0.292h]h0.292}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjubah}(h]h ]h"]h$]h&]uh1jhj]ubeh}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.170h]h0.170}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.797h]h0.797}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.131h]h0.131}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.046h]h0.046}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj*ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjJubah}(h]h ]h"]h$]h&]uh1jhjGubj)}(hhh]h)}(h0.3127h]h0.3127}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjaubah}(h]h ]h"]h$]h&]uh1jhjGubj)}(hhh]h)}(h0.3290h]h0.3290}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjxubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjubeh}(h]id5ah ]h"]h$]h&]uh1jGhjlhhhNhNubh)}(h%Transfer function (same as Rec. 709):h]h%Transfer function (same as Rec. 709):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjJ)}(haL' = 4.5L\text{, for }0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1h]haL' = 4.5L\text{, for }0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjlhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjJ)}(h}L = L' / 4.5\text{, for } L' < 0.081 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081h]h}L = L' / 4.5\text{, for } L' < 0.081 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjlhhubh)}(hPlease note that while Rec. 709 is defined as the default transfer function by the :ref:`itu2020` standard, in practice this colorspace is often used with the :ref:`xf-smpte-2084`. In particular Ultra HD Blu-ray discs use this combination.h](hSPlease note that while Rec. 709 is defined as the default transfer function by the }(hjhhhNhNubh)}(h:ref:`itu2020`h]h)}(hjh]hitu2020}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjitu2020uh1hhhhMhjubh> standard, in practice this colorspace is often used with the }(hjhhhNhNubh)}(h:ref:`xf-smpte-2084`h]h)}(hjh]h xf-smpte-2084}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftyperef refexplicitrefwarnj xf-smpte-2084uh1hhhhMhjubh<. In particular Ultra HD Blu-ray discs use this combination.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(hwThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_BT2020`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hj?hhhNhNubj)}(h``V4L2_YCBCR_ENC_BT2020``h]hV4L2_YCBCR_ENC_BT2020}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubh encoding:}(hj?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjJ)}(hhY' = 0.2627R' + 0.6780G' + 0.0593B' Cb = -0.1396R' - 0.3604G' + 0.5B' Cr = 0.5R' - 0.4598G' - 0.0402B'h]hhY' = 0.2627R' + 0.6780G' + 0.0593B' Cb = -0.1396R' - 0.3604G' + 0.5B' Cr = 0.5R' - 0.4598G' - 0.0402B'}hj_sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjlhhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y’CbCr quantization is limited range.}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(hqThere is also an alternate constant luminance R'G'B' to Yc'CbcCrc (``V4L2_YCBCR_ENC_BT2020_CONST_LUM``) encoding:h](hKThere is also an alternate constant luminance R’G’B’ to Yc’CbcCrc (}(hjhhhNhNubj)}(h#``V4L2_YCBCR_ENC_BT2020_CONST_LUM``h]hV4L2_YCBCR_ENC_BT2020_CONST_LUM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh ) encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(hLuma:h]hLuma:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubjJ)}(hX\begin{align*} Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\ B' - Yc' \le 0:& \\ &Cbc = (B' - Yc') / 1.9404 \\ B' - Yc' > 0: & \\ &Cbc = (B' - Yc') / 1.5816 \\ R' - Yc' \le 0:& \\ &Crc = (R' - Y') / 1.7184 \\ R' - Yc' > 0:& \\ &Crc = (R' - Y') / 0.9936 \end{align*}h]hX\begin{align*} Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\ B' - Yc' \le 0:& \\ &Cbc = (B' - Yc') / 1.9404 \\ B' - Yc' > 0: & \\ &Cbc = (B' - Yc') / 1.5816 \\ R' - Yc' \le 0:& \\ &Crc = (R' - Y') / 1.7184 \\ R' - Yc' > 0:& \\ &Crc = (R' - Y') / 0.9936 \end{align*}}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjlhhubh)}(hYc' is clamped to the range [0…1] and Cbc and Crc are clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range.h]hYc’ is clamped to the range [0…1] and Cbc and Crc are clamped to the range [-0.5…0.5]. The Yc’CbcCrc quantization is limited range.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjlhhubh)}(h.. _col-dcip3:h]h}(h]h ]h"]h$]h&]hՌ col-dcip3uh1hhMhjlhhhhubeh}(h]()colorspace-bt-2020-v4l2-colorspace-bt2020j`eh ]h"](+colorspace bt.2020 (v4l2_colorspace_bt2020) col-bt2020eh$]h&]uh1hhhhhhhhMaj}jjVsj}j`jVsubh)}(hhh](h)}(h*Colorspace DCI-P3 (V4L2_COLORSPACE_DCI_P3)h]h*Colorspace DCI-P3 (V4L2_COLORSPACE_DCI_P3)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hXThe :ref:`smpte431` standard defines the colorspace used by cinema projectors that use the DCI-P3 colorspace. The default transfer function is ``V4L2_XFER_FUNC_DCI_P3``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_709``. The default Y'CbCr quantization is limited range.h](hThe }(hjhhhNhNubh)}(h:ref:`smpte431`h]h)}(hjh]hsmpte431}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainj reftyperef refexplicitrefwarnjsmpte431uh1hhhhMhjubh| standard defines the colorspace used by cinema projectors that use the DCI-P3 colorspace. The default transfer function is }(hjhhhNhNubj)}(h``V4L2_XFER_FUNC_DCI_P3``h]hV4L2_XFER_FUNC_DCI_P3}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh5. The default Y’CbCr quantization is limited range.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubhnote)}(hNote that this colorspace standard does not specify a Y'CbCr encoding since it is not meant to be encoded to Y'CbCr. So this default Y'CbCr encoding was picked because it is the HDTV encoding.h]h)}(hNote that this colorspace standard does not specify a Y'CbCr encoding since it is not meant to be encoded to Y'CbCr. So this default Y'CbCr encoding was picked because it is the HDTV encoding.h]hNote that this colorspace standard does not specify a Y’CbCr encoding since it is not meant to be encoded to Y’CbCr. So this default Y’CbCr encoding was picked because it is the HDTV encoding.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLubah}(h]h ]h"]h$]h&]uh1jJhjhhhhhNubh)}(hEThe chromaticities of the primary colors and the white reference are:h]hEThe chromaticities of the primary colors and the white reference are:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjH)}(hhh](h)}(hDCI-P3 Chromaticitiesh]hDCI-P3 Chromaticities}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h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hh]h)}(hWhite Referenceh]hWhite Reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3140h]h0.3140}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3510h]h0.3510}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjrubeh}(h]id6ah ]h"]h$]h&]uh1jGhjhhhNhNubh)}(hTransfer function:h]hTransfer function:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjJ)}(hL' = L^{\frac{1}{2.6}}h]hL' = L^{\frac{1}{2.6}}}hjVsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjJ)}(hL = L'^{(2.6)}h]hL = L'^{(2.6)}}hjvsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjhhubh)}(hY’CbCr encoding is not specified. V4L2 defaults to Rec. 709.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(h.. _col-smpte-240m:h]h}(h]h ]h"]h$]h&]hՌcol-smpte-240muh1hhMhjhhhhubeh}(h]((colorspace-dci-p3-v4l2-colorspace-dci-p3jeh ]h"](*colorspace dci-p3 (v4l2_colorspace_dci_p3) col-dcip3eh$]h&]uh1hhhhhhhhMj}jjsj}jjsubh)}(hhh](h)}(h1Colorspace SMPTE 240M (V4L2_COLORSPACE_SMPTE240M)h]h1Colorspace SMPTE 240M (V4L2_COLORSPACE_SMPTE240M)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hX}The :ref:`smpte240m` standard was an interim standard used during the early days of HDTV (1988-1998). It has been superseded by Rec. 709. The default transfer function is ``V4L2_XFER_FUNC_SMPTE240M``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_SMPTE240M``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThe }(hjhhhNhNubh)}(h:ref:`smpte240m`h]h)}(hjh]h smpte240m}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj smpte240muh1hhhhMhjubh standard was an interim standard used during the early days of HDTV (1988-1998). It has been superseded by Rec. 709. The default transfer function is }(hjhhhNhNubj)}(h``V4L2_XFER_FUNC_SMPTE240M``h]hV4L2_XFER_FUNC_SMPTE240M}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_SMPTE240M``h]hV4L2_YCBCR_ENC_SMPTE240M}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjH)}(hhh](h)}(hSMPTE 240M Chromaticitiesh]hSMPTE 240M Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj$ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj$ubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hj$ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h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h$]h&]uh1hhhhMhjjubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3127h]h0.3127}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]colsKuh1jZhjubeh}(h]id7ah ]h"]h$]h&]uh1jGhjhhhNhNubh)}(h@These chromaticities are identical to the SMPTE 170M colorspace.h]h@These chromaticities are identical to the SMPTE 170M colorspace.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hTransfer function:h]hTransfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubjJ)}(hdL' = 4L\text{, for } 0 \le L < 0.0228 L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1h]hdL' = 4L\text{, for } 0 \le L < 0.0228 L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjhhubjJ)}(hL = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913 L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913h]hL = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913 L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913}hj%sbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhM#hjhhubh)}(hzThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_SMPTE240M`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hj7hhhNhNubj)}(h``V4L2_YCBCR_ENC_SMPTE240M``h]hV4L2_YCBCR_ENC_SMPTE240M}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh encoding:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM)hjhhubjJ)}(hhY' = 0.2122R' + 0.7013G' + 0.0865B' Cb = -0.1161R' - 0.3839G' + 0.5B' Cr = 0.5R' - 0.4451G' - 0.0549B'h]hhY' = 0.2122R' + 0.7013G' + 0.0865B' Cb = -0.1161R' - 0.3839G' + 0.5B' Cr = 0.5R' - 0.4451G' - 0.0549B'}hjWsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhM,hjhhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y’CbCr quantization is limited range.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hjhhubh)}(h .. _col-sysm:h]h}(h]h ]h"]h$]h&]hՌcol-sysmuh1hhM8hjhhhhubeh}(h](/colorspace-smpte-240m-v4l2-colorspace-smpte240mjeh ]h"](1colorspace smpte 240m (v4l2_colorspace_smpte240m)col-smpte-240meh$]h&]uh1hhhhhhhhMj}jjsj}jjsubh)}(hhh](h)}(h3Colorspace NTSC 1953 (V4L2_COLORSPACE_470_SYSTEM_M)h]h3Colorspace NTSC 1953 (V4L2_COLORSPACE_470_SYSTEM_M)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM;ubh)}(hXqThis standard defines the colorspace used by NTSC in 1953. In practice this colorspace is obsolete and SMPTE 170M should be used instead. The default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThis standard defines the colorspace used by NTSC in 1953. In practice this colorspace is obsolete and SMPTE 170M should be used instead. The default transfer function is }(hjhhhNhNubj)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM=hjhhubjH)}(hhh](h)}(hNTSC 1953 Chromaticitiesh]hNTSC 1953 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubj[)}(hhh](j`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj`)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1j_hjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj5ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]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h)}(h0.310h]h0.310}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj^ubah}(h]h ]h"]h$]h&]uh1jhjDubj)}(hhh]h)}(h0.316h]h0.316}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjuubah}(h]h ]h"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjubeh}(h]id8ah ]h"]h$]h&]uh1jGhjhhhNhNubjK)}(hThis colorspace uses Illuminant C instead of D65 as the white reference. To correctly convert an image in this colorspace to another that uses D65 you need to apply a chromatic adaptation algorithm such as the Bradford method.h]h)}(hThis colorspace uses Illuminant C instead of D65 as the white reference. To correctly convert an image in this colorspace to another that uses D65 you need to apply a chromatic adaptation algorithm such as the Bradford method.h]hThis colorspace uses Illuminant C instead of D65 as the white reference. To correctly convert an image in this colorspace to another that uses D65 you need to apply a chromatic adaptation algorithm such as the Bradford method.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hjubah}(h]h ]h"]h$]h&]uh1jJhjhhhhhNubh)}(hThe transfer function was never properly defined for NTSC 1953. The Rec. 709 transfer function is recommended in the literature:h]hThe transfer function was never properly defined for NTSC 1953. The Rec. 709 transfer function is recommended in the literature:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMbhjhhubjJ)}(hbL' = 4.5L\text{, for } 0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1h]hbL' = 4.5L\text{, for } 0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMehjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhjhhubjJ)}(hL = \frac{L'}{4.5} \text{, for } L' < 0.081 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081h]hL = \frac{L'}{4.5} \text{, for } L' < 0.081 L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMmhjhhubh)}(htThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshjhhubjJ)}(hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'h]hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMvhjhhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is identical to one defined in SMPTE 170M/BT.601.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y’CbCr quantization is limited range. This transform is identical to one defined in SMPTE 170M/BT.601.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjhhubh)}(h.. _col-sysbg:h]h}(h]h ]h"]h$]h&]hՌ col-sysbguh1hhMhjhhhhubeh}(h](1colorspace-ntsc-1953-v4l2-colorspace-470-system-mjeh ]h"](3colorspace ntsc 1953 (v4l2_colorspace_470_system_m)col-sysmeh$]h&]uh1hhhhhhhhM;j}jOjwsj}jjwsubh)}(hhh](h)}(h9Colorspace EBU Tech. 3213 (V4L2_COLORSPACE_470_SYSTEM_BG)h]h9Colorspace EBU Tech. 3213 (V4L2_COLORSPACE_470_SYSTEM_BG)}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjThhhhhMubh)}(hXThe :ref:`tech3213` standard defines the colorspace used by PAL/SECAM in 1975. Note that this colorspace is not supported by the HDMI interface. Instead :ref:`tech3321` recommends that Rec. 709 is used instead for HDMI. The default transfer function is ``V4L2_XFER_FUNC_709``. The default Y'CbCr encoding is ``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:h](hThe }(hjehhhNhNubh)}(h:ref:`tech3213`h]h)}(hjoh]htech3213}(hjqhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&]refdocj refdomainj{reftyperef refexplicitrefwarnjtech3213uh1hhhhMhjeubh standard defines the colorspace used by PAL/SECAM in 1975. Note that this colorspace is not supported by the HDMI interface. Instead }(hjehhhNhNubh)}(h:ref:`tech3321`h]h)}(hjh]htech3321}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnjtech3321uh1hhhhMhjeubhU recommends that Rec. 709 is used instead for HDMI. The default transfer function is }(hjehhhNhNubj)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh#. The default Y’CbCr encoding is }(hjehhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjeubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hjehhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjThhubjH)}(hhh](h)}(hEBU Tech. 3213 Chromaticitiesh]hEBU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hhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjfubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.15h]h0.15}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.06h]h0.06}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjfubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjVubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hhh]h)}(h0.3127h]h0.3127}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jZhjubeh}(h]id9ah ]h"]h$]h&]uh1jGhjThhhNhNubh)}(hThe transfer function was never properly defined for this colorspace. The Rec. 709 transfer function is recommended in the literature:h]hThe transfer function was never properly defined for this colorspace. The Rec. 709 transfer function is recommended in the literature:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubjJ)}(hbL' = 4.5L\text{, for } 0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1h]hbL' = 4.5L\text{, for } 0 \le L < 0.018 L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjThhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubjJ)}(hL = \frac{L'}{4.5} \text{, for } L' < 0.081 L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081h]hL = \frac{L'}{4.5} \text{, for } L' < 0.081 L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjThhubh)}(htThe luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding:h](hVThe luminance (Y’) and color difference (Cb and Cr) are obtained with the following }(hjhhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjThhubjJ)}(hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'h]hhY' = 0.2990R' + 0.5870G' + 0.1140B' Cb = -0.1687R' - 0.3313G' + 0.5B' Cr = 0.5R' - 0.4187G' - 0.0813B'}hjsbah}(h]h ]h"]h$]h&]docnamejnumberNlabelNnowraphhuh1jIhhhMhjThhubh)}(hY' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is identical to one defined in SMPTE 170M/BT.601.h]hY’ is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y’CbCr quantization is limited range. This transform is identical to one defined in SMPTE 170M/BT.601.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjThhubh)}(h .. _col-jpeg:h]h}(h]h ]h"]h$]h&]hՌcol-jpeguh1hhMhjThhhhubeh}(h](6colorspace-ebu-tech-3213-v4l2-colorspace-470-system-bgjHeh ]h"](9colorspace ebu tech. 3213 (v4l2_colorspace_470_system_bg) col-sysbgeh$]h&]uh1hhhhhhhhMj}jFj>sj}jHj>subh)}(hhh](h)}(h&Colorspace JPEG (V4L2_COLORSPACE_JPEG)h]h&Colorspace JPEG (V4L2_COLORSPACE_JPEG)}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhMubh)}(hXThis colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities of the primary colors and the white reference are identical to sRGB. The transfer function use is ``V4L2_XFER_FUNC_SRGB``. The Y'CbCr encoding is ``V4L2_YCBCR_ENC_601`` with full range quantization where Y' is scaled to [0…255] and Cb/Cr are scaled to [-128…128] and then clipped to [-128…127].h](hThis colorspace defines the colorspace used by most (Motion-)JPEG formats. The chromaticities of the primary colors and the white reference are identical to sRGB. The transfer function use is }(hj\hhhNhNubj)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh. The Y’CbCr encoding is }(hj\hhhNhNubj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh with full range quantization where Y’ is scaled to [0…255] and Cb/Cr are scaled to [-128…128] and then clipped to [-128…127].}(hj\hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjKhhubjK)}(hXiThe JPEG standard does not actually store colorspace information. So if something other than sRGB is used, then the driver will have to set that information explicitly. Effectively ``V4L2_COLORSPACE_JPEG`` can be considered to be an abbreviation for ``V4L2_COLORSPACE_SRGB``, ``V4L2_XFER_FUNC_SRGB``, ``V4L2_YCBCR_ENC_601`` and ``V4L2_QUANTIZATION_FULL_RANGE``.h]h)}(hXiThe JPEG standard does not actually store colorspace information. So if something other than sRGB is used, then the driver will have to set that information explicitly. Effectively ``V4L2_COLORSPACE_JPEG`` can be considered to be an abbreviation for ``V4L2_COLORSPACE_SRGB``, ``V4L2_XFER_FUNC_SRGB``, ``V4L2_YCBCR_ENC_601`` and ``V4L2_QUANTIZATION_FULL_RANGE``.h](hThe JPEG standard does not actually store colorspace information. So if something other than sRGB is used, then the driver will have to set that information explicitly. Effectively }(hjhhhNhNubj)}(h``V4L2_COLORSPACE_JPEG``h]hV4L2_COLORSPACE_JPEG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- can be considered to be an abbreviation for }(hjhhhNhNubj)}(h``V4L2_COLORSPACE_SRGB``h]hV4L2_COLORSPACE_SRGB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``V4L2_QUANTIZATION_FULL_RANGE``h]hV4L2_QUANTIZATION_FULL_RANGE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jJhjKhhhhhNubeh}(h]($colorspace-jpeg-v4l2-colorspace-jpegj?eh ]h"](&colorspace jpeg (v4l2_colorspace_jpeg)col-jpegeh$]h&]uh1hhhhhhhhMj}jj5sj}j?j5subeh}(h] detailed-colorspace-descriptionsah ]h"] detailed colorspace descriptionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h'Detailed Transfer Function Descriptionsh]h'Detailed Transfer Function Descriptions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(h.. _xf-smpte-2084:h]h}(h]h ]h"]h$]h&]hՌ xf-smpte-2084uh1hhMhjhhhhubh)}(hhh](h)}(h7Transfer Function SMPTE 2084 (V4L2_XFER_FUNC_SMPTE2084)h]h7Transfer Function SMPTE 2084 (V4L2_XFER_FUNC_SMPTE2084)}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhMubh)}(h_The :ref:`smpte2084` standard defines the transfer function used by High Dynamic Range content.h](hThe }(hj@hhhNhNubh)}(h:ref:`smpte2084`h]h)}(hjJh]h smpte2084}(hjLhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhjHubah}(h]h ]h"]h$]h&]refdocj refdomainjVreftyperef refexplicitrefwarnj smpte2084uh1hhhhMhj@ubhK standard defines the transfer function used by High Dynamic Range content.}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubhdefinition_list)}(hhh](hdefinition_list_item)}(hConstants: m1 = (2610 / 4096) / 4 m2 = (2523 / 4096) * 128 c1 = 3424 / 4096 c2 = (2413 / 4096) * 32 c3 = (2392 / 4096) * 32 h](hterm)}(h Constants:h]h Constants:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hhhMhjyubh definition)}(hhh](h)}(hm1 = (2610 / 4096) / 4h]hm1 = (2610 / 4096) / 4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hm2 = (2523 / 4096) * 128h]hm2 = (2523 / 4096) * 128}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hc1 = 3424 / 4096h]hc1 = 3424 / 4096}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hc2 = (2413 / 4096) * 32h]hc2 = (2413 / 4096) * 32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hc3 = (2392 / 4096) * 32h]hc3 = (2392 / 4096) * 32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]uh1jwhhhMhjtubjx)}(hXTransfer function: L' = ((c1 + c2 * L\ :sup:`m1`) / (1 + c3 * L\ :sup:`m1`))\ :sup:`m2` h](j~)}(hTransfer function:h]hTransfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hhhMhjubj)}(hhh]h)}(hDL' = ((c1 + c2 * L\ :sup:`m1`) / (1 + c3 * L\ :sup:`m1`))\ :sup:`m2`h](hL’ = ((c1 + c2 * L }(hjhhhNhNubh superscript)}(h :sup:`m1`h]hm1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) / (1 + c3 * L }(hjhhhNhNubj)}(h :sup:`m1`h]hm1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh)) }(hjhhhNhNubj)}(h :sup:`m2`h]hm2}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jwhhhMhjthhubjx)}(hgInverse Transfer function: L = (max(L':sup:`1/m2` - c1, 0) / (c2 - c3 * L'\ :sup:`1/m2`))\ :sup:`1/m1` h](j~)}(hInverse Transfer function:h]hInverse Transfer function:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j}hhhMhjGubj)}(hhh]h)}(hKL = (max(L':sup:`1/m2` - c1, 0) / (c2 - c3 * L'\ :sup:`1/m2`))\ :sup:`1/m1`h](h L = (max(L’}(hj\hhhNhNubj)}(h :sup:`1/m2`h]h1/m2}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh - c1, 0) / (c2 - c3 * L’ }(hj\hhhNhNubj)}(h :sup:`1/m2`h]h1/m2}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubh)) }(hj\hhhNhNubj)}(h :sup:`1/m1`h]h1/m1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(h]h ]h"]h$]h&]uh1jwhhhMhjthhubeh}(h]h ]h"]h$]h&]uh1jrhj/hhhhhNubh)}(hX=Take care when converting between this transfer function and non-HDR transfer functions: the linear RGB values [0…1] of HDR content map to a luminance range of 0 to 10000 cd/m\ :sup:`2` whereas the linear RGB values of non-HDR (aka Standard Dynamic Range or SDR) map to a luminance range of 0 to 100 cd/m\ :sup:`2`.h](hTake care when converting between this transfer function and non-HDR transfer functions: the linear RGB values [0…1] of HDR content map to a luminance range of 0 to 10000 cd/m }(hjhhhNhNubj)}(h:sup:`2`h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhy whereas the linear RGB values of non-HDR (aka Standard Dynamic Range or SDR) map to a luminance range of 0 to 100 cd/m }(hjhhhNhNubj)}(h:sup:`2`h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubh)}(hTo go from SDR to HDR you will have to divide L by 100 first. To go in the other direction you will have to multiply L by 100. Of course, this clamps all luminance values over 100 cd/m\ :sup:`2` to 100 cd/m\ :sup:`2`.h](hTo go from SDR to HDR you will have to divide L by 100 first. To go in the other direction you will have to multiply L by 100. Of course, this clamps all luminance values over 100 cd/m }(hjhhhNhNubj)}(h:sup:`2`h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to 100 cd/m }(hjhhhNhNubj)}(h:sup:`2`h]h2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubh)}(hZThere are better methods, see e.g. :ref:`colimg` for more in-depth information about this.h](h#There are better methods, see e.g. }(hj hhhNhNubh)}(h :ref:`colimg`h]h)}(hj h]hcolimg}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj( reftyperef refexplicitrefwarnjcolimguh1hhhhMhj ubh* for more in-depth information about this.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj/hhubeh}(h](5transfer-function-smpte-2084-v4l2-xfer-func-smpte2084j.eh ]h"](7transfer function smpte 2084 (v4l2_xfer_func_smpte2084) xf-smpte-2084eh$]h&]uh1hhjhhhhhMj}jJ j$sj}j.j$subeh}(h]'detailed-transfer-function-descriptionsah ]h"]'detailed transfer function descriptionsah$]h&]uh1hhhhhhhhMubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjy error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}(h]haj]jaj]jajM ]jC aj`]jVaj]jaj]jaj]jwajH]j>aj?]j5aj.]j$aunameids}(jj jhjjjjjj jT jjS jP jgjM jfjcjj`jjjjjjjjjjjOjjNjKjFjHjEjBjj?jjjT jQ jJ j.jI jF u nametypes}(jjjjjjT jS jgjfjjjjjjjOjNjFjEjjjT jJ jI uh}(j hhhjhjjj jjjjP jjM jY jcjY j`jljjljjjjjjjjjjjKjjHjTjBjTj?jKjjKjQ jj.j/jF j/j(jIj?jnj jj j jjjCjrjjjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}j K sRparse_messages]transform_messages](hsystem_message)}(hhh]h)}(hhh]h4Hyperlink target "col-smpte-170m" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j ubj )}(hhh]h)}(hhh]h0Hyperlink target "col-rec709" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehlineKVuh1j ubj )}(hhh]h)}(hhh]h.Hyperlink target "col-srgb" is not referenced.}hj"!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehlineKuh1j ubj )}(hhh]h)}(hhh]h/Hyperlink target "col-oprgb" is not referenced.}hj