From 22f703cab05b7cd368f4de9e03991b7664dc5022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 13:56:46 +0200 Subject: Initial import of argyll version 1.5.1-8 --- imdi/refi.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 imdi/refi.h (limited to 'imdi/refi.h') diff --git a/imdi/refi.h b/imdi/refi.h new file mode 100644 index 0000000..26570c4 --- /dev/null +++ b/imdi/refi.h @@ -0,0 +1,53 @@ + +/* Reference floating point interpolator constructed out of rspl's */ +/* This provides imdi functionality in floating point */ +/* + * Copyright 2000 Graeme W. Gill + * All rights reserved. + * + * This material is licenced under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 :- + * see the License.txt file for licencing details. + */ + +#include "../rspl/rspl.h" + +/* ------------------------------------------------ */ + +typedef struct { + int id, od; /* Input and output dimensions */ + int inres; /* Desired input table resolution */ + int clutres; /* Desired clut table resolution */ + int outres; /* Desired output table resolution */ + rspl *in[MXDI]; + rspl *clut; + rspl *out[MXDO]; + + void (*input_curves) (void *cntx, double *out_vals, double *in_vals); + void (*md_table) (void *cntx, double *out_vals, double *in_vals); + void (*output_curves)(void *cntx, double *out_vals, double *in_vals); + void *cntx; /* Context to callbacks */ + int chan; /* Current callback channel */ +} refi; + +refi *new_refi( + int id, /* Number of input dimensions */ + int od, /* Number of output dimensions */ + int inres, /* Desired input table resolution */ + int clutres, /* Desired clut table resolution */ + int outres, /* Desired output table resolution */ + + /* Callbacks to lookup the table values */ + void (*input_curves) (void *cntx, double *out_vals, double *in_vals), + void (*md_table) (void *cntx, double *out_vals, double *in_vals), + void (*output_curves)(void *cntx, double *out_vals, double *in_vals), + void *cntx /* Context to callbacks */ +); + +void refi_free(refi *r); + + +/* Component interpolations */ +void refi_input(void *cntx, double *out_vals, double *in_vals); +void refi_clut(void *cntx, double *out_vals, double *in_vals); +void refi_output(void *cntx, double *out_vals, double *in_vals); + -- cgit v1.2.3