Commit 141ddf6a authored by Wan-Teh Chang's avatar Wan-Teh Chang Committed by Commit Bot

Do not map MatrixID::SMPTE240M to Rec601 YUV space

In ColorSpace::ToSkYUVColorSpace(), do not map MatrixID::SMPTE240M to
kRec601_SkYUVColorSpace. In ITU-T H.273, the matrix coefficients of
SMPTE 240M are KR = 0.212 and KB = 0.087, which are quite different from
the matrix coefficients of BT.470 B, G and SMPTE 240M (KR = 0.299 and
KB = 0.114).

If we just need a close match, then the matrix coefficients of BT.709
(KR = 0.2126 and KB = 0.0722) would be a closer match.

Change-Id: I280df566a031437115f4bbb284ea8603cfb5136d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2188630Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/master@{#773287}
parent 8f036bcd
......@@ -1147,7 +1147,6 @@ bool ColorSpace::ToSkYUVColorSpace(SkYUVColorSpace* out) const {
case MatrixID::BT470BG:
case MatrixID::SMPTE170M:
case MatrixID::SMPTE240M:
*out = kRec601_SkYUVColorSpace;
return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment