From: Hans Verkuil Date: Sun, 8 Mar 2015 07:53:30 +0000 (-0300) Subject: [media] DocBook media: fix xv601/709 formulas X-Git-Tag: v4.1-rc1~59^2~1^2~233 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f658d133ba40af54b167a69b149a78bd966fa269;p=karo-tx-linux.git [media] DocBook media: fix xv601/709 formulas The denominator for the scaling and offsets is 256, not 255. Fix this. 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 13540fad3b2f..f2175f0877ed 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -790,9 +790,9 @@ case the BT.601 Y'CbCr encoding is used. 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: - Y' = (219 / 255) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 255) - Cb = (224 / 255) * (-0.1146R' - 0.3854G' + 0.5B') - Cr = (224 / 255) * (0.5R' - 0.4542G' - 0.0458B') + Y' = (219 / 256) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 256) + Cb = (224 / 256) * (-0.1146R' - 0.3854G' + 0.5B') + Cr = (224 / 256) * (0.5R' - 0.4542G' - 0.0458B') @@ -802,9 +802,9 @@ is similar to the Rec. 709 encoding, but it allows for R', G' and B' values that 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' = (219 / 256) * (0.299R' + 0.587G' + 0.114B') + (16 / 256) + Cb = (224 / 256) * (-0.169R' - 0.331G' + 0.5B') + Cr = (224 / 256) * (0.5R' - 0.419G' - 0.081B')