feat: implement multichannel (5-7 color) ICC profiling support

- Phase 1 (profout.c, colprof.c):
  * Extend COLOR_REP parsing for named (e.g. CMYKOGV_LAB) and generic (NcCLR) spaces (5-15ch)
  * Set adaptive AtoB and BtoA grid resolutions for 5-6ch and 7+ch to avoid memory explosions
  * Automatically enable ICC v2/v4 Colorant Table tag for devchan >= 5
  * Generalize verification print loops to support N channels
  * Support dynamic TAC limits up to N*100% in colprof.c

- Phase 2 & 3 (xicc/):
  * Add mchan_inv.h and mchan_inv.c implementing constrained Powell optimization for BtoA inversion
  * Dispatch devchan > 4 in xlut.c (icxLuLut_inv_clut_aux) to bypass rspl rev.c MXRI=4 dimension limit
  * Register mchan_inv.c in xicc/Jamfile and include header in xicc.c
This commit is contained in:
2026-11-11 21:46:26 +03:30
parent 8950ed596b
commit 51d0d04821
7 changed files with 401 additions and 26 deletions

View File

@@ -992,6 +992,20 @@ double *in /* Function input values to invert (== clut output' values) */
/* Compute clip vector, if any */
cdir = icxClipVector(&p->clip, in, cdirv, 0);
/* For multichannel (> 4 device channels), use optimization-based inversion
* since rspl rev.c is capped at MXRI=4 */
if (p->clutTable->di > 4) {
int rv = icxLuLut_mchan_inv_clut(p, out, clipd, in);
if (auxv != NULL) {
int ee = 0;
for (e = 0; e < p->clutTable->di; e++) {
if (p->auxm[e] != 0)
auxv[ee++] = out[e];
}
}
return rv;
}
if (p->clutTable->di > fdi) { /* ie. CMYK->Lab, there will be ambiguity */
double min[MXDI], max[MXDI]; /* Auxiliary locus range */