From cbb7b92e01100099955a92d5eb5e863e97ebeb56 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Sat, 15 Oct 2022 20:04:36 +0200 Subject: [PATCH 1/4] Update configure update generated script --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 79a748509..9143bb996 100755 --- a/configure +++ b/configure @@ -17701,7 +17701,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - main() { __m128i n = _mm_set1_epi8(42); } + int main() { __m128i n = _mm_set1_epi8(42); } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_supports_sse2=yes From aa7f240da8dc27a0bb082462889cca9026bf2b27 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Thu, 20 Oct 2022 15:24:27 +0200 Subject: [PATCH 2/4] Fix Krita segfault _cmsQuickFloor() fails when numbers are too close, on fourth decimals, floor of 47.9993 was taken as 48 instead of 47 and this was enough to generate a negative rest and create a segfault. Math is sometimes complex. --- plugins/fast_float/src/fast_float_tethra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/fast_float/src/fast_float_tethra.c b/plugins/fast_float/src/fast_float_tethra.c index 64e011a97..6c497740b 100644 --- a/plugins/fast_float/src/fast_float_tethra.c +++ b/plugins/fast_float/src/fast_float_tethra.c @@ -134,9 +134,9 @@ void FloatCLUTEval(struct _cmstransform_struct* CMMcargo, py = g * p->Domain[1]; pz = b * p->Domain[2]; - x0 = _cmsQuickFloor(px); rx = (px - (cmsFloat32Number)x0); - y0 = _cmsQuickFloor(py); ry = (py - (cmsFloat32Number)y0); - z0 = _cmsQuickFloor(pz); rz = (pz - (cmsFloat32Number)z0); + x0 = (int) floorf(px); rx = (px - (cmsFloat32Number)x0); + y0 = (int) floorf(py); ry = (py - (cmsFloat32Number)y0); + z0 = (int) floorf(pz); rz = (pz - (cmsFloat32Number)z0); X0 = p->opta[2] * x0; From 1cefcca14079d360d0628e5753beaa5ebc3d51a3 Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Fri, 21 Oct 2022 09:32:27 +0200 Subject: [PATCH 3/4] Remove remains of development that should not be there lcms2 core testbed has nothing to do with plug-ins --- testbed/testcms2.c | 7 ------- testbed/testcms2.h | 4 ---- 2 files changed, 11 deletions(-) diff --git a/testbed/testcms2.c b/testbed/testcms2.c index ea398be6d..40f9d6589 100644 --- a/testbed/testcms2.c +++ b/testbed/testcms2.c @@ -9249,13 +9249,6 @@ int main(int argc, char* argv[]) CHDIR(argv[2]); } -#ifdef LCMS_FAST_EXTENSIONS - printf("Installing fast float extension ..."); - cmsPlugin(cmsFastFloatExtensions()); - printf("done.\n"); -#endif - - printf("Installing debug memory plug-in ... "); cmsPlugin(&DebugMemHandler); printf("done.\n"); diff --git a/testbed/testcms2.h b/testbed/testcms2.h index bf76e0c92..9b9b9f86b 100755 --- a/testbed/testcms2.h +++ b/testbed/testcms2.h @@ -29,10 +29,6 @@ #include "lcms2_internal.h" -#ifdef LCMS_FAST_EXTENSIONS -# include "fast_float_internal.h" -#endif - // On Visual Studio, use debug CRT #ifdef _MSC_VER # include "crtdbg.h" From 496293a3a8e23734cb56d49190dfe5af06ebac4e Mon Sep 17 00:00:00 2001 From: Marti Maria Date: Fri, 21 Oct 2022 09:33:38 +0200 Subject: [PATCH 4/4] wrong file included by mistake in testbed project Fix project for visual studio --- Projects/VC2022/testbed/testbed.vcxproj | 1 - Projects/VC2022/testbed/testbed.vcxproj.filters | 3 --- 2 files changed, 4 deletions(-) diff --git a/Projects/VC2022/testbed/testbed.vcxproj b/Projects/VC2022/testbed/testbed.vcxproj index 05cb6a68a..c2b51ba0e 100644 --- a/Projects/VC2022/testbed/testbed.vcxproj +++ b/Projects/VC2022/testbed/testbed.vcxproj @@ -281,7 +281,6 @@ - diff --git a/Projects/VC2022/testbed/testbed.vcxproj.filters b/Projects/VC2022/testbed/testbed.vcxproj.filters index ece88ca6d..993ee1511 100644 --- a/Projects/VC2022/testbed/testbed.vcxproj.filters +++ b/Projects/VC2022/testbed/testbed.vcxproj.filters @@ -24,8 +24,5 @@ Source Files - - Source Files - \ No newline at end of file