summaryrefslogtreecommitdiff
path: root/rspl/rspl1.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-02 19:25:17 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-10-02 19:25:17 +0200
commitc2ca7be5a751879159f3cb591a64bb9568b79762 (patch)
tree04e38d4f4a2aad4d789bda0a65b7abb80a3439a2 /rspl/rspl1.h
parent45c152c326d87478fbf41714b4b8e2f7b57a282b (diff)
parent3db384424bd7398ffbb7a355cab8f15f3add009f (diff)
Updated version 1.9.1+repack from 'upstream/1.9.1+repack'
with Debian dir 98a996367aa69ae41accf9c6d369f600bc94de80
Diffstat (limited to 'rspl/rspl1.h')
-rw-r--r--rspl/rspl1.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/rspl/rspl1.h b/rspl/rspl1.h
index 747abd5..63be428 100644
--- a/rspl/rspl1.h
+++ b/rspl/rspl1.h
@@ -1,7 +1,7 @@
#ifndef _RSPL1_H_
- /* Single dimension regularized spline data structure */
+/* Single dimension regularized spline data structure */
/*
* Argyll Color Correction System
@@ -18,10 +18,22 @@
*
*/
+/*
+ * Might be nice to add support for simple rev lookup, so that
+ * standalone xcal can use it ??
+ */
+
+
#ifdef __cplusplus
extern "C" {
#endif
+/* Make up for possible lack of rspl.h */
+#ifndef MXDI
+# define MXDI 10 /* Maximum input dimensionality */
+# define MXDO 10 /* Maximum output dimensionality (Is not fully tested!!!) */
+#endif
+
/* General data point position/value structure */
typedef double datai[1];
typedef double datao[1];
@@ -94,12 +106,30 @@ struct _rspl {
double **ipos /* (not used) */
);
+ /* Initialize the grid from a provided function. */
+ /* Grid index values are supplied "under" in[] at *((int*)&in[-e-1]) */
+ int
+ (*set_rspl)(
+ struct _rspl *s, /* this */
+ int flags, /* (Not used) */
+ void *cbntx, /* Opaque function context */
+ void (*func)(void *cbntx, double *out, double *in), /* Function to set from */
+ datai glow, /* Grid low scale, NULL = default 0.0 */
+ datai ghigh, /* Grid high scale, NULL = default 1.0 */
+ int gres[MXDI], /* Spline grid resolution */
+ datao vlow, /* Data value low normalize, NULL = default 0.0 */
+ datao vhigh /* Data value high normalize - NULL = default 1.0 */
+ );
+
/* Do forward interpolation */
/* Return 0 if OK, 1 if input was clipped to grid */
int (*interp)(
struct _rspl *s, /* this */
co *p); /* Input and output values */
+ /* Return a pointer to the resolution array */
+ int *(*get_res)(struct _rspl *s);
+
}; typedef struct _rspl rspl;
/* Create a new, empty rspl object */