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]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget?/translations/pt_BR/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-170muh1hhK hhhhhhubh)}(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)}(hjh]h smpte170m}(hj hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdoc+userspace-api/media/v4l/colorspaces-details refdomainjreftyperef refexplicitrefwarn reftarget smpte170muh1hhhhKhhubho 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}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hhubh#. The default Y’CbCr encoding is }(hhhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j/hhubh{. 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&]uh1hhhhKhhhhubhtable)}(hhh](h)}(hSMPTE 170M Chromaticitiesh]hSMPTE 170M Chromaticities}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj]ubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjpubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjpubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjpubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hxh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hyh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjpubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.630h]h0.630}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.340h]h0.340}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj&ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjFubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]h)}(h0.310h]h0.310}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hj]ubah}(h]h ]h"]h$]h&]uh1jhjCubj)}(hhh]h)}(h0.595h]h0.595}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjtubah}(h]h ]h"]h$]h&]uh1jhjCubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.155h]h0.155}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.070h]h0.070}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(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&]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&]uh1jhjpubeh}(h]h ]h"]h$]h&]colsKuh1jnhj]ubeh}(h]id1ah ]h"]h$]h&]uh1j[hhhhhNhNubh)}(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.}(hjAhhhNhNubah}(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.}(hjOhhhNhNubah}(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}hj_sbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhK1hhhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hhhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhK;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 }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChhhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhKFhhhhubh)}(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]j )}(hjh]hitu601}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)itu601uh1hhhhKNhjubhz 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&]uh1hhhhKNhhhhubh)}(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&]uh1hhhhKShhhhubh)}(h.. _col-rec709:h]h}(h]h ]h"]h$]h&]h col-rec709uh1hhKWhhhhhhubeh}(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)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKZubh)}(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 }(hj,hhhNhNubh)}(h :ref:`itu709`h]j )}(hj6h]hitu709}(hj8hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj4ubah}(h]h ]h"]h$]h&]refdocj# refdomainjBreftyperef refexplicitrefwarnj)itu709uh1hhhhK\hj,ubh[ standard defines the colorspace used by HDTV in general. The default transfer function is }(hj,hhhNhNubj0)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj,ubh#. The default Y’CbCr encoding is }(hj,hhhNhNubj0)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj,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&]uh1hhhhK\hjhhubj\)}(hhh](h)}(hRec. 709 Chromaticitiesh]hRec. 709 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(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&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.640h]h0.640}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhj&ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.330h]h0.330}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj=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&]uh1hhhhKmhj]ubah}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh]h)}(h0.300h]h0.300}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjtubah}(h]h ]h"]h$]h&]uh1jhjZubj)}(hhh]h)}(h0.600h]h0.600}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjZubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.150h]h0.150}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.060h]h0.060}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3127h]h0.3127}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3290h]h0.3290}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj'ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id2ah ]h"]h$]h&]uh1j[hjhhhNhNubh)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjhhubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjhhubj^)}(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}hjtsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhK}hjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhKhjhhubh)}(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 }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhKhjhhubh)}(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 }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh\ encoding described above is the default for this colorspace, but it can be overridden with }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh5, 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:}(hj&hhhNhNubah}(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 (}(hj4hhhNhNubj0)}(h``V4L2_YCBCR_ENC_XV709``h]hV4L2_YCBCR_ENC_XV709}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj4ubh, }(hj4hhhNhNubh)}(h :ref:`xvycc`h]j )}(hjPh]hxvycc}(hjRhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjNubah}(h]h ]h"]h$]h&]refdocj# refdomainj\reftyperef refexplicitrefwarnj)xvyccuh1hhhhKhj4ubh) 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:}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj^)}(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')}hjxsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhKhjhhubh)}(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 (}(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_XV601``h]hV4L2_YCBCR_ENC_XV601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh, }(hjhhhNhNubh)}(h :ref:`xvycc`h]j )}(hjh]hxvycc}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)xvyccuh1hhhhKhjubh) 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:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhKhjhhubh)}(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 }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_XV709``h]hV4L2_YCBCR_ENC_XV709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh or }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_XV601``h]hV4L2_YCBCR_ENC_XV601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubhXe. 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&]hcol-srgbuh1hhKhjhhhhubeh}(h]()colorspace-rec-709-v4l2-colorspace-rec709j eh ]h"](,colorspace rec. 709 (v4l2_colorspace_rec709) col-rec709eh$]h&]uh1hhhhhhhhKZj}j#jsj}j jsubh)}(hhh](h)}(h&Colorspace sRGB (V4L2_COLORSPACE_SRGB)h]h&Colorspace sRGB (V4L2_COLORSPACE_SRGB)}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(hhhhhKubh)}(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 }(hj9hhhNhNubh)}(h :ref:`srgb`h]j )}(hjCh]hsrgb}(hjEhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjAubah}(h]h ]h"]h$]h&]refdocj# refdomainjOreftyperef refexplicitrefwarnj)srgbuh1hhhhKhj9ubhn standard defines the colorspace used by most webcams and computer graphics. The default transfer function is }(hj9hhhNhNubj0)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj9ubh#. The default Y’CbCr encoding is }(hj9hhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj9ubh5. The default Y’CbCr quantization is limited range.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj(hhubh)}(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 }(hjhhhNhNubh)}(h :ref:`sycc`h]j )}(hjh]hsycc}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)syccuh1hhhhKhjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj(hhubh)}(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&]uh1hhhhKhj(hhubj\)}(hhh](h)}(hsRGB Chromaticitiesh]hsRGB Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hjh]hx}(hj! hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hjh]hy}(hj7 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj4 ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj\ ubah}(h]h ]h"]h$]h&]uh1jhjY ubj)}(hhh]h)}(h0.640h]h0.640}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjs ubah}(h]h ]h"]h$]h&]uh1jhjY ubj)}(hhh]h)}(h0.330h]h0.330}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjY ubeh}(h]h ]h"]h$]h&]uh1jhjV 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&]uh1jhjV 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&]uh1jhjV ubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjF ubah}(h]h ]h"]h$]h&]uh1jhjC ubj)}(hhh]h)}(h0.3127h]h0.3127}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj] ubah}(h]h ]h"]h$]h&]uh1jhjC ubj)}(hhh]h)}(h0.3290h]h0.3290}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjt ubah}(h]h ]h"]h$]h&]uh1jhjC ubeh}(h]h ]h"]h$]h&]uh1jhjV ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id3ah ]h"]h$]h&]uh1j[hj(hhhNhNubh)}(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&]uh1hhhhKhj(hhubh)}(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&]uh1hhhhKhj(hhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhKhj(hhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhj(hhubh)}(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 hhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj ubh encoding as defined by }(hj hhhNhNubh)}(h :ref:`sycc`h]j )}(hj h]hsycc}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj# refdomainj reftyperef refexplicitrefwarnj)syccuh1hhhhM hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj(hhubj^)}(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'}hj7 sbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhM hj(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.}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(hhubh)}(h.. _col-oprgb:h]h}(h]h ]h"]h$]h&]h col-oprgbuh1hhMhj(hhhhubeh}(h]($colorspace-srgb-v4l2-colorspace-srgbjeh ]h"](&colorspace srgb (v4l2_colorspace_srgb)col-srgbeh$]h&]uh1hhhhhhhhKj}jh jsj}jjsubh)}(hhh](h)}(h(Colorspace opRGB (V4L2_COLORSPACE_OPRGB)h]h(Colorspace opRGB (V4L2_COLORSPACE_OPRGB)}(hjp hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjm 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 }(hj~ hhhNhNubh)}(h :ref:`oprgb`h]j )}(hj h]hoprgb}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj# refdomainj reftyperef refexplicitrefwarnj)oprgbuh1hhhhMhj~ ubh{ standard defines the colorspace used by computer graphics that use the opRGB colorspace. The default transfer function is }(hj~ hhhNhNubj0)}(h``V4L2_XFER_FUNC_OPRGB``h]hV4L2_XFER_FUNC_OPRGB}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj~ ubh#. The default Y’CbCr encoding is }(hj~ hhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj~ ubh5. The default Y’CbCr quantization is limited range.}(hj~ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjm 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]j )}(hj h]hoprgb}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocj# refdomainj reftyperef refexplicitrefwarnj)oprgbuh1hhhhM%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%hjm 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*hjm hhubj\)}(hhh](h)}(hopRGB Chromaticitiesh]hopRGB Chromaticities}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hj ubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj% ubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj% ubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj% ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjL ubah}(h]h ]h"]h$]h&]uh1jhjI ubj)}(hhh]h)}(hjh]hx}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjc ubah}(h]h ]h"]h$]h&]uh1jhjI ubj)}(hhh]h)}(hjh]hy}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjy ubah}(h]h ]h"]h$]h&]uh1jhjI ubeh}(h]h ]h"]h$]h&]uh1jhjF ubah}(h]h ]h"]h$]h&]uh1jhj% ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM4hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.6400h]h0.6400}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.3300h]h0.3300}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hj 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&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.2100h]h0.2100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.7100h]h0.7100}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hj 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&]uh1hhhhM:hj= ubah}(h]h ]h"]h$]h&]uh1jhj: ubj)}(hhh]h)}(h0.1500h]h0.1500}(hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjT ubah}(h]h ]h"]h$]h&]uh1jhj: ubj)}(hhh]h)}(h0.0600h]h0.0600}(hjn hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjk 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)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.3127h]h0.3127}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.3290h]h0.3290}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj% ubeh}(h]h ]h"]h$]h&]colsKuh1jnhj ubeh}(h]id4ah ]h"]h$]h&]uh1j[hjm hhhNhNubh)}(hTransfer function:h]hTransfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjm hhubj^)}(hL' = L ^{\frac{1}{2.19921875}}h]hL' = L ^{\frac{1}{2.19921875}}}hj sbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMEhjm hhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjm hhubj^)}(hL = L'^{(2.19921875)}h]hL = L'^{(2.19921875)}}hjsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMKhjm 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 }(hj*hhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj*ubh encoding:}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMOhjm hhubj^)}(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'}hjJsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMRhjm 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.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjm hhubh)}(h.. _col-bt2020:h]h}(h]h ]h"]h$]h&]h col-bt2020uh1hhM_hjm hhhhubeh}(h](&colorspace-oprgb-v4l2-colorspace-oprgbja eh ]h"]((colorspace oprgb (v4l2_colorspace_oprgb) col-oprgbeh$]h&]uh1hhhhhhhhMj}j{jW sj}ja jW subh)}(hhh](h)}(h+Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)h]h+Colorspace BT.2020 (V4L2_COLORSPACE_BT2020)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMbubh)}(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 }(hjhhhNhNubh)}(h:ref:`itu2020`h]j )}(hjh]hitu2020}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)itu2020uh1hhhhMdhjubht standard defines the colorspace used by Ultra-high definition television (UHDTV). The default transfer function is }(hjhhhNhNubj0)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_BT2020``h]hV4L2_YCBCR_ENC_BT2020}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh{. 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&]uh1hhhhMdhjhhubj\)}(hhh](h)}(hBT.2020 Chromaticitiesh]hBT.2020 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphj6ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjLubah}(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}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjtubah}(h]h ]h"]h$]h&]uh1jhjqubj)}(hhh]h)}(h0.708h]h0.708}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjubah}(h]h ]h"]h$]h&]uh1jhjqubj)}(hhh]h)}(h0.292h]h0.292}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjubah}(h]h ]h"]h$]h&]uh1jhjqubeh}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.170h]h0.170}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.797h]h0.797}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.131h]h0.131}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhj'ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.046h]h0.046}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhj>ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh](j)}(hhh]h)}(hWhite Reference (D65)h]hWhite Reference (D65)}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hj^ubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(h0.3127h]h0.3127}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjuubah}(h]h ]h"]h$]h&]uh1jhj[ubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id5ah ]h"]h$]h&]uh1j[hjhhhNhNubh)}(h%Transfer function (same as Rec. 709):h]h%Transfer function (same as Rec. 709):}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(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]j )}(hjh]hitu2020}(hj hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)itu2020uh1hhhhMhjubh> standard, in practice this colorspace is often used with the }(hjhhhNhNubh)}(h:ref:`xf-smpte-2084`h]j )}(hj+h]h xf-smpte-2084}(hj-hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj)ubah}(h]h ]h"]h$]h&]refdocj# refdomainj7reftyperef refexplicitrefwarnj) xf-smpte-2084uh1hhhhMhjubh<. In particular Ultra HD Blu-ray discs use this combination.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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 }(hjShhhNhNubj0)}(h``V4L2_YCBCR_ENC_BT2020``h]hV4L2_YCBCR_ENC_BT2020}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjSubh encoding:}(hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(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'}hjssbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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 (}(hjhhhNhNubj0)}(h#``V4L2_YCBCR_ENC_BT2020_CONST_LUM``h]hV4L2_YCBCR_ENC_BT2020_CONST_LUM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh ) encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(hLuma:h]hLuma:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(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&]uh1hhhhMhjhhubh)}(h.. _col-dcip3:h]h}(h]h ]h"]h$]h&]h col-dcip3uh1hhMhjhhhhubeh}(h]()colorspace-bt-2020-v4l2-colorspace-bt2020jteh ]h"](+colorspace bt.2020 (v4l2_colorspace_bt2020) col-bt2020eh$]h&]uh1hhhhhhhhMbj}jjjsj}jtjjsubh)}(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]j )}(hjh]hsmpte431}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)smpte431uh1hhhhMhjubh| standard defines the colorspace used by cinema projectors that use the DCI-P3 colorspace. The default transfer function is }(hjhhhNhNubj0)}(h``V4L2_XFER_FUNC_DCI_P3``h]hV4L2_XFER_FUNC_DCI_P3}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_709``h]hV4L2_YCBCR_ENC_709}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh5. 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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj`ubah}(h]h ]h"]h$]h&]uh1j^hjhhhhhNubh)}(hEThe chromaticities of the primary colors and the white reference are:h]hEThe chromaticities of the primary colors and the white reference are:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj\)}(hhh](h)}(hDCI-P3 Chromaticitiesh]hDCI-P3 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(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)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.6800h]h0.6800}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj*ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.3200h]h0.3200}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjAubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjaubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hhh]h)}(h0.2650h]h0.2650}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubah}(h]h ]h"]h$]h&]uh1jhj^ubj)}(hhh]h)}(h0.6900h]h0.6900}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.1500h]h0.1500}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.0600h]h0.0600}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]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}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id6ah ]h"]h$]h&]uh1j[hjhhhNhNubh)}(hTransfer function:h]hTransfer function:}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(hL' = L^{\frac{1}{2.6}}h]hL' = L^{\frac{1}{2.6}}}hjjsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(hL = L'^{(2.6)}h]hL = L'^{(2.6)}}hjsbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(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&]hcol-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]j )}(hjh]h smpte240m}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(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 }(hjhhhNhNubj0)}(h``V4L2_XFER_FUNC_SMPTE240M``h]hV4L2_XFER_FUNC_SMPTE240M}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_SMPTE240M``h]hV4L2_YCBCR_ENC_SMPTE240M}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh{. 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&]uh1hhhhMhjhhubj\)}(hhh](h)}(hSMPTE 240M Chromaticitiesh]hSMPTE 240M Chromaticities}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj'ubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj8ubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj8ubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshj8ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj_ubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(hjh]hx}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjvubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(hjh]hy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjYubah}(h]h ]h"]h$]h&]uh1jhj8ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.630h]h0.630}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.340h]h0.340}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.310h]h0.310}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.595h]h0.595}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjPubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(hhh]h)}(h0.155h]h0.155}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjgubah}(h]h ]h"]h$]h&]uh1jhjMubj)}(hhh]h)}(h0.070h]h0.070}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj~ubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(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&]uh1jhj8ubeh}(h]h ]h"]h$]h&]colsKuh1jnhj'ubeh}(h]id7ah ]h"]h$]h&]uh1j[hjhhhNhNubh)}(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:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjhhubj^)}(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}hj9sbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhM$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 }(hjKhhhNhNubj0)}(h``V4L2_YCBCR_ENC_SMPTE240M``h]hV4L2_YCBCR_ENC_SMPTE240M}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjKubh encoding:}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM*hjhhubj^)}(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'}hjksbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhM-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.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjhhubh)}(h .. _col-sysm:h]h}(h]h ]h"]h$]h&]hcol-sysmuh1hhM9hjhhhhubeh}(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 }(hjhhhNhNubj0)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh#. The default Y’CbCr encoding is }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh{. 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>hjhhubj\)}(hhh](h)}(hNTSC 1953 Chromaticitiesh]hNTSC 1953 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hx}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhj3ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hjh]hy}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjIubah}(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}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhjqubah}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh]h)}(h0.67h]h0.67}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhjubah}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh]h)}(h0.33h]h0.33}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubah}(h]h ]h"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]uh1jhjkubj)}(hhh](j)}(hhh]h)}(hGreenh]hGreen}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.21h]h0.21}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.71h]h0.71}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjkubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.14h]h0.14}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhj$ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h0.08h]h0.08}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhj;ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjkubj)}(hhh](j)}(hhh]h)}(hWhite Reference (C)h]hWhite Reference (C)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj[ubah}(h]h ]h"]h$]h&]uh1jhjXubj)}(hhh]h)}(h0.310h]h0.310}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjrubah}(h]h ]h"]h$]h&]uh1jhjXubj)}(hhh]h)}(h0.316h]h0.316}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jhjkubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id8ah ]h"]h$]h&]uh1j[hjhhhNhNubj_)}(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&]uh1j^hjhhhhhNubh)}(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&]uh1hhhhMchjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMfhjhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMnhjhhubh)}(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 }(hjhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh encoding:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMthjhhubj^)}(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'}hj2sbah}(h]h ]h"]h$]h&]docnamej#numberNlabelNnowraphhuh1j]hhhMwhjhhubh)}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhubh)}(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}jcjsj}jjsubh)}(hhh](h)}(h9Colorspace EBU Tech. 3213 (V4L2_COLORSPACE_470_SYSTEM_BG)h]h9Colorspace EBU Tech. 3213 (V4L2_COLORSPACE_470_SYSTEM_BG)}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhhMubh)}(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 }(hjyhhhNhNubh)}(h:ref:`tech3213`h]j )}(hjh]htech3213}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)tech3213uh1hhhhMhjyubh standard defines the colorspace used by PAL/SECAM in 1975. Note that this colorspace is not supported by the HDMI interface. Instead }(hjyhhhNhNubh)}(h:ref:`tech3321`h]j )}(hjh]htech3321}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj# refdomainjreftyperef refexplicitrefwarnj)tech3321uh1hhhhMhjyubhU recommends that Rec. 709 is used instead for HDMI. The default transfer function is }(hjyhhhNhNubj0)}(h``V4L2_XFER_FUNC_709``h]hV4L2_XFER_FUNC_709}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjyubh#. The default Y’CbCr encoding is }(hjyhhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjyubh{. The default Y’CbCr quantization is limited range. The chromaticities of the primary colors and the white reference are:}(hjyhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubj\)}(hhh](h)}(hEBU Tech. 3213 Chromaticitiesh]hEBU Tech. 3213 Chromaticities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubjo)}(hhh](jt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubjt)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jshjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hColorh]hColor}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hjh]hx}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jhj(ubj)}(hhh]h)}(hjh]hy}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjXubah}(h]h ]h"]h$]h&]uh1jhj(ubeh}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hRedh]hRed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(h0.64h]h0.64}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(h0.33h]h0.33}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(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&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.29h]h0.29}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.60h]h0.60}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjzubj)}(hhh](j)}(hhh]h)}(hBlueh]hBlue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.15h]h0.15}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj3ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h0.06h]h0.06}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJubah}(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&]uh1hhhhMhjjubah}(h]h ]h"]h$]h&]uh1jhjgubj)}(hhh]h)}(h0.3127h]h0.3127}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjgubj)}(hhh]h)}(h0.3290h]h0.3290}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjgubeh}(h]h ]h"]h$]h&]uh1jhjzubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jnhjubeh}(h]id9ah ]h"]h$]h&]uh1j[hjhhhhNhNubh)}(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&]uh1hhhhMhjhhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhhubh)}(hInverse Transfer function:h]hInverse Transfer function:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhhubh)}(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 hhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hj ubh encoding:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjhhhubj^)}(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&]docnamej#numberNlabelNnowraphhuh1j]hhhMhjhhhubh)}(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&]uh1hhhhMhjhhhubh)}(h .. _col-jpeg:h]h}(h]h ]h"]h$]h&]hcol-jpeguh1hhMhjhhhhhubeh}(h](6colorspace-ebu-tech-3213-v4l2-colorspace-470-system-bgj\eh ]h"](9colorspace ebu tech. 3213 (v4l2_colorspace_470_system_bg) col-sysbgeh$]h&]uh1hhhhhhhhMj}jZjRsj}j\jRsubh)}(hhh](h)}(h&Colorspace JPEG (V4L2_COLORSPACE_JPEG)h]h&Colorspace JPEG (V4L2_COLORSPACE_JPEG)}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hhhhhMubh)}(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 }(hjphhhNhNubj0)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjpubh. The Y’CbCr encoding is }(hjphhhNhNubj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjpubh 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].}(hjphhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj_hhubj_)}(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 }(hjhhhNhNubj0)}(h``V4L2_COLORSPACE_JPEG``h]hV4L2_COLORSPACE_JPEG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh- can be considered to be an abbreviation for }(hjhhhNhNubj0)}(h``V4L2_COLORSPACE_SRGB``h]hV4L2_COLORSPACE_SRGB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh, }(hjhhhNhNubj0)}(h``V4L2_XFER_FUNC_SRGB``h]hV4L2_XFER_FUNC_SRGB}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh, }hjsbj0)}(h``V4L2_YCBCR_ENC_601``h]hV4L2_YCBCR_ENC_601}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh and }(hjhhhNhNubj0)}(h ``V4L2_QUANTIZATION_FULL_RANGE``h]hV4L2_QUANTIZATION_FULL_RANGE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j/hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j^hj_hhhhhNubeh}(h]($colorspace-jpeg-v4l2-colorspace-jpegjSeh ]h"](&colorspace jpeg (v4l2_colorspace_jpeg)col-jpegeh$]h&]uh1hhhhhhhhMj}jjIsj}jSjIsubeh}(h] detailed-colorspace-descriptionsah ]h"] detailed colorspace descriptionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h'Detailed Transfer Function Descriptionsh]h'Detailed Transfer Function Descriptions}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhMubh)}(h.. _xf-smpte-2084:h]h}(h]h ]h"]h$]h&]h xf-smpte-2084uh1hhMhj'hhhhubh)}(hhh](h)}(h7Transfer Function SMPTE 2084 (V4L2_XFER_FUNC_SMPTE2084)h]h7Transfer Function SMPTE 2084 (V4L2_XFER_FUNC_SMPTE2084)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChhhhhMubh)}(h_The :ref:`smpte2084` standard defines the transfer function used by High Dynamic Range content.h](hThe }(hjThhhNhNubh)}(h:ref:`smpte2084`h]j )}(hj^h]h smpte2084}(hj`hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj\ubah}(h]h ]h"]h$]h&]refdocj# refdomainjjreftyperef refexplicitrefwarnj) smpte2084uh1hhhhMhjTubhK standard defines the transfer function used by High Dynamic Range content.}(hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjChhubhdefinition_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&]uh1jhhhMhjubh 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&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjubj)}(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&]uh1jhhhMhjubj)}(hhh]h)}(hDL' = ((c1 + c2 * L\ :sup:`m1`) / (1 + c3 * L\ :sup:`m1`))\ :sup:`m2`h](hL’ = ((c1 + c2 * L }(hj hhhNhNubh superscript)}(h :sup:`m1`h]hm1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh) / (1 + c3 * L }(hj hhhNhNubj)}(h :sup:`m1`h]hm1}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh)) }(hj hhhNhNubj)}(h :sup:`m2`h]hm2}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubj)}(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:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhMhj[ubj)}(hhh]h)}(hKL = (max(L':sup:`1/m2` - c1, 0) / (c2 - c3 * L'\ :sup:`1/m2`))\ :sup:`1/m1`h](h L = (max(L’}(hjphhhNhNubj)}(h :sup:`1/m2`h]h1/m2}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubh - c1, 0) / (c2 - c3 * L’ }(hjphhhNhNubj)}(h :sup:`1/m2`h]h1/m2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubh)) }(hjphhhNhNubj)}(h :sup:`1/m1`h]h1/m1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1hhhhMhjmubah}(h]h ]h"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]uh1jhhhMhjhhubeh}(h]h ]h"]h$]h&]uh1jhjChhhhhNubh)}(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&]uh1hhhhMhjChhubh)}(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}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjChhubh)}(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]j )}(hj0 h]hcolimg}(hj2 hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hj. ubah}(h]h ]h"]h$]h&]refdocj# refdomainj< reftyperef refexplicitrefwarnj)colimguh1hhhhMhj& ubh* for more in-depth information about this.}(hj& hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjChhubeh}(h](5transfer-function-smpte-2084-v4l2-xfer-func-smpte2084jBeh ]h"](7transfer function smpte 2084 (v4l2_xfer_func_smpte2084) xf-smpte-2084eh$]h&]uh1hhj'hhhhhMj}j^ j8sj}jBj8subeh}(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_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourcehnj _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]jaja ]jW ajt]jjaj]jaj]jaj]jaj\]jRajS]jIajB]j8aunameids}(j$j!jhjjj#j j"jjh jjg jd j{ja jzjwjjtjjjjjjjjjjjcjjbj_jZj\jYjVjjSjjjh je j^ jBj] jZ u nametypes}(j$jjj#j"jh jg j{jzjjjjjjjcjbjZjYjjjh j^ j] uh}(j!hhhjhj jjjjj(jd j(ja jm jwjm jtjjjjjjjjjjjjjj_jj\jhjVjhjSj_jj_je j'jBjCjZ jCj<j]jSjj jj j jjjWjjj'jjjju 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&]levelKtypeINFOsourcehnjlineK uh1j 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!sourcehnjlineKWuh1j ubj )}(hhh]h)}(hhh]h.Hyperlink target "col-srgb" is not referenced.}hj6!sbah}(h]h ]h"]h$]h&]uh1hhj3!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineKuh1j ubj )}(hhh]h)}(hhh]h/Hyperlink target "col-oprgb" is not referenced.}hjP!sbah}(h]h ]h"]h$]h&]uh1hhjM!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ubj )}(hhh]h)}(hhh]h0Hyperlink target "col-bt2020" is not referenced.}hjj!sbah}(h]h ]h"]h$]h&]uh1hhjg!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineM_uh1j ubj )}(hhh]h)}(hhh]h/Hyperlink target "col-dcip3" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ubj )}(hhh]h)}(hhh]h4Hyperlink target "col-smpte-240m" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ubj )}(hhh]h)}(hhh]h.Hyperlink target "col-sysm" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineM9uh1j ubj )}(hhh]h)}(hhh]h/Hyperlink target "col-sysbg" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ubj )}(hhh]h)}(hhh]h.Hyperlink target "col-jpeg" is not referenced.}hj!sbah}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ubj )}(hhh]h)}(hhh]h3Hyperlink target "xf-smpte-2084" is not referenced.}hj"sbah}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]levelKtypej!sourcehnjlineMuh1j ube transformerN include_log] decorationNhhub.