Re: [Lcms-user] [Release candidate] Little CMS 2.14 is ready to be released
An ICC-based CMM for color management
Brought to you by:
mm2
From: L. E. S. <am...@am...> - 2022-10-20 01:53:09
|
Hi, The Krita code for the LCMS transform initialization is a nightmare... apart from a 10 y-o typo in the format definition (not declaring FLOAT_SH where we should), I've managed to consistently reproduce the bug. I've adjusted two lines below: > #include <lcms2.h> > #include <lcms2_fast_float.h> > > int main(void) > { > cmsHPROFILE hInput, hOutput; > cmsHTRANSFORM xform; > > cmsPlugin(cmsFastFloatExtensions()); > > hInput = cmsOpenProfileFromFile("profile.icc", "r"); > hOutput = cmsOpenProfileFromFile("Cintiq 13 #2 2022-07-29 D6500 2.2 S XYZLUT+MTX sRGB-HQ.icm", "r"); > > xform = cmsCreateTransform(hInput, TYPE_RGBA_FLT, hOutput, TYPE_RGBA_FLT, INTENT_PERCEPTUAL, cmsFLAGS_BLACKPOINTCOMPENSATION | cmsFLAGS_HIGHRESPRECALC); > > float ones[4] = {0.999999821f, 1.0f, 5.05994073e-08f, 1.0f }; > float result[4] = { 0 }; > > cmsDoTransform(xform, ones, result, 1); > > cmsCloseProfile(hInput); cmsCloseProfile(hOutput); > cmsDeleteTransform(xform); > return 1; > } We at Krita use RGBA, and the given conversion flags: cmsFLAGS_BLACKPOINTCOMPENSATION and cmsFLAGS_HIGHRESPRECALC. The pixel values were extracted straight from the exception stacktrace, and I've verified them separately. Best, amyspark On 19/10/2022 09:08, mar...@li... wrote: > > Hi, > > I've tried the following code with the plug-in and your profiles. It works fine. Please let me know which differences are in the Krita call because I cannot reproduce the error. > > int checkKrita(void) > { > cmsHPROFILE hInput, hOutput; > cmsHTRANSFORM xform; > > cmsPlugin(cmsFastFloatExtensions()); > > hInput = cmsOpenProfileFromFile("profile.icc", "r"); > hOutput = cmsOpenProfileFromFile("Cintiq 13 #2 2022-07-29 D6500 2.2 S XYZLUT+MTX sRGB-HQ.icm", "r"); > > xform = cmsCreateTransform(hInput, TYPE_RGB_FLT, hOutput, TYPE_RGB_FLT, INTENT_PERCEPTUAL, 0); > > float ones[3] = { 1.0f, 1.0f, 1.0f }; > float result[3] = { 0 }; > > cmsDoTransform(xform, ones, result, 1); > > cmsCloseProfile(hInput); cmsCloseProfile(hOutput); > cmsDeleteTransform(xform); > return 1; > } > > BTW, are you linking the plug-in as a DLL? > > Regards > > Marti Maria > The LittleCMS Project > https://www.littlecms.com > > -----Original Message----- > From: L. E. Segovia <am...@am...> > Sent: Wednesday, October 19, 2022 2:38 AM > To: Marti Maria <mar...@li...> > Cc: lcm...@li... > Subject: Re: [Lcms-user] [Release candidate] Little CMS 2.14 is ready to be released > > Hey Marti, > > I've been able to reproduce the bug in both 2.13.1 and the recent release candidate, both point to this stacktrace (snipped for brevity) inside the tetrahedral RGB interpolation module: > > lcms2_fast_float.dll!FloatCLUTEval(_cmstransform_struct * CMMcargo, const void * Input, void * Output, unsigned int PixelsPerLine, unsigned int LineCount, const cmsStride * Stride) Line 199 > (e:\krita-win\patches\Little-CMS\src\plugins\fast_float\src\fast_float_tethra.c:199) > lcms2.dll!cmsDoTransform(void * Transform, const void * InputBuffer, void * OutputBuffer, unsigned int Size) Line 207 > (e:\krita-win\patches\Little-CMS\src\src\cmsxform.c:207) > > The bug can be reproduced with 1.0 in any of the input's channels, and the source and display profiles provided in the bug report. > > Is there anything else I can do to help you reproduce it? > > Best, > > amyspark > > On 16/10/2022 16:40, Marti Maria wrote: >> Hello, >> >> Could you try with 2.14rc1? there are some fixes on the plugin picking optimisations where it should not. Chances are that this is solved. >> >> Thanks >> Marti >> >> >>> On 16 Oct 2022, at 19:56, L. E. Segovia via Lcms-user <lcm...@li...> wrote: >>> >>> Hey Marti, >>> >>> We've gotten a bug report at Krita regarding the fast float plugin: >>> >>> https://bugs.kde.org/show_bug.cgi?id=460512 >>> >>> Haven't yet had the time to symbolicate it, so sending this to keep you aware of it. >>> >>> Best, >>> >>> amyspark >>> >>> On 15/10/2022 15:38, Marti Maria wrote: >>>> I am glad to announce the imminent release of lcms2-2.14 The first >>>> release candidate is available here: >>>> https://github.com/mm2/Little-CMS/releases/tag/lcms2.14rc1 >>>> Changes >>>> • lcms2 now fully implements ICC specification 4.4 >>>> • New multi-threaded plug-in >>>> • several fixes to keep fuzzers happy >>>> • Remove check on DLL when CMS_NO_REGISTER_KEYWORD is used >>>> • Added more validation against broken profiles >>>> • Add more help to several tools >>>> ICC Version 4.4 and the multithreaded plug-in are important milestones. Fixes because fuzzers have been many, none of them harmful in terms of exploits. >>>> Feel free to test it on all your products, tentative release date for final lcms2-2.14 is end of Oct-2022 Please contact me on any issue either on info { at } littecms.com or using this list. >>>> Best regards >>>> Marti Maria >>>> The LittleCMS Project >>>> https://www.littlecms.com >>>> _______________________________________________ >>>> Lcms-user mailing list >>>> Lcm...@li... >>>> https://lists.sourceforge.net/lists/listinfo/lcms-user >>> >>> -- >>> amyspark 🌸 https://www.amyspark.me >>> >>> >>> _______________________________________________ >>> Lcms-user mailing list >>> Lcm...@li... >>> https://lists.sourceforge.net/lists/listinfo/lcms-user >> > > -- > amyspark 🌸 https://www.amyspark.me > -- amyspark 🌸 https://www.amyspark.me |