Skip to content
  • Vitaly Prosyak's avatar
    tests/color-shaper-matrix: add creation and usage cLUT profiles · 0c5860fa
    Vitaly Prosyak authored and Pekka Paalanen's avatar Pekka Paalanen committed
    
    
    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: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    Signed-off-by: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
    Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    0c5860fa
Loading