From a0442ed58dee48a521ea053083ea967894507898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 11 Jul 2018 22:19:56 +0200 Subject: New upstream version 2.0.1+repack --- spectro/xrga.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'spectro/xrga.c') diff --git a/spectro/xrga.c b/spectro/xrga.c index 7318fce..d481b6a 100755 --- a/spectro/xrga.c +++ b/spectro/xrga.c @@ -160,23 +160,20 @@ void xspec_convert_xrga(xspect *dst, xspect *srcp, xcalpol pol, xcalstd dsp, xca xspect tmp, *src = srcp; /* If no conversion and no copy needed */ - if ((ssp == xcalstd_native || dsp == xcalstd_native || dsp == ssp) - && dst == src) + if (!XCALSTD_NEEDED(ssp, dsp) && dst == src) return; - /* If no conversion needed */ - if (ssp == xcalstd_native || dsp == xcalstd_native || dsp == ssp) { + /* If no conversion needed */ + if (!XCALSTD_NEEDED(ssp, dsp)) { *dst = *src; /* Struct copy */ return; } - /* If the dest is the same as the src, make a temporary copy */ + /* If the dest is the same as the src, make a temporary copy, */ + /* since convert_xrga() needs them to be distinct */ if (dst == src) { tmp = *src; /* Struct copy */ src = &tmp; - - } else { - XSPECT_COPY_INFO(dst, src); /* Copy parameters */ } eq = &xrga_equations[pol][ssp][dsp]; @@ -210,7 +207,7 @@ void ipatch_convert_xrga(ipatch *vals, int nvals, /* Re-compute XYZ */ if (vals[i].XYZ_v) { if (conv == NULL) { - conv = new_xsp2cie(icxIT_D50, NULL, icxOT_CIE_1931_2, + conv = new_xsp2cie(icxIT_D50, 0.0, NULL, icxOT_CIE_1931_2, NULL, icSigXYZData, (icxClamping)clamp); } conv->convert(conv, vals[i].XYZ, &vals[i].sp); -- cgit v1.2.3