![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "widgets/bauhaus.h"#include "common/colorspaces_inline_conversions.h"#include "pixel/chromatic_adaptation.h"#include "system/macros.h"#include "system/openmp.h"#include "system/target_clones.h"#include "system/mem_alloc.h"#include "system/simd.h"#include "common/logging.h"#include "common/module_versioning.h"#include "caches/pixelpipe_cache_alloc.h"#include "pixel/bspline.h"#include "common/image.h"#include "develop/iop_profile.h"#include "common/opencl.h"#include "develop/develop.h"#include "develop/imageop_gui.h"#include "develop/imageop_math.h"#include "iop/noise_generator.h"#include "math/openmp_maths.h"#include "develop/tiling.h"#include "widgets/paint.h"#include "gui/color_picker_proxy.h"#include "gui/application.h"#include "math/gaussian_elimination.h"#include "iop/iop_api.h"#include "develop/imageop.h"#include "widgets/draw.h"#include <assert.h>#include <math.h>#include <stdlib.h>#include <string.h>#include <time.h>#include "widgets/label.h"#include "widgets/notebook.h"#include "widgets/scroll_wrap.h"#include "widgets/widget_style.h"#include "gui/screen_metrics.h"
Include dependency graph for filmicrgb.c:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_iop_filmic_rgb_spline_t |
| struct | dt_iop_filmicrgb_params_t |
| struct | dt_iop_filmicrgb_gui_button_data_t |
| struct | dt_iop_filmicrgb_gui_data_t |
| struct | dt_iop_filmicrgb_data_t |
| struct | dt_iop_filmicrgb_global_data_t |
| struct | dt_iop_filmicrgb_v3_geometry_t |
| struct | dt_iop_filmicrgb_v3_nodes_t |
| struct | dt_iop_filmicrgb_simd_matrices_t |
Macros | |
| #define | INVERSE_SQRT_3 0.5773502691896258f |
| #define | SAFETY_MARGIN 0.01f |
| #define | DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(1) |
| #define | MAX_NUM_SCALES 10 |
| #define | CIE_Y_1931_to_CIE_Y_2006(x) (1.05785528f * (x)) |
| #define | ORDER_4 5 |
| #define | ORDER_3 4 |
| #define | LOGBASE 20.f |
Functions | |
| static gboolean | _filmic_is_agx (const dt_iop_filmicrgb_colorscience_type_t v) |
| const char * | name () |
| const char * | aliases () |
| const char ** | description (struct dt_iop_module_t *self) |
| int | default_group () |
| int | flags () |
| int | default_colorspace (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| 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) |
| static gboolean | dt_iop_filmic_rgb_compute_spline (const dt_iop_filmicrgb_params_t *const p, struct dt_iop_filmic_rgb_spline_t *const spline) |
| static gboolean | filmic_v3_compute_geometry (const dt_iop_filmicrgb_params_t *const p, dt_iop_filmicrgb_v3_geometry_t *const geometry) |
| static gboolean | filmic_v3_compute_nodes_from_legacy (const dt_iop_filmicrgb_params_t *const p, dt_iop_filmicrgb_v3_geometry_t *const geometry, dt_iop_filmicrgb_v3_nodes_t *const nodes) |
| static void | filmic_v3_legacy_to_direct (const dt_iop_filmicrgb_params_t *const p, float *const toe, float *const shoulder) |
| static void | filmic_v3_direct_to_legacy (const dt_iop_filmicrgb_params_t *const p, const float toe, const float shoulder, float *const latitude, float *const balance) |
| static void | convert_to_spline_v3 (dt_iop_filmicrgb_params_t *n) |
| 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 | __attribute__ ((always_inline)) |
| __OMP_DECLARE_SIMD__ (aligned(pixel:16) uniform(variant, work_profile)) | |
| static float | log_tonemapping (const float x, const float grey, const float black, const float dynamic_range) |
| static float | exp_tonemapping_v2 (const float x, const float grey, const float black, const float dynamic_range) |
| __OMP_DECLARE_SIMD__ (aligned(M1, M2, M3, M4 :16) uniform(M1, M2, M3, M4, M5, latitude_min, latitude_max)) | |
| static float | linear_saturation (const float x, const float luminance, const float saturation) |
| static __DT_CLONE_TARGETS__ gint | mask_clipped_pixels (const float *const restrict in, float *const restrict mask, const float normalize, const float feathering, const size_t width, const size_t height, const size_t ch) |
| static void | inpaint_noise (const float *const in, const float *const mask, float *const inpainted, const float noise_level, const float threshold, const dt_noise_distribution_t noise_distribution, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | wavelets_reconstruct_RGB (const float *const restrict HF, const float *const restrict LF, const float *const restrict texture, const float *const restrict mask, float *const restrict reconstructed, const size_t width, const size_t height, const size_t ch, const float gamma, const float gamma_comp, const float beta, const float beta_comp, const float delta, const size_t s, const size_t scales) |
| static __DT_CLONE_TARGETS__ void | wavelets_reconstruct_ratios (const float *const restrict HF, const float *const restrict LF, const float *const restrict texture, const float *const restrict mask, float *const restrict reconstructed, const size_t width, const size_t height, const size_t ch, const float gamma, const float gamma_comp, const float beta, const float beta_comp, const float delta, const size_t s, const size_t scales) |
| static __DT_CLONE_TARGETS__ void | init_reconstruct (const float *const restrict in, const float *const restrict mask, float *const restrict reconstructed, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | wavelets_detail_level (const float *const restrict detail, const float *const restrict LF, float *const restrict HF, float *const restrict texture, const size_t width, const size_t height, const size_t ch) |
| static __DT_CLONE_TARGETS__ int | get_scales (const dt_dev_pixelpipe_t *const pipe, const dt_iop_roi_t *roi_in, const dt_dev_pixelpipe_iop_t *const piece) |
| static int | reconstruct_highlights (const dt_dev_pixelpipe_t *const pipe, const float *const restrict in, const float *const restrict mask, float *const restrict reconstructed, const dt_iop_filmicrgb_reconstruction_type_t variant, const size_t ch, const dt_iop_filmicrgb_data_t *const data, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_in, const dt_iop_roi_t *const roi_out) |
| static __DT_CLONE_TARGETS__ void | filmic_split_v1 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | filmic_split_v2_v3 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | filmic_chroma_v1 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const int variant, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | filmic_chroma_v2_v3 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const int variant, const size_t width, const size_t height, const size_t ch, const dt_iop_filmicrgb_colorscience_type_t colorscience_version) |
| static void | filmic_prepare_simd_matrices (const dt_colormatrix_t input_matrix, const dt_colormatrix_t output_matrix, const dt_colormatrix_t export_input_matrix, const dt_colormatrix_t export_output_matrix, dt_iop_filmicrgb_simd_matrices_t *const simd_matrices) |
| static __DT_CLONE_TARGETS__ void | filmic_chroma_v4 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_order_iccprofile_info_t *const export_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const int variant, const size_t width, const size_t height, const size_t ch, const dt_iop_filmicrgb_colorscience_type_t colorscience_version, const float display_black, const float display_white) |
| static __DT_CLONE_TARGETS__ void | filmic_split_v4 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_order_iccprofile_info_t *const export_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const int variant, const size_t width, const size_t height, const size_t ch, const dt_iop_filmicrgb_colorscience_type_t colorscience_version, const float display_black, const float display_white) |
| static __DT_CLONE_TARGETS__ void | filmic_v5 (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_order_iccprofile_info_t *const export_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const size_t width, const size_t height, const size_t ch, const float display_black, const float display_white) |
| static void | _filmic_agx_xyz_D50_to_Yrg (const dt_aligned_pixel_t xyz_D50, dt_aligned_pixel_t Yrg) |
| static void | _filmic_agx_Yrg_to_xyz_D50 (const dt_aligned_pixel_t Yrg, dt_aligned_pixel_t xyz_D50) |
| static void | _mat3_identity (dt_colormatrix_t M) |
| static gboolean | _filmic_agx_build_displaced (const dt_iop_order_iccprofile_info_t *const work_profile, const float inset[3], const float rotation[3], dt_colormatrix_t M) |
| static void | filmic_agx_prepare_bracket (const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_filmicrgb_colorscience_type_t variant, dt_colormatrix_t inset, dt_colormatrix_t outset) |
| static __DT_CLONE_TARGETS__ void | filmic_agx (const float *const restrict in, float *const restrict out, const dt_iop_order_iccprofile_info_t *const work_profile, const dt_iop_order_iccprofile_info_t *const export_profile, const dt_iop_filmicrgb_data_t *const data, const dt_iop_filmic_rgb_spline_t spline, const size_t width, const size_t height, const size_t ch, const float display_black, const float display_white) |
| static __DT_CLONE_TARGETS__ void | display_mask (const float *const restrict mask, float *const restrict out, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | compute_ratios (const float *const restrict in, float *const restrict norms, float *const restrict ratios, const dt_iop_order_iccprofile_info_t *const work_profile, const int variant, const size_t width, const size_t height) |
| static __DT_CLONE_TARGETS__ void | restore_ratios (float *const restrict ratios, const float *const restrict norms, const size_t width, const size_t height) |
| static const dt_iop_order_iccprofile_info_t * | _filmic_get_output_profile (const dt_dev_pixelpipe_t *pipe, const dt_iop_filmicrgb_data_t *const data) |
| void | tiling_callback (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, struct dt_develop_tiling_t *tiling) |
| __DT_CLONE_TARGETS__ int | process (dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, const void *const restrict ivoid, void *const restrict ovoid) |
| static cl_int | reconstruct_highlights_cl (const dt_dev_pixelpipe_t *pipe, cl_mem in, cl_mem mask, cl_mem reconstructed, const dt_iop_filmicrgb_reconstruction_type_t variant, dt_iop_filmicrgb_global_data_t *const gd, const dt_iop_filmicrgb_data_t *const data, const dt_dev_pixelpipe_iop_t *piece, const dt_iop_roi_t *const roi_in) |
| int | process_cl (struct dt_iop_module_t *self, const dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece, cl_mem dev_in, cl_mem dev_out) |
| static void | apply_auto_grey (dt_iop_module_t *self, const dt_iop_order_iccprofile_info_t *const work_profile) |
| static void | apply_auto_black (dt_iop_module_t *self, const dt_iop_order_iccprofile_info_t *const work_profile) |
| static void | apply_auto_white_point_source (dt_iop_module_t *self, const dt_iop_order_iccprofile_info_t *const work_profile) |
| static void | apply_autotune (dt_iop_module_t *self, const dt_iop_order_iccprofile_info_t *const work_profile) |
| void | autoset (struct dt_iop_module_t *self, const struct dt_dev_pixelpipe_t *pipe, const struct dt_dev_pixelpipe_iop_t *piece, const void *i) |
| void | color_picker_apply (dt_iop_module_t *self, GtkWidget *picker, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static void | show_mask_callback (GtkToggleButton *button, GdkEventButton *event, gpointer user_data) |
| static float | filmic_sigmoid_scale (const float limit_x, const float limit_y, const float transition_x, const float transition_y, const float slope, const float power) |
| void | commit_params (dt_iop_module_t *self, dt_iop_params_t *p1, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | gui_focus (struct dt_iop_module_t *self, gboolean in) |
| gboolean | runtime_data_hash (struct dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, const dt_dev_pixelpipe_iop_t *piece) |
| void | init_pipe (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| void | cleanup_pipe (dt_iop_module_t *self, dt_dev_pixelpipe_t *pipe, dt_dev_pixelpipe_iop_t *piece) |
| static void | filmic_gui_sync_toe_shoulder (dt_iop_module_t *self) |
| static void | toe_shoulder_callback (GtkWidget *slider, gpointer user_data) |
| void | gui_update (dt_iop_module_t *self) |
| Refresh GUI controls from current params and configuration. | |
| void | reload_defaults (dt_iop_module_t *module) |
| void | init_global (dt_iop_module_so_t *module) |
| void | cleanup_global (dt_iop_module_so_t *module) |
| void | gui_reset (dt_iop_module_t *self) |
| static void | dt_cairo_draw_arrow (cairo_t *cr, double origin_x, double origin_y, double destination_x, double destination_y, gboolean show_head) |
| void | filmic_gui_draw_icon (cairo_t *cr, struct dt_iop_filmicrgb_gui_button_data_t *button, struct dt_iop_filmicrgb_gui_data_t *g) |
| static gboolean | dt_iop_tonecurve_draw (GtkWidget *widget, cairo_t *crf, gpointer user_data) |
| static gboolean | area_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) |
| static gboolean | area_enter_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | area_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static gboolean | area_motion_notify (GtkWidget *widget, GdkEventMotion *event, gpointer user_data) |
| static gboolean | area_scroll_callback (GtkWidget *widget, GdkEventScroll *event, gpointer user_data) |
| void | gui_init (dt_iop_module_t *self) |
| void | gui_changed (dt_iop_module_t *self, GtkWidget *w, void *previous) |
Definition at line 1803 of file filmicrgb.c.
| #define DT_GUI_CURVE_EDITOR_INSET DT_PIXEL_APPLY_DPI(1) |
Definition at line 98 of file filmicrgb.c.
| #define INVERSE_SQRT_3 0.5773502691896258f |
Definition at line 95 of file filmicrgb.c.
| #define LOGBASE 20.f |
Definition at line 4225 of file filmicrgb.c.
| #define MAX_NUM_SCALES 10 |
Definition at line 1179 of file filmicrgb.c.
| #define ORDER_3 4 |
Definition at line 3606 of file filmicrgb.c.
| #define ORDER_4 5 |
Definition at line 3605 of file filmicrgb.c.
| #define SAFETY_MARGIN 0.01f |
Definition at line 96 of file filmicrgb.c.
| typedef enum dt_iop_filmic_rgb_gui_mode_t dt_iop_filmic_rgb_gui_mode_t |
| typedef struct dt_iop_filmic_rgb_spline_t dt_iop_filmic_rgb_spline_t |
| typedef struct dt_iop_filmicrgb_data_t dt_iop_filmicrgb_data_t |
| typedef struct dt_iop_filmicrgb_global_data_t dt_iop_filmicrgb_global_data_t |
| typedef struct dt_iop_filmicrgb_gui_data_t dt_iop_filmicrgb_gui_data_t |
DOCUMENTATION
This code ports :
The ACES log implementation is taken from the profile_gamma.c IOP where it works in camera RGB space. Here, it works on an arbitrary RGB space. ProPhotoRGB has been chosen for its wide gamut coverage and for conveniency because it's already in darktable's libs. Any other RGB working space could work. This chouice could (should) also be exposed to the user.
The filmic curves are tonecurves intended to simulate the luminance transfer function of film with "S" curves. These could be reproduced in the tonecurve.c IOP, however what we offer here is a parametric interface useful to remap accurately and promptly the middle grey to any arbitrary value chosen accordingly to the destination space.
The combined use of both define a modern way to deal with large dynamic range photographs by remapping the values with a comprehensive interface avoiding many of the back and forth adjustments darktable is prone to enforce.
| typedef struct dt_iop_filmicrgb_params_t dt_iop_filmicrgb_params_t |
| typedef struct dt_iop_filmicrgb_simd_matrices_t dt_iop_filmicrgb_simd_matrices_t |
| typedef struct dt_iop_filmicrgb_v3_geometry_t dt_iop_filmicrgb_v3_geometry_t |
| typedef struct dt_iop_filmicrgb_v3_nodes_t dt_iop_filmicrgb_v3_nodes_t |
| Enumerator | |
|---|---|
| DT_FILMIC_NOISE_UNIFORM | |
| DT_FILMIC_NOISE_GAUSSIAN | |
| DT_FILMIC_NOISE_POISSONIAN | |
Definition at line 222 of file filmicrgb.c.
| Enumerator | |
|---|---|
| DT_FILMIC_GUI_LOOK | |
| DT_FILMIC_GUI_BASECURVE | |
| DT_FILMIC_GUI_BASECURVE_LOG | |
| DT_FILMIC_GUI_RANGES | |
| DT_FILMIC_GUI_LAST | |
Definition at line 212 of file filmicrgb.c.
Definition at line 156 of file filmicrgb.c.
| Enumerator | |
|---|---|
| DT_FILMIC_CURVE_POLY_4 | |
| DT_FILMIC_CURVE_POLY_3 | |
| DT_FILMIC_CURVE_RATIONAL | |
| DT_FILMIC_CURVE_SIGMOID | |
Definition at line 143 of file filmicrgb.c.
| Enumerator | |
|---|---|
| DT_FILMIC_GUI_BUTTON_TYPE | |
| DT_FILMIC_GUI_BUTTON_LABELS | |
| DT_FILMIC_GUI_BUTTON_LAST | |
Definition at line 265 of file filmicrgb.c.
DOCUMENTATION
This code ports :
The ACES log implementation is taken from the profile_gamma.c IOP where it works in camera RGB space. Here, it works on an arbitrary RGB space. ProPhotoRGB has been chosen for its wide gamut coverage and for conveniency because it's already in darktable's libs. Any other RGB working space could work. This chouice could (should) also be exposed to the user.
The filmic curves are tonecurves intended to simulate the luminance transfer function of film with "S" curves. These could be reproduced in the tonecurve.c IOP, however what we offer here is a parametric interface useful to remap accurately and promptly the middle grey to any arbitrary value chosen accordingly to the destination space.
The combined use of both define a modern way to deal with large dynamic range photographs by remapping the values with a comprehensive interface avoiding many of the back and forth adjustments darktable is prone to enforce.
| Enumerator | |
|---|---|
| DT_FILMIC_METHOD_NONE | |
| DT_FILMIC_METHOD_MAX_RGB | |
| DT_FILMIC_METHOD_LUMINANCE | |
| DT_FILMIC_METHOD_POWER_NORM | |
| DT_FILMIC_METHOD_EUCLIDEAN_NORM_V2 | |
| DT_FILMIC_METHOD_EUCLIDEAN_NORM_V1 | |
Definition at line 132 of file filmicrgb.c.
| Enumerator | |
|---|---|
| DT_FILMIC_RECONSTRUCT_RGB | |
| DT_FILMIC_RECONSTRUCT_RATIOS | |
Definition at line 195 of file filmicrgb.c.
| Enumerator | |
|---|---|
| DT_FILMIC_SPLINE_VERSION_V1 | |
| DT_FILMIC_SPLINE_VERSION_V2 | |
| DT_FILMIC_SPLINE_VERSION_V3 | |
Definition at line 182 of file filmicrgb.c.
|
inlinestatic |
Definition at line 929 of file filmicrgb.c.
References value.
| __OMP_DECLARE_SIMD__ | ( | aligned(M1, M2, M3, M4 :16) uniform(M1, M2, M3, M4, M5, latitude_min, latitude_max) | ) |
Definition at line 1042 of file filmicrgb.c.
References DT_FILMIC_CURVE_POLY_3, DT_FILMIC_CURVE_POLY_4, DT_FILMIC_CURVE_SIGMOID, type, and x.
| __OMP_DECLARE_SIMD__ | ( | aligned(pixel:16) uniform(variant, work_profile) | ) |
Definition at line 1018 of file filmicrgb.c.
|
static |
Definition at line 2324 of file filmicrgb.c.
References _filmic_agx_xyz_D50_to_Yrg(), _filmic_agx_Yrg_to_xyz_D50(), CLAMPF, dt_colormatrix_mul(), FALSE, i, M, mat3SSEinv(), dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, r, and TRUE.
Referenced by filmic_agx_prepare_bracket().
|
inlinestatic |
Definition at line 2294 of file filmicrgb.c.
References LMS_to_Yrg(), and XYZ_to_LMS().
Referenced by _filmic_agx_build_displaced().
|
inlinestatic |
Definition at line 2303 of file filmicrgb.c.
References LMS_to_XYZ(), XYZ_D65_to_D50_CAT16, and Yrg_to_LMS().
Referenced by _filmic_agx_build_displaced().
|
static |
Definition at line 2630 of file filmicrgb.c.
References dt_colorspaces_add_profile(), dt_ioppr_get_pipe_output_profile_info(), DT_PROFILE_NORMAL, IS_NULL_PTR, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::matrix_out, dt_iop_filmicrgb_data_t::softproof_filename, dt_iop_filmicrgb_data_t::softproof_intent, dt_iop_filmicrgb_data_t::softproof_mode, and dt_iop_filmicrgb_data_t::softproof_type.
Referenced by process(), and process_cl().
|
inlinestatic |
Definition at line 175 of file filmicrgb.c.
References DT_FILMIC_COLORSCIENCE_V10, DT_FILMIC_COLORSCIENCE_V6, DT_FILMIC_COLORSCIENCE_V7, DT_FILMIC_COLORSCIENCE_V8, DT_FILMIC_COLORSCIENCE_V9, and v.
Referenced by gui_changed(), process(), and process_cl().
|
inlinestatic |
Definition at line 2312 of file filmicrgb.c.
Referenced by filmic_agx_prepare_bracket().
| const char * aliases | ( | ) |
Definition at line 407 of file filmicrgb.c.
|
static |
Definition at line 3422 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_FILMIC_METHOD_MAX_RGB, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_min, TRUE, and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
Definition at line 3394 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_dev_add_history_item, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, TRUE, and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
Definition at line 3449 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_FILMIC_METHOD_MAX_RGB, dt_gui_freeze_begin, dt_gui_freeze_end, dt_gui_widgets_suppressed(), g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color_max, TRUE, and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
Definition at line 3475 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_set(), dt_dev_add_history_item, DT_FILMIC_METHOD_MAX_RGB, dt_gui_freeze_begin, dt_gui_freeze_end, g, dt_iop_module_t::gui_data, p, dt_iop_module_t::params, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, TRUE, and dt_iop_module_t::widget.
Referenced by color_picker_apply().
|
static |
Definition at line 5142 of file filmicrgb.c.
References dt_conf_set_int(), DT_FILMIC_GUI_BUTTON_LABELS, DT_FILMIC_GUI_BUTTON_LAST, DT_FILMIC_GUI_BUTTON_TYPE, DT_FILMIC_GUI_LOOK, DT_FILMIC_GUI_RANGES, dt_gui_widgets_suppressed(), dt_iop_request_focus(), FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 5229 of file filmicrgb.c.
References dt_gui_widgets_suppressed(), dt_iop_module_t::enabled, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 5242 of file filmicrgb.c.
References dt_gui_widgets_suppressed(), dt_iop_module_t::enabled, FALSE, g, dt_iop_module_t::gui_data, and TRUE.
Referenced by gui_init().
|
static |
Definition at line 5254 of file filmicrgb.c.
References DT_FILMIC_GUI_BUTTON_LABELS, DT_FILMIC_GUI_BUTTON_LAST, DT_FILMIC_GUI_BUTTON_TYPE, dt_gui_widgets_suppressed(), FALSE, g, dt_iop_module_t::gui_data, i, TRUE, and x.
Referenced by gui_init().
|
static |
| void autoset | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| const void * | i | ||
| ) |
Definition at line 3514 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_buffer_dsc_t::channels, dt_iop_module_t::dev, dt_dev_pixelpipe_iop_t::dsc_in, dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_current_profile_info(), dt_iop_roi_t::height, i, dt_develop_t::iop, IS_NULL_PTR, k, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, max, min, dt_iop_order_iccprofile_info_t::nonlinearlut, NORM_MIN, p, dt_iop_module_t::params, dt_dev_pixelpipe_iop_t::roi_out, dt_iop_roi_t::width, and XYZ.
| void cleanup_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 4199 of file filmicrgb.c.
References dt_iop_module_so_t::data, dt_free, dt_opencl_free_kernel(), dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_compute_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_init_reconstruct, dt_iop_filmicrgb_global_data_t::kernel_filmic_inpaint_noise, dt_iop_filmicrgb_global_data_t::kernel_filmic_mask, dt_iop_filmicrgb_global_data_t::kernel_filmic_restore_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_chroma, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_split, dt_iop_filmicrgb_global_data_t::kernel_filmic_show_mask, dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_detail, and dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_reconstruct.
| void cleanup_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 4084 of file filmicrgb.c.
References dt_dev_pixelpipe_iop_t::data, and dt_free_align.
| void color_picker_apply | ( | dt_iop_module_t * | self, |
| GtkWidget * | picker, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 3563 of file filmicrgb.c.
References apply_auto_black(), apply_auto_grey(), apply_auto_white_point_source(), apply_autotune(), dt_iop_module_t::dev, DT_DEBUG_DEV, dt_ioppr_get_iop_work_profile_info(), dt_ioppr_get_pipe_current_profile_info(), dt_print(), g, dt_iop_module_t::gui_data, dt_develop_t::iop, dt_iop_module_t::picked_color, dt_iop_module_t::picked_color_max, dt_iop_module_t::picked_color_min, and void().
| void commit_params | ( | dt_iop_module_t * | self, |
| dt_iop_params_t * | p1, | ||
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 3945 of file filmicrgb.c.
References CLAMPF, d, dt_dev_pixelpipe_iop_t::data, dt_colorprofiles_get_settings(), DT_COLORSPACE_NONE, DT_DEV_PIXELPIPE_FULL, DT_FILMIC_COLORSCIENCE_V4, DT_FILMIC_SPLINE_VERSION_V3, DT_INTENT_PERCEPTUAL, dt_iop_filmic_rgb_compute_spline(), DT_PROFILE_NORMAL, dt_colorprofiles_settings_t::mode, p, dt_colorprofiles_settings_t::softproof_filename, dt_colorprofiles_settings_t::softproof_intent, dt_colorprofiles_settings_t::softproof_type, and dt_dev_pixelpipe_t::type.
|
inlinestatic |
Definition at line 2584 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_omploop_sfence, dt_simd_set1(), height, k, NORM_MIN, and width.
Referenced by process().
|
inlinestatic |
Definition at line 603 of file filmicrgb.c.
References DT_FILMIC_SPLINE_VERSION_V1, DT_FILMIC_SPLINE_VERSION_V3, dt_iop_filmic_rgb_compute_spline(), n, SAFETY_MARGIN, dt_iop_filmic_rgb_spline_t::x, and dt_iop_filmic_rgb_spline_t::y.
Referenced by legacy_params().
| int default_colorspace | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 433 of file filmicrgb.c.
References IOP_CS_RGB.
| int default_group | ( | ) |
Definition at line 423 of file filmicrgb.c.
References IOP_GROUP_TONES.
| const char ** description | ( | struct dt_iop_module_t * | self | ) |
Definition at line 412 of file filmicrgb.c.
References dt_iop_set_description().
|
inlinestatic |
Definition at line 2571 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_omploop_sfence, dt_simd_set1(), height, k, out, and width.
Referenced by process().
|
inlinestatic |
Definition at line 4227 of file filmicrgb.c.
References DT_PIXEL_APPLY_DPI, and M_PI.
Referenced by dt_iop_tonecurve_draw().
|
inlinestatic |
Now we have 3 segments :
BUT : in case some nodes overlap, we need to remove them to avoid degenerating of the curve
For background and details, see : https://eng.aurelienpierre.com/2018/11/30/filmic-darktable-and-the-quest-of-the-hdr-tone-mapping/#filmic_s_curve
Definition at line 3626 of file filmicrgb.c.
References coeff, dt_iop_filmicrgb_v3_geometry_t::contrast, dt_iop_filmicrgb_v3_geometry_t::contrast_clamped, DT_FILMIC_CURVE_POLY_3, DT_FILMIC_CURVE_POLY_4, DT_FILMIC_CURVE_SIGMOID, DT_FILMIC_SPLINE_VERSION_V1, DT_FILMIC_SPLINE_VERSION_V3, FALSE, filmic_sigmoid_scale(), filmic_v3_compute_nodes_from_legacy(), g, gauss_solve(), dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, ORDER_3, ORDER_4, p, dt_iop_filmicrgb_v3_nodes_t::shoulder_display, dt_iop_filmicrgb_v3_nodes_t::shoulder_log, dt_iop_filmicrgb_v3_nodes_t::toe_display, dt_iop_filmicrgb_v3_nodes_t::toe_log, dt_iop_filmic_rgb_spline_t::type, x, dt_iop_filmic_rgb_spline_t::x, and dt_iop_filmic_rgb_spline_t::y.
Referenced by commit_params(), convert_to_spline_v3(), and dt_iop_tonecurve_draw().
|
static |
Definition at line 4294 of file filmicrgb.c.
References clamp_simd(), dt_bauhaus_get_global(), dt_cairo_draw_arrow(), dt_cairo_image_surface_create(), dt_draw_grid(), dt_draw_loglog_grid(), DT_FILMIC_COLORSCIENCE_V1, DT_FILMIC_COLORSCIENCE_V2, DT_FILMIC_COLORSCIENCE_V3, DT_FILMIC_GUI_BASECURVE, DT_FILMIC_GUI_BASECURVE_LOG, DT_FILMIC_GUI_BUTTON_LAST, DT_FILMIC_GUI_LOOK, DT_FILMIC_GUI_RANGES, dt_gui_set_pango_resolution(), dt_iop_filmic_rgb_compute_spline(), dt_log_scale_axis(), DT_PIXEL_APPLY_DPI, dtgtk_cairo_paint_refresh(), dtgtk_cairo_paint_text_label(), E, exp_tonemapping_v2(), FALSE, filmic_gui_draw_icon(), g, dt_iop_module_t::gui_data, i, INNER_PADDING, k, log_tonemapping(), LOGBASE, M_PI, NORM_MIN, p, dt_iop_module_t::params, dt_bauhaus_t::quad_width, SAFETY_MARGIN, set_color(), TRUE, value, x, and dt_iop_filmic_rgb_spline_t::y.
Referenced by gui_init().
|
inlinestatic |
Definition at line 1034 of file filmicrgb.c.
References x.
Referenced by dt_iop_tonecurve_draw(), filmic_chroma_v4(), filmic_v5(), and process_cl().
|
inlinestatic |
Definition at line 2475 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::agx_beta_hue, ch, CLAMPF, dt_omploop_sfence, dt_iop_filmicrgb_simd_matrices_t::export_input, dt_iop_filmicrgb_simd_matrices_t::export_output, filmic_agx_prepare_bracket(), filmic_prepare_simd_matrices(), height, dt_iop_filmicrgb_simd_matrices_t::input, k, dt_iop_order_iccprofile_info_t::matrix_in, out, dt_iop_filmicrgb_simd_matrices_t::output, transpose_3xSSE(), dt_iop_filmicrgb_data_t::version, and width.
Referenced by process().
|
static |
Definition at line 2370 of file filmicrgb.c.
References _filmic_agx_build_displaced(), _mat3_identity(), DT_FILMIC_COLORSCIENCE_V10, DT_FILMIC_COLORSCIENCE_V6, DT_FILMIC_COLORSCIENCE_V7, DT_FILMIC_COLORSCIENCE_V8, DT_FILMIC_COLORSCIENCE_V9, and mat3SSEinv().
Referenced by filmic_agx(), and process_cl().
|
inlinestatic |
Definition at line 1596 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, CLAMPF, dt_camera_rgb_luminance(), dt_iop_filmicrgb_data_t::dynamic_range, for_each_channel, dt_iop_filmicrgb_data_t::grey_source, height, k, dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, linear_saturation(), log_tonemapping(), dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::nonlinearlut, NORM_MIN, out, dt_iop_filmicrgb_data_t::output_power, dt_iop_filmicrgb_data_t::saturation, dt_iop_filmicrgb_data_t::sigma_shoulder, dt_iop_filmicrgb_data_t::sigma_toe, dt_iop_filmic_rgb_spline_t::type, width, and dt_iop_filmic_rgb_spline_t::y.
Referenced by process().
|
inlinestatic |
Definition at line 1650 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, ch, CLAMPF, DT_FILMIC_COLORSCIENCE_V3, dt_iop_filmicrgb_data_t::dynamic_range, for_each_channel, dt_iop_filmicrgb_data_t::grey_source, height, k, dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, log_tonemapping(), dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, NORM_MIN, out, dt_iop_filmicrgb_data_t::output_power, dt_iop_filmicrgb_data_t::saturation, dt_iop_filmicrgb_data_t::sigma_shoulder, dt_iop_filmicrgb_data_t::sigma_toe, dt_iop_filmic_rgb_spline_t::type, width, and dt_iop_filmic_rgb_spline_t::y.
Referenced by process().
|
inlinestatic |
Definition at line 2133 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, ch, dt_omploop_sfence, dt_iop_filmicrgb_data_t::dynamic_range, exp_tonemapping_v2(), dt_iop_filmicrgb_simd_matrices_t::export_input, dt_iop_filmicrgb_simd_matrices_t::export_output, filmic_prepare_simd_matrices(), dt_iop_filmicrgb_data_t::grey_source, height, dt_iop_filmicrgb_simd_matrices_t::input, k, out, dt_iop_filmicrgb_simd_matrices_t::output, dt_iop_filmicrgb_data_t::saturation, and width.
Referenced by process().
| void filmic_gui_draw_icon | ( | cairo_t * | cr, |
| struct dt_iop_filmicrgb_gui_button_data_t * | button, | ||
| struct dt_iop_filmicrgb_gui_data_t * | g | ||
| ) |
Definition at line 4254 of file filmicrgb.c.
References color, dt_bauhaus_get_global(), DT_PIXEL_APPLY_DPI, g, dt_bauhaus_t::graph_fg, dt_iop_filmicrgb_gui_button_data_t::h, dt_iop_filmicrgb_gui_button_data_t::icon, dt_iop_filmicrgb_gui_button_data_t::left, dt_iop_filmicrgb_gui_button_data_t::mouse_hover, dt_iop_filmicrgb_gui_button_data_t::top, and dt_iop_filmicrgb_gui_button_data_t::w.
Referenced by dt_iop_tonecurve_draw().
|
static |
Definition at line 4090 of file filmicrgb.c.
References dt_bauhaus_slider_set(), dt_gui_freeze_begin, dt_gui_freeze_end, filmic_v3_legacy_to_direct(), g, dt_iop_module_t::gui_data, p, and dt_iop_module_t::params.
Referenced by gui_changed(), and gui_update().
|
inlinestatic |
Prepare the transposed matrix rows used by the v4/v5 SIMD pixel path.
The v4/v5 CPU code repeatedly applies the same four RGB/LMS matrices to every pixel. We transpose them once here, then cache the 3 SIMD rows so the processing loops only perform the actual vector products.
Definition at line 2060 of file filmicrgb.c.
References dt_iop_filmicrgb_simd_matrices_t::export_input, dt_iop_filmicrgb_simd_matrices_t::export_output, dt_iop_filmicrgb_simd_matrices_t::input, dt_iop_filmicrgb_simd_matrices_t::output, row, and transpose_3xSSE().
Referenced by filmic_agx(), filmic_chroma_v4(), filmic_split_v4(), and filmic_v5().
|
inlinestatic |
Definition at line 3614 of file filmicrgb.c.
Referenced by dt_iop_filmic_rgb_compute_spline().
|
inlinestatic |
Definition at line 1514 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, CLAMPF, dt_camera_rgb_luminance(), dt_iop_filmicrgb_data_t::dynamic_range, dt_iop_filmicrgb_data_t::grey_source, height, k, dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, linear_saturation(), log_tonemapping(), dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::nonlinearlut, NORM_MIN, out, dt_iop_filmicrgb_data_t::output_power, dt_iop_filmicrgb_data_t::saturation, dt_iop_filmicrgb_data_t::sigma_shoulder, dt_iop_filmicrgb_data_t::sigma_toe, dt_iop_filmic_rgb_spline_t::type, width, and dt_iop_filmic_rgb_spline_t::y.
Referenced by process().
|
inlinestatic |
Definition at line 1555 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, CLAMPF, dt_camera_rgb_luminance(), dt_iop_filmicrgb_data_t::dynamic_range, dt_iop_filmicrgb_data_t::grey_source, height, k, dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, linear_saturation(), log_tonemapping(), dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, dt_iop_order_iccprofile_info_t::matrix_in, dt_iop_order_iccprofile_info_t::nonlinearlut, NORM_MIN, out, dt_iop_filmicrgb_data_t::output_power, dt_iop_filmicrgb_data_t::saturation, dt_iop_filmicrgb_data_t::sigma_shoulder, dt_iop_filmicrgb_data_t::sigma_toe, dt_iop_filmic_rgb_spline_t::type, width, and dt_iop_filmic_rgb_spline_t::y.
Referenced by process().
|
inlinestatic |
Definition at line 2181 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, ch, dt_omploop_sfence, dt_iop_filmicrgb_simd_matrices_t::export_input, dt_iop_filmicrgb_simd_matrices_t::export_output, filmic_prepare_simd_matrices(), height, dt_iop_filmicrgb_simd_matrices_t::input, k, out, dt_iop_filmicrgb_simd_matrices_t::output, dt_iop_filmicrgb_data_t::saturation, and width.
Referenced by process().
|
inlinestatic |
Recover the affine segment used by the v3 spline generator from the user parameters.
Toe and shoulder are defined on that affine segment, as percentages of the available room between middle grey and the points where the current slope hits display black and display white.
Definition at line 477 of file filmicrgb.c.
References dt_iop_filmicrgb_v3_geometry_t::black_display, dt_iop_filmicrgb_v3_geometry_t::contrast, dt_iop_filmicrgb_v3_geometry_t::contrast_clamped, DT_FILMIC_SPLINE_VERSION_V3, FALSE, dt_iop_filmicrgb_v3_geometry_t::grey_display, dt_iop_filmicrgb_v3_geometry_t::grey_log, dt_iop_filmicrgb_v3_geometry_t::linear_intercept, p, SAFETY_MARGIN, TRUE, dt_iop_filmicrgb_v3_geometry_t::white_display, dt_iop_filmicrgb_v3_geometry_t::xmax, and dt_iop_filmicrgb_v3_geometry_t::xmin.
Referenced by filmic_v3_compute_nodes_from_legacy(), and filmic_v3_direct_to_legacy().
|
inlinestatic |
Place the v3 toe and shoulder nodes from the legacy latitude/balance controls.
The linear mid-tones segment is first expanded to the admissible [xmin ; xmax] interval for the current contrast, then latitude picks a symmetric position around middle grey. Balance finally translates that pair of nodes along the slope to favor shadows or highlights.
Definition at line 522 of file filmicrgb.c.
References dt_iop_filmicrgb_v3_geometry_t::contrast, FALSE, filmic_v3_compute_geometry(), dt_iop_filmicrgb_v3_geometry_t::grey_log, dt_iop_filmicrgb_v3_geometry_t::linear_intercept, p, dt_iop_filmicrgb_v3_nodes_t::shoulder_display, dt_iop_filmicrgb_v3_nodes_t::shoulder_log, dt_iop_filmicrgb_v3_nodes_t::toe_display, dt_iop_filmicrgb_v3_nodes_t::toe_log, TRUE, dt_iop_filmicrgb_v3_geometry_t::xmax, and dt_iop_filmicrgb_v3_geometry_t::xmin.
Referenced by dt_iop_filmic_rgb_compute_spline(), and filmic_v3_legacy_to_direct().
|
inlinestatic |
Definition at line 569 of file filmicrgb.c.
References filmic_v3_compute_geometry(), dt_iop_filmicrgb_v3_geometry_t::grey_log, p, dt_iop_filmicrgb_v3_geometry_t::xmax, and dt_iop_filmicrgb_v3_geometry_t::xmin.
Referenced by toe_shoulder_callback().
|
inlinestatic |
Definition at line 551 of file filmicrgb.c.
References filmic_v3_compute_nodes_from_legacy(), dt_iop_filmicrgb_v3_geometry_t::grey_log, p, dt_iop_filmicrgb_v3_nodes_t::shoulder_log, dt_iop_filmicrgb_v3_nodes_t::toe_log, dt_iop_filmicrgb_v3_geometry_t::xmax, and dt_iop_filmicrgb_v3_geometry_t::xmin.
Referenced by filmic_gui_sync_toe_shoulder().
|
inlinestatic |
Definition at line 2227 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, dt_iop_filmicrgb_data_t::black_source, ch, DT_FILMIC_METHOD_MAX_RGB, dt_omploop_sfence, dt_simd_set1(), dt_iop_filmicrgb_data_t::dynamic_range, exp_tonemapping_v2(), dt_iop_filmicrgb_simd_matrices_t::export_input, dt_iop_filmicrgb_simd_matrices_t::export_output, filmic_prepare_simd_matrices(), dt_iop_filmicrgb_data_t::grey_source, height, dt_iop_filmicrgb_simd_matrices_t::input, k, out, dt_iop_filmicrgb_simd_matrices_t::output, dt_iop_filmicrgb_data_t::saturation, and width.
Referenced by process().
| int flags | ( | ) |
Definition at line 428 of file filmicrgb.c.
References IOP_FLAGS_ALLOW_TILING, IOP_FLAGS_INCLUDE_IN_STYLES, and IOP_FLAGS_SUPPORTS_BLENDING.
|
static |
Definition at line 1390 of file filmicrgb.c.
References BSPLINE_FSIZE, dt_dev_pixelpipe_iop_t::buf_in, dt_dev_get_module_scale(), dt_iop_roi_t::height, dt_dev_pixelpipe_t::iscale, MAX, MAX_NUM_SCALES, size, and dt_iop_roi_t::width.
Referenced by reconstruct_highlights(), reconstruct_highlights_cl(), and tiling_callback().
| void gui_changed | ( | dt_iop_module_t * | self, |
| GtkWidget * | w, | ||
| void * | previous | ||
| ) |
Definition at line 5657 of file filmicrgb.c.
References _filmic_is_agx(), dt_bauhaus_slider_set(), dt_bauhaus_widget_set_label(), DT_FILMIC_COLORSCIENCE_V1, DT_FILMIC_COLORSCIENCE_V2, DT_FILMIC_COLORSCIENCE_V3, DT_FILMIC_COLORSCIENCE_V4, DT_FILMIC_COLORSCIENCE_V5, dt_gui_freeze_begin, dt_gui_freeze_end, FALSE, filmic_gui_sync_toe_shoulder(), g, dt_iop_module_t::gui_data, IS_NULL_PTR, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_update(), and toe_shoulder_callback().
| void gui_focus | ( | struct dt_iop_module_t * | self, |
| gboolean | in | ||
| ) |
Definition at line 4054 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_dev_pixelpipe_update_history_main, FALSE, g, and dt_iop_module_t::gui_data.
| void gui_init | ( | dt_iop_module_t * | self | ) |
Definition at line 5334 of file filmicrgb.c.
References area_button_press(), area_enter_notify(), area_leave_notify(), area_motion_notify(), area_scroll_callback(), dt_bauhaus_combobox_from_params(), dt_bauhaus_get_global(), dt_bauhaus_slider_from_params(), dt_bauhaus_slider_new_with_range(), dt_bauhaus_slider_set_digits(), dt_bauhaus_slider_set_format(), dt_bauhaus_slider_set_soft_max(), dt_bauhaus_slider_set_soft_range(), dt_bauhaus_toggle_from_params(), dt_bauhaus_widget_set_label(), DT_COLOR_PICKER_AREA, dt_color_picker_new(), DT_FILMIC_GUI_LOOK, dt_gui_add_class(), DT_GUI_BOX_SPACING, DT_GUI_MODULE, dt_iop_togglebutton_new(), dt_iop_tonecurve_draw(), dt_ui_label_new(), dt_ui_notebook_new(), dt_ui_notebook_page(), dt_ui_notebook_set_picker_owner(), dt_ui_resizable_drawing_area(), dt_ui_section_label_new(), dt_widget_scroll_mask(), dtgtk_cairo_paint_showmask(), DTGTK_TOGGLEBUTTON, dtgtk_togglebutton_set_paint(), FALSE, g, IOP_GUI_ALLOC, show_mask_callback(), toe_shoulder_callback(), TRUE, and dt_iop_module_t::widget.
| void gui_reset | ( | dt_iop_module_t * | self | ) |
Definition at line 4220 of file filmicrgb.c.
References dt_iop_color_picker_reset(), and TRUE.
| void gui_update | ( | dt_iop_module_t * | self | ) |
Refresh GUI controls from current params and configuration.
Definition at line 4117 of file filmicrgb.c.
References dt_conf_get_int(), dt_iop_color_picker_reset(), FALSE, filmic_gui_sync_toe_shoulder(), g, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and TRUE.
| void init_global | ( | dt_iop_module_so_t * | module | ) |
Definition at line 4174 of file filmicrgb.c.
References dt_opencl_create_kernel(), dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_compute_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_init_reconstruct, dt_iop_filmicrgb_global_data_t::kernel_filmic_inpaint_noise, dt_iop_filmicrgb_global_data_t::kernel_filmic_mask, dt_iop_filmicrgb_global_data_t::kernel_filmic_restore_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_chroma, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_split, dt_iop_filmicrgb_global_data_t::kernel_filmic_show_mask, dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_detail, and dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_reconstruct.
| void init_pipe | ( | dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 4078 of file filmicrgb.c.
References dt_dev_pixelpipe_iop_t::data, dt_dev_pixelpipe_iop_t::data_size, and dt_calloc_align().
|
inlinestatic |
Definition at line 1364 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, for_each_channel, height, k, and width.
Referenced by reconstruct_highlights().
|
inlinestatic |
Definition at line 1210 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, DT_ALIGNED_ARRAY, dt_noise_generator_simd(), FALSE, flip, for_each_channel, height, i, noise, sigma, splitmix32(), state, threshold, TRUE, weight(), width, and xoshiro128plus().
Referenced by process().
| 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 | ||
| ) |
Definition at line 438 of file filmicrgb.c.
References dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::datatype, default_input_format(), and TYPE_FLOAT.
| int legacy_params | ( | dt_iop_module_t * | self, |
| const void *const | old_params, | ||
| const int | old_version, | ||
| void * | new_params, | ||
| const int | new_version | ||
| ) |
Definition at line 666 of file filmicrgb.c.
References convert_to_spline_v3(), d, dt_iop_module_t::default_params, DT_FILMIC_COLORSCIENCE_V1, DT_FILMIC_CURVE_POLY_3, DT_FILMIC_CURVE_POLY_4, DT_FILMIC_SPLINE_VERSION_V1, DT_FILMIC_SPLINE_VERSION_V2, DT_FILMIC_SPLINE_VERSION_V3, FALSE, n, and TRUE.
|
inlinestatic |
Definition at line 1173 of file filmicrgb.c.
Referenced by filmic_chroma_v1(), filmic_split_v1(), filmic_split_v2_v3(), and test_linear_saturation().
|
inlinestatic |
Definition at line 1027 of file filmicrgb.c.
References clamp_simd(), and x.
Referenced by dt_iop_tonecurve_draw(), filmic_chroma_v1(), filmic_chroma_v2_v3(), filmic_split_v1(), and filmic_split_v2_v3().
|
inlinestatic |
Definition at line 1181 of file filmicrgb.c.
References __OMP_PARALLEL_FOR_SIMD__, ch, clamp_simd(), height, k, normalize(), weight(), and width.
Referenced by process().
| const char * name | ( | ) |
Definition at line 402 of file filmicrgb.c.
| __DT_CLONE_TARGETS__ int process | ( | dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| const void *const restrict | ivoid, | ||
| void *const restrict | ovoid | ||
| ) |
The log2(x) -> -INF when x -> 0 thus very low values (noise) will get even lower, resulting in noise negative amplification, which leads to pepper noise in shadows. To avoid that, we need to clip values that are noise for sure. Using 16 bits RAW data, the black value (known by rawspeed for every manufacturer) could be used as a threshold. However, at this point of the pixelpipe, the RAW levels have already been corrected and everything can happen with black levels in the exposure module. So we define the threshold as the first non-null 16 bit integer
Definition at line 2668 of file filmicrgb.c.
References _filmic_get_output_profile(), _filmic_is_agx(), ch, compute_ratios(), dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, display_mask(), dt_dev_get_module_scale(), DT_DEV_PIXELPIPE_DISPLAY_MASK, DT_DEV_PIXELPIPE_FULL, DT_FILMIC_COLORSCIENCE_V1, DT_FILMIC_COLORSCIENCE_V2, DT_FILMIC_COLORSCIENCE_V3, DT_FILMIC_COLORSCIENCE_V4, DT_FILMIC_COLORSCIENCE_V5, DT_FILMIC_METHOD_EUCLIDEAN_NORM_V1, DT_FILMIC_METHOD_NONE, DT_FILMIC_RECONSTRUCT_RATIOS, DT_FILMIC_RECONSTRUCT_RGB, dt_ioppr_get_pipe_work_profile_info(), dt_pixelpipe_cache_alloc_align_float, dt_pixelpipe_cache_free_align, filmic_agx(), filmic_chroma_v1(), filmic_chroma_v2_v3(), filmic_chroma_v4(), filmic_split_v1(), filmic_split_v2_v3(), filmic_split_v4(), filmic_v5(), g, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, dt_iop_roi_t::height, dt_iop_filmicrgb_data_t::high_quality_reconstruction, i, inpaint_noise(), IS_NULL_PTR, mask_clipped_pixels(), dt_dev_pixelpipe_t::mask_display, dt_iop_filmicrgb_data_t::noise_distribution, dt_iop_filmicrgb_data_t::noise_level, dt_iop_filmicrgb_data_t::normalize, out, dt_iop_filmicrgb_data_t::output_power, ovoid, dt_iop_filmicrgb_data_t::preserve_color, dt_iop_filmicrgb_data_t::reconstruct_feather, reconstruct_highlights(), dt_iop_filmicrgb_data_t::reconstruct_threshold, restore_ratios(), dt_dev_pixelpipe_iop_t::roi_in, dt_dev_pixelpipe_iop_t::roi_out, dt_dev_pixelpipe_t::type, dt_iop_filmicrgb_data_t::version, and dt_iop_roi_t::width.
| int process_cl | ( | struct dt_iop_module_t * | self, |
| const dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece, | ||
| cl_mem | dev_in, | ||
| cl_mem | dev_out | ||
| ) |
Definition at line 3066 of file filmicrgb.c.
References _filmic_get_output_profile(), _filmic_is_agx(), d, dt_dev_pixelpipe_iop_t::data, dt_iop_module_t::dev, dt_dev_pixelpipe_t::devid, DT_DEBUG_OPENCL, dt_dev_get_module_scale(), DT_DEV_PIXELPIPE_FULL, DT_FILMIC_COLORSCIENCE_V5, DT_FILMIC_METHOD_NONE, DT_FILMIC_RECONSTRUCT_RATIOS, DT_FILMIC_RECONSTRUCT_RGB, dt_ioppr_build_iccprofile_params_cl(), dt_ioppr_free_iccprofile_params_cl(), dt_ioppr_get_pipe_work_profile_info(), dt_opencl_alloc_device(), dt_opencl_alloc_device_buffer(), dt_opencl_copy_host_to_device_constant(), dt_opencl_enqueue_kernel_2d(), dt_opencl_read_buffer_from_device(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), dt_opencl_write_buffer_to_device(), dt_print(), error(), exp_tonemapping_v2(), FALSE, filmic_agx_prepare_bracket(), g, dt_iop_module_t::global_data, dt_develop_t::gui_attached, dt_iop_module_t::gui_data, height, dt_iop_roi_t::height, i, IS_NULL_PTR, dt_iop_filmicrgb_global_data_t::kernel_filmic_compute_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_inpaint_noise, dt_iop_filmicrgb_global_data_t::kernel_filmic_mask, dt_iop_filmicrgb_global_data_t::kernel_filmic_restore_ratios, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_chroma, dt_iop_filmicrgb_global_data_t::kernel_filmic_rgb_split, dt_iop_filmicrgb_global_data_t::kernel_filmic_show_mask, dt_iop_filmic_rgb_spline_t::latitude_max, dt_iop_filmic_rgb_spline_t::latitude_min, dt_iop_filmic_rgb_spline_t::M1, dt_iop_filmic_rgb_spline_t::M2, dt_iop_filmic_rgb_spline_t::M3, dt_iop_filmic_rgb_spline_t::M4, dt_iop_filmic_rgb_spline_t::M5, dt_iop_order_iccprofile_info_t::matrix_in, pack_3xSSE_to_3x4(), reconstruct_highlights_cl(), dt_dev_pixelpipe_iop_t::roi_in, ROUNDUPDHT, ROUNDUPDWD, TRUE, dt_dev_pixelpipe_t::type, dt_iop_filmic_rgb_spline_t::type, width, dt_iop_roi_t::width, and dt_iop_filmic_rgb_spline_t::y.
|
inlinestatic |
Definition at line 1410 of file filmicrgb.c.
References blur_2D_Bspline(), ch, delta, DT_FILMIC_RECONSTRUCT_RATIOS, DT_FILMIC_RECONSTRUCT_RGB, dt_get_num_openmp_threads(), dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_free_align, error(), FALSE, get_scales(), dt_iop_roi_t::height, init_reconstruct(), IS_NULL_PTR, dt_iop_filmicrgb_data_t::reconstruct_bloom_vs_details, dt_iop_filmicrgb_data_t::reconstruct_grey_vs_color, dt_iop_filmicrgb_data_t::reconstruct_structure_vs_texture, TRUE, wavelets_detail_level(), wavelets_reconstruct_ratios(), wavelets_reconstruct_RGB(), and dt_iop_roi_t::width.
Referenced by process().
|
inlinestatic |
Definition at line 2845 of file filmicrgb.c.
References delta, dt_dev_pixelpipe_t::devid, dt_opencl_alloc_device(), dt_opencl_enqueue_copy_image(), dt_opencl_enqueue_kernel_2d(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_local_buffer_opt(), dt_opencl_release_mem_object(), dt_opencl_set_kernel_arg(), error(), get_scales(), height, dt_iop_roi_t::height, IS_NULL_PTR, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_horizontal_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical, dt_iop_filmicrgb_global_data_t::kernel_filmic_bspline_vertical_local, dt_iop_filmicrgb_global_data_t::kernel_filmic_init_reconstruct, dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_detail, dt_iop_filmicrgb_global_data_t::kernel_filmic_wavelets_reconstruct, dt_iop_filmicrgb_data_t::reconstruct_bloom_vs_details, dt_iop_filmicrgb_data_t::reconstruct_grey_vs_color, dt_iop_filmicrgb_data_t::reconstruct_structure_vs_texture, ROUNDUP, ROUNDUPDHT, ROUNDUPDWD, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, width, dt_iop_roi_t::width, and dt_opencl_local_buffer_t::xoffset.
Referenced by process_cl().
| void reload_defaults | ( | dt_iop_module_t * | module | ) |
Definition at line 4139 of file filmicrgb.c.
References dt_iop_filmicrgb_params_t::black_point_source, d, dt_iop_module_t::dev, dt_image_get_exposure_bias(), dt_image_needs_rawprepare(), dt_image_pipe_class(), dt_image_pipe_class_name(), dt_iop_fmt_log, dt_develop_t::image_storage, and dt_iop_module_t::workflow_enabled.
|
inlinestatic |
Definition at line 2602 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, clamp_simd(), dt_omploop_sfence, for_each_channel, height, k, and width.
Referenced by process().
| gboolean runtime_data_hash | ( | struct dt_iop_module_t * | self, |
| dt_dev_pixelpipe_t * | pipe, | ||
| const dt_dev_pixelpipe_iop_t * | piece | ||
| ) |
Definition at line 4068 of file filmicrgb.c.
References TRUE.
|
static |
Definition at line 3584 of file filmicrgb.c.
References dt_iop_module_t::dev, DT_DEV_PIXELPIPE_DISPLAY_NONE, DT_DEV_PIXELPIPE_DISPLAY_PASSTHRU, dt_dev_pixelpipe_update_history_main, dt_gui_widgets_suppressed(), dt_iop_set_cache_bypass(), g, dt_iop_module_t::gui_data, dt_iop_module_t::off, dt_iop_module_t::request_mask_display, and TRUE.
Referenced by gui_init().
| void tiling_callback | ( | struct dt_iop_module_t * | self, |
| const struct dt_dev_pixelpipe_t * | pipe, | ||
| const struct dt_dev_pixelpipe_iop_t * | piece, | ||
| struct dt_develop_tiling_t * | tiling | ||
| ) |
Definition at line 2648 of file filmicrgb.c.
References get_scales(), and dt_dev_pixelpipe_iop_t::roi_in.
Definition at line 4104 of file filmicrgb.c.
References dt_iop_module_t::dev, dt_bauhaus_slider_get(), dt_dev_add_history_item, dt_gui_widgets_suppressed(), filmic_v3_direct_to_legacy(), g, gui_changed(), dt_iop_module_t::gui_data, p, dt_iop_module_t::params, and TRUE.
Referenced by gui_init().
|
inlinestatic |
Definition at line 1380 of file filmicrgb.c.
References __OMP_PARALLEL_FOR_SIMD__, height, k, and width.
Referenced by reconstruct_highlights().
|
inlinestatic |
Definition at line 1304 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, __OMP_SIMD__, ch, delta, fmaxabsf(), height, k, linear, and width.
Referenced by reconstruct_highlights().
|
inlinestatic |
Definition at line 1252 of file filmicrgb.c.
References __OMP_PARALLEL_FOR__, __OMP_SIMD__, ch, delta, fmaxabsf(), height, k, and width.
Referenced by reconstruct_highlights().