mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-11-05 18:24:04 +00:00
9f4a9089f4
The ICC profiles created for tests here are supposed to produce the same results regardless of whether they are of the matrix-shaper or cLUT form, and whether the compositor uses a colorimetric or perceptual rendering intent. This is silly, but it fits our tests very well since we mostly want to ensure correct computations in matrix and cLUT code rather than meaningful results from different rendering intents. When trying to switch the compositor from colorimetric to perceptual rendering intent as required by the color-management protocol extension, all and only the cLUT based tests failed (color-icc-output test). The reason is that ICCv4 defines the perceptual PCS having a specific non-zero black point. It requires ICC profiles to convert device black to the PCS black and vice versa. However, matrix-shaper type ICC profiles have no way to provide a perceptual transformation to/from PCS separate from the colorimetric transformation. Hence, LittleCMS exempts ICCv4 matrix-shaper profiles from the ICCv4 perceptual PCS definition. Black point compensation (BPC) is always added by LittleCMS with the perceptual rendering intent. If an ICC profile claims to be ICC version 4, the perceptual transformation in it is assumed to adhere to the percptual PCS black point, which is non-zero. Hence, DToB0 and BToD0 tags need to respect that so that BPC works correctly. Before this patch, DToB0 and BToD0 transformations did not use the correct PCS black point, so when BPC got added, the color space conversion went wrong. This patch replicates the BPC algorithm that LittleCMS uses in order to respect the perceptual PCS definition. This will then cancel out with the BPC added by LittleCMS, producing the expected color space conversion. The problem arises only with cLUT ICC profiles because matrix-shaper profiles are exempt: the black points between source (always matrix-shaper sRGB profile for now) and destination color spaces match, and no BPC is added by LittleCMS. There is no way to ask LittleCMS to add its BPC on our will, so we need to copy that code from LittleCMS 2.16. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
||
---|---|---|
.. | ||
reference | ||
visualization | ||
alpha-blending-test.c | ||
assert-test.c | ||
bad-buffer-test.c | ||
buffer-transforms-test.c | ||
color-icc-output-test.c | ||
color-lcms-optimizer-test.c | ||
color-management-test.c | ||
color-metadata-errors-test.c | ||
color-metadata-parsing-test.c | ||
color_util.c | ||
color_util.h | ||
config-parser-test.c | ||
constraints-test.c | ||
custom-env-test.c | ||
devices-test.c | ||
drm-formats-test.c | ||
drm-smoke-test.c | ||
drm-writeback-screenshot-test.c | ||
event-test.c | ||
image-iter.h | ||
input-timestamps-helper.c | ||
input-timestamps-helper.h | ||
internal-screenshot-test.c | ||
iterate-debug-scopes-test.c | ||
ivi-layout-internal-test.c | ||
ivi-layout-test-client.c | ||
ivi-layout-test-plugin.c | ||
ivi-shell-app-test.c | ||
ivi-test.h | ||
keyboard-test.c | ||
lcms-util-test.c | ||
lcms_util.c | ||
lcms_util.h | ||
linux-explicit-synchronization-test.c | ||
matrix-test.c | ||
matrix-transform-test.c | ||
meson.build | ||
output-capture-protocol-test.c | ||
output-damage-test.c | ||
output-decorations-test.c | ||
output-transforms-test.c | ||
paint-node-test.c | ||
plugin-registry-test.c | ||
pointer-shot-test.c | ||
pointer-test.c | ||
presentation-test.c | ||
roles-test.c | ||
safe-signal-output-removal-test.c | ||
safe-signal-test.c | ||
setbacklight.c | ||
single-pixel-buffer-test.c | ||
string-test.c | ||
subsurface-shot-test.c | ||
subsurface-test.c | ||
surface-global-test.c | ||
surface-screenshot-test.c | ||
surface-test.c | ||
text-test.c | ||
timespec-test.c | ||
touch-test.c | ||
vertex-clip-test.c | ||
viewporter-shot-test.c | ||
viewporter-test.c | ||
weston-test-client-helper.c | ||
weston-test-client-helper.h | ||
weston-test-desktop-shell.c | ||
weston-test-fixture-compositor.c | ||
weston-test-fixture-compositor.h | ||
weston-test-runner.c | ||
weston-test-runner.h | ||
weston-test.c | ||
weston-testsuite-data.h | ||
xcb-client-helper.c | ||
xcb-client-helper.h | ||
xwayland-test.c | ||
yuv-buffer-test.c |