![]() |
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 } |
Functions | |
| int | legacy_params (dt_iop_module_t *self, const void *const old_params, const int old_version, void *new_params, const int new_version) |
| static void | _simplex_noise_init () |
| static double | dot (int g[], double x, double y, double z) |
| static double | _simplex_noise (double xin, double yin, double zin) |
| static double | _simplex_2d_noise (double x, double y, uint32_t octaves, double persistance, double z) |
| static float | paper_resp (float exposure, float mb, float gp) |
| static float | paper_resp_inverse (float density, float mb, float gp) |
| static void | evaluate_grain_lut (float *grain_lut, const float mb) |
| static float | dt_lut_lookup_2d_1c (const float *grain_lut, const float x, const float y) |
| const char * | name () |
| const char ** | description (struct dt_iop_module_t *self) |
| int | flags () |
| int | default_group () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static unsigned int | _hash_string (char *s) |
| void | process (struct dt_iop_module_t *self, dt_dev_pixelpipe_iop_t *piece, const void *const ivoid, void *const ovoid, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| 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) |
| void | init_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | init_global (struct dt_iop_module_so_t *self) |
| void | gui_init (struct dt_iop_module_t *self) |
Variables | |
| static int | grad3 [12][3] |
| static int | permutation [] |
| static int | perm [512] |
| #define FASTFLOOR | ( | x | ) | (x > 0 ? (int)(x) : (int)(x)-1) |
| #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 _simplex_noise(), and f().
Referenced by process().
References dot(), FASTFLOOR, grad3, and perm.
Referenced by _simplex_2d_noise().
|
static |
References 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.
| 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 | ||
| ) |
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| 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().
Referenced by _get_base_value(), _simplex_noise(), dn_weight(), dt_camera_rgb_luminance(), JzAzBz_2_XYZ(), matrix_dot(), store(), thinplate_match(), and XYZ_to_JzAzBz().
|
static |
References CLAMPS, and GRAIN_LUT_SIZE.
Referenced by process().
|
static |
References GRAIN_LUT_PAPER_GAMMA, GRAIN_LUT_SIZE, paper_resp(), and paper_resp_inverse().
Referenced by commit_params().
| int flags | ( | ) |
References 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, and dt_dev_pixelpipe_iop_t::data_size.
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
| const char * name | ( | ) |
|
static |
References GRAIN_LUT_DELTA_MAX, and GRAIN_LUT_DELTA_MIN.
Referenced by evaluate_grain_lut().
|
static |
References GRAIN_LUT_DELTA_MAX, and GRAIN_LUT_DELTA_MIN.
Referenced by evaluate_grain_lut().
| void process | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const | ivoid, | ||
| void *const | ovoid, | ||
| const dt_iop_roi_t *const | roi_in, | ||
| const dt_iop_roi_t *const | roi_out | ||
| ) |
References _hash_string(), _simplex_2d_noise(), dt_dev_pixelpipe_iop_t::buf_in, dt_dev_pixelpipe_iop_t::colors, dt_dev_pixelpipe_iop_t::data, dt_lut_lookup_2d_1c(), GRAIN_LIGHTNESS_STRENGTH_SCALE, dt_iop_grain_data_t::grain_lut, dt_iop_roi_t::height, dt_dev_pixelpipe_iop_t::pipe, dt_iop_roi_t::scale, dt_iop_grain_data_t::scale, strength(), dt_iop_grain_data_t::strength, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
|
static |
Referenced by _simplex_noise().
|
static |
Referenced by _simplex_noise(), _simplex_noise_init(), process_data(), and ransac().
|
static |
Referenced by _simplex_noise_init(), encode_colorchecker(), and thinplate_match().