1. 10 Jul, 2019 1 commit
    • Boudewijn Rempt's avatar
      Try to make this test succeed on Jenkins · 32f46f79
      Boudewijn Rempt authored
      Apparently, on Jenkins we cannot create all of these colorspaces,
      so don't fail by dereferencing a null pointer:
      
      ********* Start testing of TestLcmsRGBP2020PQColorSpace *********
      Config: Using QtTest library 5.12.4, Qt 5.12.4 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.1.1 20190611 [gcc-9-branch revision 272147])
      PASS   : TestLcmsRGBP2020PQColorSpace::initTestCase()
      AddressSanitizer:DEADLYSIGNAL
      =================================================================
      ==6181==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f3f02031167 bp 0x7fff6f5c1290 sp 0x7fff6f5c1280 T0)
      ==6181==The signal is caused by a READ memory access.
      ==6181==Hint: address points to the zero page.
          #0 0x7f3f02031166 in KoColorSpace::id() const /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/libs/pigment/KoColorSpace.cpp:106
          #1 0x41535a in testRoundTrip(KoColorSpace const*, KoColorSpace const*, SourceType) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:44
          #2 0x418726 in testRoundTrip(KoID const&, KoID const&, SourceType) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:118
          #3 0x4192b2 in TestLcmsRGBP2020PQColorSpace::test() /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:143
          #4 0x40aa2c in TestLcmsRGBP2020PQColorSpace::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/build/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace_autogen/EWIEGA46WW/moc_TestLcmsRGBP2020PQColorSpace.cpp:78
          #5 0x7f3efcc6889a in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/usr/lib64/libQt5Core.so.5+0x29689a)
          #6 0x7f3f050a0962  (/usr/lib64/libQt5Test.so.5+0x19962)
          #7 0x7f3f050a1352  (/usr/lib64/libQt5Test.so.5+0x1a352)
          #8 0x7f3f050a1910  (/usr/lib64/libQt5Test.so.5+0x1a910)
          #9 0x7f3f050a1cda in QTest::qRun() (/usr/lib64/libQt5Test.so.5+0x1acda)
          #10 0x7f3f050a1edb in QTest::qExec(QObject*, int, char**) (/usr/lib64/libQt5Test.so.5+0x1aedb)
          #11 0x41b9d7 in main /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace.cpp:185
          #12 0x7f3efc4f2bca in __libc_start_main (/lib64/libc.so.6+0x26bca)
          #13 0x40a8f9 in _start (/home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/build/plugins/color/lcms2engine/tests/TestLcmsRGBP2020PQColorSpace+0x40a8f9)
      
      AddressSanitizer can not provide additional info.
      SUMMARY: AddressSanitizer: SEGV /home/jenkins/workspace/Extragear/krita/kf5-qt5 SUSEQt5.12/libs/pigment/KoColorSpace.cpp:106 in KoColorSpace::id() const
      ==6181==ABORTING
      32f46f79
  2. 09 Mar, 2019 1 commit
  3. 05 Mar, 2019 2 commits
  4. 28 Feb, 2019 2 commits
  5. 19 Feb, 2019 1 commit
  6. 10 Jan, 2019 2 commits
    • Dmitry Kazakov's avatar
      Implemented a unittest for saving HDR PNG files · c3a8b83a
      Dmitry Kazakov authored
      The patch also fixes three bugs in saving of PQ images:
      
      1) There should be no direct conversions from p2020-pq to/from
         U16 color spaces. It might happen that color conversion system
         will choose this edge for converting p709-g10-f32->p2020-g10-u16->
         ->p2020->pq-u16, which is not correct and loses all HDR data.
      
      2) PNG converter should also handle a case when we just save a already
         converted p2020->pq-u16 image, which should just go in pass-through
         way.
      
      3) Fix a misprint in KisPNGConverter::buildImage
      c3a8b83a
    • Dmitry Kazakov's avatar
      Implement a unittest for Rec. 2020 PQ conversions · 76a6ad09
      Dmitry Kazakov authored
      The patch also implements a few more direct conversions.
      76a6ad09
  7. 26 Dec, 2018 1 commit
    • Dmitry Kazakov's avatar
      Implement proper conversions to Rec. 2020 PQ color space · 3f31062e
      Dmitry Kazakov authored
      ICC engine cannot handle PQ-shaped color spaces properly. All the
      HDR data will be lost. Therefore, we should implement a custom
      transformation for that.
      
      1) IccColorSpaceEngine now has a special method supportsColorSpace(),
         which declares that "SMPTE ST 2084 PQ" should not be handled by
         the engine.
      
      2) LcmsRGBP2020PQColorSpaceFactoryWrapper adds custom conversions
         for this special color space. Before passing it to LCMS, the
         color space will be converted into Rec. 2020 Linear. After that
         ICC color management system can handle it correctly.
      
      3) The conversions graph looks like that:
      
      p2020-pq-u8 <-> p2020-g10-f16
      p2020-pq-u16 <-> p2020-g10-f16
      p2020-pq-f16 <-> p2020-g10-f32
      p2020-pq-f32 <-> p2020-g10-f32
      
      4) There is still a problem: if one decides to convert p2020-pq-f16
         into p2020-pq-u16, then the conversion will go via p2020-g10-f32.
         This is not optimal, but it can be fixed later.
      3f31062e
  8. 15 Nov, 2018 1 commit
  9. 16 Oct, 2018 1 commit
    • Ivan Yossi's avatar
      BUG:398920 · 6f05272d
      Ivan Yossi authored
      Summary:
      Fixes Invert filter for all but CMYK and LAB 32bit float
      It seems the values are not normalized on inversion step.
      
      Reviewers: #krita
      
      Tags: #krita
      
      Differential Revision: https://phabricator.kde.org/D16207
      6f05272d
  10. 26 Sep, 2018 1 commit
  11. 07 Aug, 2018 3 commits
  12. 25 Jul, 2018 1 commit
    • Boudewijn Rempt's avatar
      Make it possible for tests to access resources · f9ee9a42
      Boudewijn Rempt authored
      If a test needs access to the resources in the install folder, it
      needs to use KISTEST_MAIN instead of QTEST_MAIN. This will set an
      env variable, EXTRA_RESOURCE_DIRS, where KoREsourcePaths will then
      also look.
      
      Also remove the setReady/isReady methods for KoResourcePaths: we
      don't need that. We can add resource dirs in as many places as
      we want.
      
      CCMAIL:kimageshop@kde.org
      f9ee9a42
  13. 08 Jul, 2018 1 commit
  14. 01 Jun, 2018 2 commits
  15. 31 May, 2018 1 commit
  16. 22 May, 2018 1 commit
  17. 20 May, 2018 2 commits
  18. 14 May, 2018 2 commits
  19. 12 May, 2018 1 commit
  20. 26 Apr, 2018 1 commit
  21. 02 Jan, 2018 1 commit
  22. 06 Dec, 2017 1 commit
  23. 20 Oct, 2017 1 commit
  24. 03 Oct, 2017 1 commit
  25. 18 Aug, 2017 1 commit
    • Pino Toscano's avatar
      typo fixes · 35b1cfd9
      Pino Toscano authored
      - "avaialble" -> "available"
      - "grabed" -> "grabbed"
      - "miliseconds" -> "milliseconds"
      - "postion" -> "position"
      - "sturctures" -> "structures"
      - "tranformation" -> "transformation"
      - "unknow" -> "unknown"
      35b1cfd9
  26. 25 May, 2017 2 commits
    • Dmitry Kazakov's avatar
      Rewrite for KoColorSpaceRegistry to fix multithreading and deadlocks · 0cfff1dc
      Dmitry Kazakov authored
      Basically, we have two levels of locks in the registry:
      1) (outer level) is Private::registrylock, which controls the structures
         of the color space registry itself
      2) (inner level) is KoColorProfileStorage::Private::lock controls
         the structures related to profiles.
      
      The locks can be taken individually, but if you are going to take both
      of them, you should always follow the order 1) registry; 2) profiles.
      Otherwise you'll get a deadlock.
      
      All the dependent classes (KoColorConversionSystem and KoColorSpaceFactory)
      now do not use the direct links to the registry. Instead, they use special
      private interfaces that skip recursive locking and ensure we don't have
      deadlocks.
      0cfff1dc
    • Dmitry Kazakov's avatar
      Add override keyword in every function that is overridden · 90d73ff5
      Dmitry Kazakov authored
      Thanks Kevin Funk for providing a patch!
      90d73ff5
  27. 11 May, 2017 1 commit
    • Dmitry Kazakov's avatar
      Rewrite for KoColorSpaceRegistry to fix multithreading and deadlocks · 8852506e
      Dmitry Kazakov authored
      Basically, we have two levels of locks in the registry:
      1) (outer level) is Private::registrylock, which controls the structures
         of the color space registry itself
      2) (inner level) is KoColorProfileStorage::Private::lock controls
         the structures related to profiles.
      
      The locks can be taken individually, but if you are going to take both
      of them, you should always follow the order 1) registry; 2) profiles.
      Otherwise you'll get a deadlock.
      
      All the dependent classes (KoColorConversionSystem and KoColorSpaceFactory)
      now do not use the direct links to the registry. Instead, they use special
      private interfaces that skip recursive locking and ensure we don't have
      deadlocks.
      8852506e
  28. 08 May, 2017 1 commit
  29. 27 Apr, 2017 1 commit
    • Dmitry Kazakov's avatar
      Rewrite alpha colorspaces using templates and make them correct · cf54d5bd
      Dmitry Kazakov authored
      1) Non-U8 alpha color spaces were not connected to the color
         conversion system. Therefore, one couldn't convert to/from
         them any data
      
      2) The code of their methods were blindly copied from U8 color space,
         therefore all the functions (incl. toQColor/fromQColor/difference)
         just read wrong values from pointers (quint8 instead of quint16 or
         bigger).
      
      3) Now all the alpha color spaces are rewritten using a common template
         and the same code reused for all of them, with correct pointer
         conversions using KoColorSpaceMaths.
      
      4) The new color spaces are converted to the conversion system using
         existing Factory::colorConversionLinks() framework. Yes, they are
         created using factories.
      
      Open Questions:
      1) In KoColorSpaceRegistry there are some special cases about persistent
         storage of d->alphaCs and 'OwnedByRegistryRegistryDeletes' flags. I
         couldn't find any info about it, so it might be incorrect.
      cf54d5bd
  30. 04 Apr, 2017 1 commit
  31. 03 Jan, 2017 1 commit