Skip to content

Commit

Permalink
Switch to new (better) YUV matrices for Rec601 and Rec709 in Skia
Browse files Browse the repository at this point in the history
Corrects a small bias problem that prevented pure black, and introduced
a small chroma shift on greys.

In media/video-canvas.html, improve the test so that failures print
the timecode and failing channel value.

Bug: skia:9543
Change-Id: I691a04c53d476e51a0236f942a93a955865871bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893372
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Cr-Commit-Position: refs/heads/master@{#711684}
  • Loading branch information
brianosman authored and Commit Bot committed Nov 1, 2019
1 parent 0c5ac13 commit 071e281
Show file tree
Hide file tree
Showing 22 changed files with 8 additions and 16 deletions.
4 changes: 0 additions & 4 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,6 @@ SK_API void SkDebugf_FileLine(const char* file,
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#endif

#ifndef SK_LEGACY_YUV_MATRICES
#define SK_LEGACY_YUV_MATRICES
#endif

// We're turning this off indefinitely,
// until we can figure out some fundamental problems with its approach.
//
Expand Down
16 changes: 8 additions & 8 deletions third_party/blink/web_tests/media/video-canvas.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
// Different platforms may take different RGB conversion paths or
// have slight rounding differences, so allow multiple values here.
{ time: 0, r: [255], g: [255], b: [0] },
{ time: 2, r: [0], g: [3], b: [240, 243] },
{ time: 4, r: [0], g: [31], b: [213, 216] },
{ time: 6, r: [0], g: [48], b: [182, 185] },
{ time: 8, r: [0], g: [75, 76], b: [153, 155] },
{ time: 10, r: [0], g: [96, 97], b: [126, 128] }
{ time: 2, r: [0], g: [3], b: [240, 242, 243] },
{ time: 4, r: [0], g: [31], b: [213, 215, 216] },
{ time: 6, r: [0], g: [48], b: [182, 183, 184, 185] },
{ time: 8, r: [0], g: [75, 76], b: [153, 154, 155] },
{ time: 10, r: [0], g: [96, 97], b: [126, 127, 128] }
]
};

Expand Down Expand Up @@ -47,9 +47,9 @@
var g = frame.data[4 * 2 * width + 16 + 1];
var b = frame.data[4 * 2 * width + 16 + 2];

assert_true(expected.r.includes(r));
assert_true(expected.g.includes(g));
assert_true(expected.b.includes(b));
assert_true(expected.r.includes(r), expected.time + " r " + r);
assert_true(expected.g.includes(g), expected.time + " g " + g);
assert_true(expected.b.includes(b), expected.time + " b " + b);

if (++results.current == results.values.length)
t.done();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 071e281

Please sign in to comment.