DescriptionFix incorrect Rec601 YUV conversion matrix coefficient.
For future reference, the rec 601 matrix can be defined by the concatenation of these 2 matrices:
[1.164 0.0 1.596 0.0]
[1.164 -0.391 -0.813 0.0]
[1.164 2.018 0.0 0.0]
[1.164 0.0 0.0 1.0]
See: http://www.fourcc.org/fccyvrgb.php
and
[1.0 0.0 0.0 -0.0625]
[0.0 1.0 0.0 -0.5 ]
[0.0 0.0 1.0 -0.5 ]
[0.0 0.0 0.0 1.0 ]
Which transforms Y by -0.0625 (-16/256) and U and V by
-0.5 (-128/256) each.
Giving us the final matrix:
[1.164 0.0 1.596 -0.87075]
[1.164 -0.391 -0.813 0.52925]
[1.164 2.018 0.0 -1.08175]
[0.0 0.0 0.0 1.0 ]
Which produces our output [R,G,B,A], when multiplied
with an input [Y,U,V,A].
Committed: https://skia.googlesource.com/skia/+/223ba624b70ed5732688e3a8a63a423a9f9b02ad
Patch Set 1 #Patch Set 2 : Add a couple digits to another coeff #Messages
Total messages: 6 (2 generated)
|