Files
LithiumCMS/Argyll_V3.5.0/xicc/mchan_inv.h
Diaco Soltanpour 51d0d04821 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
2026-11-11 21:46:26 +03:30

39 lines
1.1 KiB
C

#ifndef MCHAN_INV_H
#define MCHAN_INV_H
/*
* Multichannel (>4 channel) BtoA inversion via constrained optimization.
*
* The rspl reverse lookup (rev.c) is hard-capped at MXRI=4 input dimensions.
* For device channels > 4, we use Powell's method to find device values that
* minimize deltaE to the target PCS while respecting ink limits.
*
* Author: LithiumCMS project
* Date: 2026/11/11
*
* Copyright 2026 LithiumCMS contributors
* Licensed under the GNU GENERAL PUBLIC LICENSE Version 2 or later.
*/
#include "xicc.h"
/* Multichannel BtoA inversion for devchan > 4.
* Uses constrained optimization (powell) to find device values
* that minimize deltaE to target PCS while respecting ink limits.
*
* p - The icxLuLut object with forward AtoB table
* out - Returned device values [devchan]
* clipd - If not NULL, return clip distance (0 = no clip)
* in - Target PCS values [3] (Lab or XYZ in PCS' space)
*
* Returns 0 on success, 1 if clipping occurred
*/
int icxLuLut_mchan_inv_clut(
icxLuLut *p,
double *out,
double *clipd,
double *in
);
#endif /* MCHAN_INV_H */