#include "common/darktable.h"
#include "curve_tools.h"
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
|
| float | spline_cubic_val (int n, float t[], float tval, float y[], float ypp[]) |
| |
| float | catmull_rom_val (int n, float x[], float xval, float y[], float tangents[]) |
| |
| float * | spline_cubic_set (int n, float t[], float y[]) |
| |
| float * | catmull_rom_set (int n, float x[], float y[]) |
| |
| float * | monotone_hermite_set (int n, float x[], float y[]) |
| |
| float * | d3_np_fs (int n, float a[], float b[]) |
| |
| static float * | spline_cubic_set_internal (int n, float t[], float y[], int ibcbeg, float ybcbeg, int ibcend, float ybcend) |
| |
| float * | interpolate_set (int n, float x[], float y[], unsigned int type) |
| |
| float | interpolate_val (int n, float x[], float xval, float y[], float tangents[], unsigned int type) |
| |
| int | CurveDataSample (CurveData *curve, CurveSample *sample) |
| |
|
| static const int | curvedata_anchors_max = 20 |
| |
| float(* | spline_val [])(int, float[], float, float[], float[]) = { spline_cubic_val, catmull_rom_val, catmull_rom_val } |
| |
| float *(* | spline_set [])(int, float[], float[]) = { spline_cubic_set, catmull_rom_set, monotone_hermite_set } |
| |
◆ EPSILON
| #define EPSILON 2 * FLT_MIN |
◆ MAX_ITER
◆ catmull_rom_set()
| float * catmull_rom_set |
( |
int |
n, |
|
|
float |
x[], |
|
|
float |
y[] |
|
) |
| |
References i, m, n, and x.
◆ catmull_rom_val()
| float catmull_rom_val |
( |
int |
n, |
|
|
float |
x[], |
|
|
float |
xval, |
|
|
float |
y[], |
|
|
float |
tangents[] |
|
) |
| |
References h, i, n, and x.
◆ CurveDataSample()
References CT_ERROR, CT_SUCCESS, dt_free, i, interpolate_set(), interpolate_val(), CurveData::m_anchors, CurveData::m_max_x, CurveData::m_max_y, CurveData::m_min_x, CurveData::m_min_y, CurveData::m_numAnchors, CurveSample::m_outputRes, CurveSample::m_Samples, CurveSample::m_samplingRes, CurveData::m_spline_type, n, CurveAnchorPoint::x, x, and CurveAnchorPoint::y.
Referenced by dt_draw_curve_calc_values(), get_error(), and main().
◆ d3_np_fs()
| float * d3_np_fs |
( |
int |
n, |
|
|
float |
a[], |
|
|
float |
b[] |
|
) |
| |
◆ interpolate_set()
| float * interpolate_set |
( |
int |
n, |
|
|
float |
x[], |
|
|
float |
y[], |
|
|
unsigned int |
type |
|
) |
| |
◆ interpolate_val()
| float interpolate_val |
( |
int |
n, |
|
|
float |
x[], |
|
|
float |
xval, |
|
|
float |
y[], |
|
|
float |
tangents[], |
|
|
unsigned int |
type |
|
) |
| |
◆ monotone_hermite_set()
| float * monotone_hermite_set |
( |
int |
n, |
|
|
float |
x[], |
|
|
float |
y[] |
|
) |
| |
◆ spline_cubic_set()
| float * spline_cubic_set |
( |
int |
n, |
|
|
float |
t[], |
|
|
float |
y[] |
|
) |
| |
◆ spline_cubic_set_internal()
| static float * spline_cubic_set_internal |
( |
int |
n, |
|
|
float |
t[], |
|
|
float |
y[], |
|
|
int |
ibcbeg, |
|
|
float |
ybcbeg, |
|
|
int |
ibcend, |
|
|
float |
ybcend |
|
) |
| |
|
static |
◆ spline_cubic_val()
| float spline_cubic_val |
( |
int |
n, |
|
|
float |
t[], |
|
|
float |
tval, |
|
|
float |
y[], |
|
|
float |
ypp[] |
|
) |
| |
ypval = ( y[ival+1] - y[ival] ) / h
- ( ypp[ival+1] / 6.0E+00 + ypp[ival] / 3.0E+00 ) * h
- dt * ( ypp[ival]
- dt * ( 0.5E+00 * ( ypp[ival+1] - ypp[ival] ) / h ) );
yppval = ypp[ival] + dt * ( ypp[ival+1] - ypp[ival] ) / h;
References h, i, n, and t.
◆ curvedata_anchors_max
| const int curvedata_anchors_max = 20 |
|
static |
◆ spline_set
◆ spline_val
| float(* spline_val[])(int, float[], float, float[], float[]) |
( |
int |
, |
|
|
float |
[], |
|
|
float |
, |
|
|
float |
[], |
|
|
float |
[] |
|
) |
| = { spline_cubic_val, catmull_rom_val, catmull_rom_val } |