![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "system/openmp.h"#include "system/target_clones.h"#include "pixel/lut3d.h"#include <math.h>
Include dependency graph for pixel/lut3d.c:Go to the source code of this file.
|
inlinestatic |
The LUT only samples the unit RGB cube. Outside that domain, extend the mapping by keeping the boundary deformation and adding back the part of the input that lies beyond the cube. This keeps identity LUTs truly neutral and avoids artificial clipping when the surrounding profile transform produces values slightly outside [0, 1].
Definition at line 46 of file pixel/lut3d.c.
References L.
|
inlinestatic |
Definition at line 25 of file pixel/lut3d.c.
References L.
Referenced by dt_lut3d_pyramid_interp(), dt_lut3d_tetrahedral_interp(), and dt_lut3d_trilinear_interp().
| void dt_lut3d_apply | ( | const float * | in, |
| float * | out, | ||
| size_t | pixel_nb, | ||
| const float * | clut, | ||
| uint16_t | level, | ||
| float | normalization, | ||
| dt_lut3d_interpolation_t | interpolation | ||
| ) |
Apply one interpolation model over a packed RGB CLUT.
The interpolation always happens in the normalized [0, 1] lattice domain. normalization lets callers map scene-referred RGB into that domain before lookup and restore the white level afterwards without rescaling the whole buffer in separate passes.
All modules using a dense RGB CLUT should go through this shared runtime so file-backed LUTs and procedurally-generated LUTs only differ by how they author the lattice values, not by how they traverse the cells.
Definition at line 297 of file pixel/lut3d.c.
References DT_LUT3D_INTERP_PYRAMID, DT_LUT3D_INTERP_TETRAHEDRAL, DT_LUT3D_INTERP_TRILINEAR, dt_lut3d_pyramid_interp(), dt_lut3d_tetrahedral_interp(), dt_lut3d_trilinear_interp(), L, and out.
Referenced by dt_colorrings_apply_rgb_lut(), and process().
| __DT_CLONE_TARGETS__ void dt_lut3d_pyramid_interp | ( | const float *const | in, |
| float *const | out, | ||
| const size_t | pixel_nb, | ||
| const float *const restrict | clut, | ||
| const uint16_t | level, | ||
| const float | normalization | ||
| ) |
Definition at line 222 of file pixel/lut3d.c.
References __OMP_PARALLEL_FOR__, _prepare_lut_input(), color, k, L, and out.
Referenced by dt_lut3d_apply().
| __DT_CLONE_TARGETS__ void dt_lut3d_tetrahedral_interp | ( | const float *const | in, |
| float *const | out, | ||
| const size_t | pixel_nb, | ||
| const float *const restrict | clut, | ||
| const uint16_t | level, | ||
| const float | normalization | ||
| ) |
Definition at line 63 of file pixel/lut3d.c.
References __OMP_PARALLEL_FOR__, _prepare_lut_input(), color, k, L, and out.
Referenced by dt_lut3d_apply().
| __DT_CLONE_TARGETS__ void dt_lut3d_trilinear_interp | ( | const float *const | in, |
| float *const | out, | ||
| const size_t | pixel_nb, | ||
| const float *const restrict | clut, | ||
| const uint16_t | level, | ||
| const float | normalization | ||
| ) |
Definition at line 157 of file pixel/lut3d.c.
References __OMP_PARALLEL_FOR__, _prepare_lut_input(), color, i, k, L, and out.
Referenced by dt_lut3d_apply().