skia2/gn
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
..
toolchain Add iOS support for SkiaSDLExample. 2017-08-30 18:56:46 +00:00
__init__.py Make gn directory importable in python 2017-03-20 17:40:30 +00:00
ar.py GN: quiet alink spam on Mac 2016-11-07 14:19:32 +00:00
bench.gni Retry cleaning up SkLinearBitmapPipeline. 2017-07-20 16:45:52 +00:00
BUILD.gn update clang_linux package to Clang 5 2017-09-10 13:20:49 +00:00
BUILDCONFIG.gn clang on windows support 2017-07-31 18:39:23 +00:00
call.py Add gn plumbing for mdbviz tool 2017-09-05 13:57:44 +00:00
compile_processors.py switched to infra version of clang-format for skslc 2017-07-27 20:28:50 +00:00
core.gni DeferredDisplayList API proposal 2017-08-30 19:25:47 +00:00
cp.py GN: get Angle compiling on Windows. 2016-10-17 16:16:16 +00:00
effects.gni Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter. 2017-08-18 16:53:49 +00:00
find_headers.py Revert "Revert "Update skia to use ifdefs for Vulkan code instead of dummy header"" 2017-06-14 01:43:38 +00:00
find_ios_sysroot.py Add iOS simulator support in GN. 2017-03-13 17:21:43 +00:00
flutter_defines.gni Add GN arg to allow Flutter-specific API guards 2017-07-14 18:54:24 +00:00
gm.gni Adjust GPU YUV -> RGB (JPG) conversion 2017-09-13 14:10:50 +00:00
gn_helpers.py Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
gn_meta_sln.py Move, rename, and document Visual Studio GN helper script 2016-12-14 16:41:52 +00:00
gn_to_bp.py Reland "skia: add heif decoding support" 2017-08-18 14:40:29 +00:00
gn_to_cmake.py Add support for lib_dirs to gn_to_cmake.py. 2016-10-28 15:07:10 +00:00
gpu.gni Do software clip mask generation with worker threads 2017-09-11 17:58:00 +00:00
gypi_to_gn.py Add executable bit and shebang to python files 2016-08-18 04:36:25 -07:00
is_clang.py GN: match shell behavior for cc and cxx in is_clang.py 2016-09-27 09:29:24 -07:00
opts.gni Assume HQ is handled by pipeline, delete legacy code-path 2017-07-20 00:43:37 +00:00
package_ios.py Get viewer running on iOS 2017-09-01 17:30:57 +00:00
pdf.gni SkPDF: simplify drawImage/Bitmap/Sprite code. 2017-07-12 20:41:41 +00:00
push_to_android.py skia_android_serial = "auto" 2017-01-12 16:30:17 +00:00
run_sksllex.py Revert "Revert "Switch to the new SkSL lexer."" 2017-09-11 21:45:20 +00:00
samples.gni Add Chinese fling sample 2017-08-16 13:45:57 +00:00
shared_sources.gni Assume HQ is handled by pipeline, delete legacy code-path 2017-07-20 00:43:37 +00:00
sksl.gni Revert "Revert "Switch to the new SkSL lexer."" 2017-09-11 21:45:20 +00:00
tests.gni Revert "Turn on exceptions in test tools." 2017-08-16 13:20:29 +00:00
utils.gni Revert "Revert "GrContext::dump that produces JSON formatted output"" 2017-08-10 15:42:25 +00:00
xps.gni SkXPS: new document API. 2017-02-06 19:00:28 +00:00