Commits on Source (17)
-
It's bad form to set the same variable in multiple places, and not all of them were even equivalent. Move lcms2 finding to the root level build file only. It is still an optional dependency like before, and the if-not-found checks are still in place where actually needed. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
7fa9b153 -
Looks like this was forgotten, and I managed to get compiler errors about redeclaring all enums. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
85738af9 -
Make process_pixel_using_pipeline() slightly easier to read by extracting a meaningful function. Pure refactoring, no changes. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
c8195289 -
Make process_pixel_using_pipeline() slightly easier to read by extracting a meaningful function. Pure refactoring, no behavioral changes. Compared to previous, flip the scalar multiplication around, so that it matches the mathematical order of matrix-vector multiplication. Also document the layout conventions for lcmsVEC3 and lcmsMAT3. These follow the convention used in LittleCMS for cmsVEC3 and cmsMAT3, and are necessary to understand to review the matrix-vector multiplication for correctness. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
53b12680 -
Re-use color_float_apply_curve() instead of open-coding it. Maybe makes reading the code a little easier. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
8adbd3d8 -
Fix up whitespace and document what this array is for. For the sake of slightly better readability. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
6fa7ab5d -
This will be useful to make a curve in a color pipeline pass-through without needing to special-case skipping the curve. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
fa477d24 -
When defining a color space with a transfer function, this looks up the inverse transfer function without needing to store that separately. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
141cd302 -
Needed to invert device-to-PCS color transformation matrices. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
c76e4abb -
These helpers allow collecting color difference statistics easily. To be used in color-shaper-matrix-test. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
142d8e51 -
This helps reporting test results, then you can print the fn by name. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
0225453f -
This adds a new test helper library that depends on LittleCMS 2. For starters, the library implements conversion from enum transfer_fn to ICC multiProcessingElements compatible LittleCMS curve object. That conversion allows encoding transfer funtions in ICC files and LittleCMS pipelines with full float32 precision instead of forcing a conversion to a 1D LUT which for power-type curves is surprisingly imprecise. This also adds CI tests to make sure the conversion matches our hand-coded transfer functions. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
44c30795 -
This function sets some basic text tags to make an ICC file better formed. The code is taken from LittleCMS, https://github.com/mm2/Little-CMS.git git revision lcms2.13.1-28-g6ae2e99 (6ae2e99a3535417ca5c95b602eb61fdd29d294d0) file src/cmsvirt.c. Suggested-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
5921a00b -
Found with ASan. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
062b6646 -
We will want to run the same color spaces with different types of ICC profiles. To help with that: 1. Let struct lcms_pipeline define the test color space and transformations and move the tolerance into a new per test case structure. 2. Added profile type: PTYPE_MATRIX_SHAPER, PTYPE_CLUT. PTYPE_MATRIX_SHAPER is the previously implemented type. Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
6478859b -
This makes it easy to re-use existing reference images for further test cases. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
276d1ae0 -
Added cLUT profile creation to validate linearization algorithm for DToB3 tag (direction dev to PCS). The 3DLUT is built by using raw matrix conversion from dev to XYZ and reverse (XYZ to device). The test uses floating point pipeline, known as unbounded mode of LCMS. The details are described in ICCSpecRevision_02_11_06_Float.pdf The purpose of these new test cases is to keep the GL-renderer 3D LUT path tested even after color-lcms and GL-renderer start using specialized matrix-shaper paths. These also exercise build_eotf_from_clut_profile() in color-lcms, but do not actually verify it. These cases only test that the recovered EOTF and its inverse produce an identity mapping together. BT.2020 is not used in these tests, because the RGB-XYZ conversion matrix does not stay inside [0.0, 1.0] in either direction, which would be a problem for the 3D LUT element in the multiProcessingElement pipelines. Handling that would have been possible, but testing with AdobeRGB color space should suffice while keeping the test code from being even more complicated. roundtrip_verification() tests that we succeed in creating cms pipelines correctly in both directions so that the resulting ICC file is better behaved. The Weston test itself only cares about the BToD direction. Credits to: Vladimir Lachine <vladimir.lachine@amd.com> Graeme Gill <graeme@argyllcms.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
0c5860fa
tests/lcms-util-test.c
0 → 100644
tests/lcms_util.c
0 → 100644
tests/lcms_util.h
0 → 100644