![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <assert.h>#include <stdlib.h>#include <string.h>#include "bauhaus/bauhaus.h"#include "common/math.h"#include "control/control.h"#include "develop/develop.h"#include "develop/imageop.h"#include "develop/imageop_gui.h"#include "gui/gtk.h"#include "iop/iop_api.h"#include <gtk/gtk.h>#include <inttypes.h>
Include dependency graph for grain.c:Data Structures | |
| struct | dt_iop_grain_params_t |
| struct | dt_iop_grain_gui_data_t |
| struct | dt_iop_grain_data_t |
Macros | |
| #define | GRAIN_LIGHTNESS_STRENGTH_SCALE 0.15 |
| #define | GRAIN_HUE_COLORRANGE 0.392699082 |
| #define | GRAIN_HUE_STRENGTH_SCALE 0.25 |
| #define | GRAIN_SATURATION_STRENGTH_SCALE 0.25 |
| #define | GRAIN_RGB_STRENGTH_SCALE 0.25 |
| #define | GRAIN_SCALE_FACTOR 213.2 |
| #define | GRAIN_LUT_SIZE 128 |
| #define | GRAIN_LUT_DELTA_MAX 2.0 |
| #define | GRAIN_LUT_DELTA_MIN 0.0001 |
| #define | GRAIN_LUT_PAPER_GAMMA 1.0 |
| #define | FASTFLOOR(x) (x > 0 ? (int)(x) : (int)(x)-1) |
| #define | PRIME_LEVELS 4 |
Typedefs | |
| typedef enum _dt_iop_grain_channel_t | _dt_iop_grain_channel_t |
| typedef struct dt_iop_grain_params_t | dt_iop_grain_params_t |
| typedef struct dt_iop_grain_gui_data_t | dt_iop_grain_gui_data_t |
| typedef struct dt_iop_grain_data_t | dt_iop_grain_data_t |
Enumerations | |
| enum | _dt_iop_grain_channel_t { DT_GRAIN_CHANNEL_HUE = 0 , DT_GRAIN_CHANNEL_SATURATION , DT_GRAIN_CHANNEL_LIGHTNESS , DT_GRAIN_CHANNEL_RGB } |
Variables | |
| static int | grad3 [12][3] |
| static int | permutation [] |
| static int | perm [512] |
| #define GRAIN_HUE_COLORRANGE 0.392699082 |
| #define GRAIN_HUE_STRENGTH_SCALE 0.25 |
| #define GRAIN_LIGHTNESS_STRENGTH_SCALE 0.15 |
| #define GRAIN_LUT_DELTA_MAX 2.0 |
| #define GRAIN_LUT_DELTA_MIN 0.0001 |
| #define GRAIN_LUT_PAPER_GAMMA 1.0 |
| #define GRAIN_LUT_SIZE 128 |
| #define GRAIN_RGB_STRENGTH_SCALE 0.25 |
| #define GRAIN_SATURATION_STRENGTH_SCALE 0.25 |
| #define GRAIN_SCALE_FACTOR 213.2 |
| #define PRIME_LEVELS 4 |
| typedef enum _dt_iop_grain_channel_t _dt_iop_grain_channel_t |
| typedef struct dt_iop_grain_data_t dt_iop_grain_data_t |
| typedef struct dt_iop_grain_gui_data_t dt_iop_grain_gui_data_t |
| typedef struct dt_iop_grain_params_t dt_iop_grain_params_t |
|
static |
Referenced by process().
|
static |
References i, perm, and permutation.
Referenced by init_global().
| void cleanup_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void commit_params | ( | struct dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References d, dt_dev_pixelpipe_iop_t::data, evaluate_grain_lut(), and p.
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References IOP_CS_LAB.
| int default_group | ( | ) |
References IOP_GROUP_EFFECTS.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
References dt_iop_set_description().
|
static |
References GRAIN_LUT_PAPER_GAMMA, GRAIN_LUT_SIZE, i, paper_resp(), and paper_resp_inverse().
Referenced by commit_params().
| int flags | ( | ) |
References IOP_FLAGS_DEPRECATED, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
| void gui_init | ( | struct dt_iop_module_t * | self | ) |
| void init_global | ( | struct dt_iop_module_so_t * | self | ) |
References _simplex_noise_init().
| void init_pipe | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
| void input_format | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece, | ||
| dt_iop_buffer_dsc_t * | dsc | ||
| ) |
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
References dt_iop_grain_params_t::channel, n, and strength().
| const char * name | ( | ) |
|
static |
References delta, GRAIN_LUT_DELTA_MAX, and GRAIN_LUT_DELTA_MIN.
Referenced by evaluate_grain_lut().
|
static |
References delta, GRAIN_LUT_DELTA_MAX, and GRAIN_LUT_DELTA_MIN.
Referenced by evaluate_grain_lut().
| __DT_CLONE_TARGETS__ int process | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid | ||
| ) |
References __OMP_PARALLEL_FOR__, _hash_string(), _simplex_2d_noise(), dt_dev_pixelpipe_iop_t::buf_in, ch, dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_t::dev, dt_image_t::filename, GRAIN_LIGHTNESS_STRENGTH_SCALE, dt_iop_grain_data_t::grain_lut, dt_iop_roi_t::height, i, dt_develop_t::image_storage, noise, out, ovoid, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::scale, dt_iop_grain_data_t::scale, strength(), dt_iop_grain_data_t::strength, dt_iop_roi_t::width, x, dt_iop_roi_t::x, and dt_iop_roi_t::y.
|
static |
|
static |
Referenced by _simplex_noise_init(), process_data(), and ransac().
|
static |
Referenced by _simplex_noise_init(), encode_colorchecker(), and thinplate_match().