Go to file
Brian Osman b433c5691b Adjust GPU YUV -> RGB (JPG) conversion
All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.

I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.

This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):

Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now       : 65.4% of pixels differ, max diff of 1, avg diff of 0

Bug: skia:7038 chromium:763605
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-13 14:10:50 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Add a benchmark for SkXfermodeImageFilter mode kSrcIn 2017-09-11 16:43:50 +00:00
bin add a Win/Clang build bot 2017-07-31 19:53:51 +00:00
debugger Revert "Revert "Revert "Revert "Remove GrBackendRenderTargetDesc in favor of GrBackendRenderTarget."""" 2017-08-31 20:04:12 +00:00
dm Fix SkASSERT for convex paths with DAA 2017-09-07 14:30:01 +00:00
docs bookmaker spelling with fixed linux build 2017-09-01 20:10:51 +00:00
example More iOS Fixes for SkiaSDLExample. 2017-09-05 20:34:55 +00:00
experimental Fix SkSVGDOM length & presentation context scoping 2017-09-09 14:06:28 +00:00
fuzz Fuzz: use SkNullWStream 2017-08-29 17:41:36 +00:00
gm Adjust GPU YUV -> RGB (JPG) conversion 2017-09-13 14:10:50 +00:00
gn Adjust GPU YUV -> RGB (JPG) conversion 2017-09-13 14:10:50 +00:00
include Revert "Remove isMipMapped from GrSurfaceDesc" and follow up find exact scratch CL 2017-09-08 19:58:18 +00:00
infra Use Chrome-GPU pool for CT GPU runs 2017-09-13 12:25:40 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources Move lang to list in Android font manager. 2017-08-14 19:29:05 +00:00
samplecode Minor cleanups for CCPR 2017-09-12 18:08:21 +00:00
site Add links to autoroller cloud logs for roboCops 2017-09-07 15:30:51 +00:00
src Adjust GPU YUV -> RGB (JPG) conversion 2017-09-13 14:10:50 +00:00
tests Improve heuristics for when to use ccpr 2017-09-12 20:04:20 +00:00
third_party Fix system icu build. 2017-08-31 21:12:00 +00:00
tools Add support for additional textures in GrDrawOpAtlas 2017-09-12 17:16:00 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore clang on windows support 2017-07-31 18:39:23 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn Revert "Revert "Switch to the new SkSL lexer."" 2017-09-11 21:45:20 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll skia/third_party/externals/angle2/ ef97c613f..06ef36b98 (2 commits) 2017-09-11 19:01:21 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
PRESUBMIT.py Fix behavior of automatically adding 'Cq-Include-Trybots' in presubmit 2017-09-12 18:06:35 +00:00
public.bzl Update omitted Bazel tests. 2017-09-13 00:55:50 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Revert "Whitespace change to test Android autoroller" 2017-09-07 15:25:02 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.