From: Hans Verkuil Date: Thu, 19 Feb 2015 13:49:40 +0000 (-0300) Subject: [media] DocBook media: fix xvYCC601 documentation X-Git-Tag: v4.1-rc1~59^2~1^2~321 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e6d72d20519c5d4941ed91d03edadd133d277e08;p=karo-tx-linux.git [media] DocBook media: fix xvYCC601 documentation The documentation of the xvYCC601 Y'CbCr encoding was part of the SMPTE 170M (SDTV) colorspace, but it should have been part of the Rec. 709 (HDTV) colorspace as per the xvYCC standard. This change only affects the documentation and not any code. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 5e0352c50324..13540fad3b2f 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -666,8 +666,7 @@ as the SMPTE C set, so this colorspace is sometimes called SMPTE C as well. The transfer function defined for SMPTE 170M is the same as the -one defined in Rec. 709. Normally L is in the range [0…1], but for the extended -gamut xvYCC encoding values outside that range are allowed. +one defined in Rec. 709. L' = -1.099(-L)0.45 + 0.099 for L ≤ -0.018 L' = 4.5L for -0.018 < L < 0.018 @@ -702,25 +701,6 @@ defined in the standard and this colorspace is sometim though BT.601 does not mention any color primaries. The default quantization is limited range, but full range is possible although rarely seen. - The V4L2_YCBCR_ENC_601 encoding as described above is the -default for this colorspace, but it can be overridden with V4L2_YCBCR_ENC_709, -in which case the Rec. 709 Y'CbCr encoding is used. - - - The xvYCC 601 encoding (V4L2_YCBCR_ENC_XV601, ) 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: - - Y' = (219 / 255) * (0.299R' + 0.587G' + 0.114B') + (16 / 255) - Cb = (224 / 255) * (-0.169R' - 0.331G' + 0.5B') - Cr = (224 / 255) * (0.5R' - 0.419G' - 0.081B') - - - - Y' is clamped to the range [0…1] and Cb and Cr are clamped -to the range [-0.5…0.5]. The non-standard xvYCC 709 encoding can also be used by selecting -V4L2_YCBCR_ENC_XV709. The xvYCC encodings always use full range -quantization.
@@ -803,6 +783,7 @@ rarely seen. The 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. + Two additional extended gamut Y'CbCr encodings are also possible with this colorspace: The xvYCC 709 encoding (V4L2_YCBCR_ENC_XV709, ) @@ -815,10 +796,22 @@ is similar to the Rec. 709 encoding, but it allows for R', G' and B' values that + + + The xvYCC 601 encoding (V4L2_YCBCR_ENC_XV601, ) 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: + + Y' = (219 / 255) * (0.299R' + 0.587G' + 0.114B') + (16 / 255) + Cb = (224 / 255) * (-0.169R' - 0.331G' + 0.5B') + Cr = (224 / 255) * (0.5R' - 0.419G' - 0.081B') + + + Y' is clamped to the range [0…1] and Cb and Cr are clamped -to the range [-0.5…0.5]. The non-standard xvYCC 601 encoding can also be used by -selecting V4L2_YCBCR_ENC_XV601. The xvYCC encodings always use full -range quantization. +to the range [-0.5…0.5]. The non-standard xvYCC 709 or xvYCC 601 encodings can be used by +selecting V4L2_YCBCR_ENC_XV709 or V4L2_YCBCR_ENC_XV601. +The xvYCC encodings always use full range quantization.