aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/skcms/src/TransferFunction.h
blob: 1f32831db4b3302d61bbe5e70aa898fb4e1aa29a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright 2018 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#pragma once

// TransferFunction.h contains skcms-private APIs for working with skcms_TransferFunction.

#include <stdbool.h>

bool skcms_TransferFunction_isValid(const skcms_TransferFunction*);

float skcms_TransferFunction_eval(const skcms_TransferFunction*, float);

bool skcms_TransferFunction_invert(const skcms_TransferFunction*, skcms_TransferFunction*);

// Fit c,d,f parameters of an skcms_TransferFunction to the first 2 < L ≤ N
// evenly-spaced points on an skcms_Curve within a given tolerance, returning L.
int skcms_fit_linear(const skcms_Curve*, int N, float tol, float* c, float* d, float* f);