Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
noise_generator.h File Reference
+ Include dependency graph for src/develop/noise_generator.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum dt_noise_distribution_t dt_noise_distribution_t
 

Enumerations

enum  dt_noise_distribution_t {
  DT_NOISE_UNIFORM = 0 ,
  DT_NOISE_GAUSSIAN = 1 ,
  DT_NOISE_POISSONIAN = 2
}
 

Functions

static uint32_t splitmix32 (const uint64_t seed)
 
static uint32_t rol32 (const uint32_t x, const int k)
 
static float xoshiro128plus (uint32_t state[4])
 
 __OMP_DECLARE_SIMD__ (uniform(sigma) aligned(state:64)) static inline float uniform_noise(const float mu
 
 return (r *r - sigma *sigma)/4.f - 3.f/8.f
 
 __OMP_DECLARE_SIMD__ (uniform(distribution, param) aligned(state:64)) static inline float dt_noise_generator(const dt_noise_distribution_t distribution
 

Variables

const float sigma
 
const float uint32_t state [4]
 
const float const int flip
 
const float u2 = xoshiro128plus(state)
 
const float noise
 
return noise *sigma mu
 
const float r = noise * sigma + 2.0f * sqrtf(fmaxf(mu + 3.f / 8.f, 0.0f))
 
const float const float param
 

Typedef Documentation

◆ dt_noise_distribution_t

Enumeration Type Documentation

◆ dt_noise_distribution_t

Enumerator
DT_NOISE_UNIFORM 
DT_NOISE_GAUSSIAN 
DT_NOISE_POISSONIAN 

Function Documentation

◆ __OMP_DECLARE_SIMD__() [1/2]

__OMP_DECLARE_SIMD__ ( uniform(distribution, param) aligned(state:64)  ) const

◆ __OMP_DECLARE_SIMD__() [2/2]

__OMP_DECLARE_SIMD__ ( uniform(sigma) aligned(state:64)  ) const

◆ return()

return ( r *r - sigma sigma)

◆ rol32()

static uint32_t rol32 ( const uint32_t  x,
const int  k 
)
inlinestatic

References k, and x.

Referenced by xoshiro128plus().

◆ splitmix32()

static uint32_t splitmix32 ( const uint64_t  seed)
inlinestatic

◆ xoshiro128plus()

static float xoshiro128plus ( uint32_t  state[4])
inlinestatic

References rol32(), state, and t.

Variable Documentation

◆ flip

◆ mu

◆ noise

const float noise
Initial value:
= (flip) ? sqrtf(-2.0f * logf(u1)) * cosf(2.f * M_PI * u2) :
sqrtf(-2.0f * logf(u1)) * sinf(2.f * M_PI * u2)
#define M_PI
Definition math.h:45
const float u2
Definition src/develop/noise_generator.h:86
const float const int flip
Definition src/develop/noise_generator.h:78

Referenced by apply_auto_black(), apply_auto_black(), apply_auto_dynamic_range(), apply_auto_white_point_source(), apply_autotune(), apply_autotune(), compute_channel_noise(), dwt_denoise(), gaussian_noise_simd(), guide_laplacians(), init_presets(), inpaint_noise(), legacy_params(), make_noise(), poisson_noise_simd(), process(), process(), uniform_noise_simd(), wavelet_denoise(), and wavelet_denoise_xtrans().

◆ param

◆ r

const float r = noise * sigma + 2.0f * sqrtf(fmaxf(mu + 3.f / 8.f, 0.0f))

Referenced by _area_resized_callback(), _area_resized_callback(), _compute_effective_height(), _draw_samples(), _ellipse_draw_handles(), _ellipse_events_mouse_moved(), _get_map_extent(), _group_get_mask(), _hm_show_merge_report_popup(), _init_image_pin(), _init_place_pin(), _ioporder_draw_rounded_rect(), _maketaps_lanczos(), _paint_RGB_slider_stop(), _picker_project_opponent_to_display_rgb(), _points_to_transform(), _polygon_crop_to_roi(), _save_clut_callback(), _start_new_shape(), _update_RGB_colors(), _update_RGB_slider_stop(), _xy2matrix(), area_resized(), area_resized(), blur_vertical_16wide(), blur_vertical_16wide_Kahan(), blur_vertical_1wide(), blur_vertical_1wide_Kahan(), blur_vertical_4wide(), blur_vertical_4wide_Kahan(), build_tonecurve(), clampnan(), commit_params(), create_global_distortion_map(), create_lens_kernel(), define_patches(), dt_bauhaus_draw_quad(), dt_bauhaus_slider_set_stop(), dt_cache_arena_alloc(), dt_cache_arena_stats(), dt_colorrings_fill_lut_local_field(), dt_colorrings_fill_lut_sparse_local_field(), dt_draw_cairo_to_gdk_pixbuf(), dt_drawlayer_io_load_flat_rgba(), dt_imageio_open_rawspeed(), dt_imageio_open_rawspeed_sraw(), dt_interpolation_compute_sample(), dt_iop_channelmixer_shared_paint_row_sliders(), dt_masks_dynbuf_harvest(), dt_mipmap_cache_get_filename(), dt_pixelpipe_get_pipe_name(), dtgtk_cairo_paint_altered(), dtgtk_cairo_paint_label(), dtgtk_cairo_paint_label_flower(), dtgtk_cairo_paint_label_sel(), dtgtk_cairo_paint_masks_difference(), dtgtk_cairo_paint_masks_drawn_and_parametric(), dtgtk_cairo_paint_masks_exclusion(), dtgtk_cairo_paint_masks_gradient(), dtgtk_cairo_paint_masks_intersection(), dtgtk_cairo_paint_masks_parametric(), dtgtk_cairo_paint_masks_union(), dtgtk_cairo_paint_modulegroup_basics(), dtgtk_cairo_paint_star(), dtgtk_cairo_paint_unaltered(), dtgtk_cairo_paint_unratestar(), dtgtk_cairo_paint_waveform_overlaid(), dtgtk_cairo_paint_waveform_scope(), get_collect(), gui_init(), init_column_sums(), interpolate_color_xtrans(), legacy_params(), mix_warps(), pair_min(), poisson_noise_simd(), polar_decomposition(), ptr_array_find_sorted(), ptr_array_insert_sorted(), QR_dec(), ransac(), read_curveset(), read_ppm_header(), rect_improve(), rgb2hsl(), ri_ini(), scrolled(), PermutohedralLattice< D, VD >::slice(), sycc420_to_rgb(), sycc422_to_rgb(), sycc444_to_rgb(), sycc_to_rgb(), thinplate_kernel(), thinplate_match(), write_image(), Ych_to_Yrg(), Yrg_to_LMS(), and Yrg_to_Ych().

◆ sigma

◆ state

const float const int uint32_t state
Initial value:
{
return mu + 2.0f * (xoshiro128plus(state) - 0.5f) * sigma
const float uint32_t state[4]
Definition src/develop/noise_generator.h:72
const float sigma
Definition src/develop/noise_generator.h:71
return noise *sigma mu
Definition src/develop/noise_generator.h:89
static float xoshiro128plus(uint32_t state[4])
Definition src/develop/noise_generator.h:51

Referenced by _advance_smudge_pickup_state(), _apply_gui_button_pressed_state(), _apply_quadratic_dab_smoothing(), _apply_runtime_event(), _blendop_masks_get_inverse_icon(), _blendop_masks_get_op_icon(), _blendop_masks_group_button_pressed(), _blendop_masks_group_ctx_menu(), _blendop_masks_group_operation_callback(), _brush_events_button_pressed(), _brush_events_button_released(), _brush_events_mouse_scrolled(), _build_raw_segment_cubic_arclen_lut(), _build_runtime_schedule(), _button_draw(), _circle_events_button_pressed(), _circle_events_mouse_scrolled(), _color_picker_callback_button_press(), _compute_hud_brush_state(), _copy_toggled_callback(), _darkroom_locked_main_valid_for_zoom(), _darkroom_prepare_image_surface(), _darkroom_reset_expose_state(), _dev_module_update_multishow(), _dispatch_selected_shortcut(), _dispatch_selected_shortcut_idle(), _draw_brush_hud(), _drawlayer_modal_wait_tick(), _ellipse_events_button_pressed(), _ellipse_events_mouse_scrolled(), _emit_dab(), _emit_first_sample_if_needed(), _enforce_dab_center_spacing(), _ensure_pending_dabs(), _ensure_raw_inputs(), _event_cursor_draw(), _find_first_match(), _flush_pending_initial_if_needed(), _focus_toggle_callback(), _get_bounded_inside(), _get_combobox_max_width(), _gradient_events_button_pressed(), _gradient_events_mouse_scrolled(), _gradient_get_mask(), _gradient_get_mask_roi(), _gradient_slider_draw(), _gradient_slider_get_preferred_height(), _gradient_slider_get_preferred_width(), _group_get_mask_roi(), _icon_draw(), _lib_masks_update_item(), _margins_retrieve(), _paint_build_dab_cb(), _paint_compact_raw_input_queue(), _paint_input_starts_new_stroke(), _paint_process_one_raw_input(), _paint_reset_path_runtime_state(), _perform_runtime_commit_sequence(), _polygon_events_button_pressed(), _polygon_events_mouse_scrolled(), _polygon_get_mask(), _polygon_get_mask_roi(), _queue_action_from_shortcut(), _release_runtime_source(), _render_preview_surface(), _rt_set_worker_state(), _runtime_private(), _runtime_private_const(), _sample_raw_segment_cubic_arclen(), _sample_raw_segment_cubic_param(), _search_entry_changed(), _search_entry_key_pressed(), _set_iter_name(), _shortcut_edited(), _shortcut_search_button_press(), _shortcut_search_destroy(), _shortcut_search_move_selection(), _shortcut_search_row_activated(), _shortcut_search_selection_changed(), _simulate_color(), _slider_add_step(), _sync_buffer_state(), _sync_runtime_state_from_inputs(), _textnotes_load_job_state(), _thumbnail_btn_draw(), _togglebutton_draw(), _tree_reveal_func(), _update_foreach(), _update_manager_information(), _update_realtime_state(), _widget_auto_connect_buffer(), _widget_auto_connect_model(), _widget_auto_disconnect_buffer(), _widget_auto_disconnect_model(), _widget_auto_height_free(), _widget_auto_update(), _widget_draw(), _widget_set_size(), bucket_next(), bucket_next(), bucket_next(), button_pressed(), button_pressed(), button_pressed(), button_pressed(), button_released(), button_released(), color_picker_apply(), dt_accels_disable(), dt_accels_search(), dt_bauhaus_popup_draw(), dt_control_button_pressed(), dt_control_button_released(), dt_control_job_get_state(), dt_control_job_set_state(), dt_control_job_wait(), dt_dev_modules_update_multishow(), dt_dev_pixelpipe_cache_put_pinned_image(), dt_dev_pixelpipe_set_realtime(), dt_draw_paint_to_pixbuf(), dt_drawlayer_build_worker_input_dab(), dt_drawlayer_paint_finalize_path(), dt_drawlayer_paint_interpolate_path(), dt_drawlayer_paint_path_state_reset(), dt_drawlayer_paint_queue_raw_input(), dt_drawlayer_paint_runtime_ensure_smudge_pixels(), dt_drawlayer_paint_runtime_get_smudge_pickup(), dt_drawlayer_paint_runtime_get_stroke_damage(), dt_drawlayer_paint_runtime_get_stroke_seed(), dt_drawlayer_paint_runtime_have_smudge_pickup(), dt_drawlayer_paint_runtime_note_dab_damage(), dt_drawlayer_paint_runtime_prepare_dab_context(), dt_drawlayer_paint_runtime_private_create(), dt_drawlayer_paint_runtime_private_destroy(), dt_drawlayer_paint_runtime_private_reset(), dt_drawlayer_paint_runtime_set_smudge_pickup(), dt_drawlayer_paint_runtime_set_stroke_seed(), dt_drawlayer_paint_runtime_smudge_height(), dt_drawlayer_paint_runtime_smudge_pixels(), dt_drawlayer_paint_runtime_smudge_width(), dt_drawlayer_paint_runtime_state_create(), dt_drawlayer_paint_runtime_state_destroy(), dt_drawlayer_paint_runtime_state_reset(), dt_drawlayer_process_state_cleanup(), dt_drawlayer_process_state_init(), dt_drawlayer_process_state_invalidate(), dt_drawlayer_process_state_reset_stroke(), dt_drawlayer_runtime_manager_cleanup(), dt_drawlayer_runtime_manager_init(), dt_drawlayer_runtime_manager_note_buffer_lock(), dt_drawlayer_runtime_manager_note_sidecar_io(), dt_drawlayer_runtime_manager_note_thread(), dt_drawlayer_runtime_manager_update(), dt_drawlayer_set_pipeline_realtime_mode(), dt_drawlayer_ui_cursor_clear(), dt_drawlayer_wait_for_rasterization_modal(), dt_gui_widget_init_auto_height(), dt_iop_set_cache_bypass(), dt_key_modifier_state(), dt_masks_create_menu(), dt_masks_events_button_pressed(), dt_masks_events_button_released(), dt_masks_get_lock_mode(), dt_masks_reset_bezier_ctrl_points(), dt_masks_toggle_bezier_node_type(), dt_modifier_is(), dt_modifiers_include(), dt_noise_generator_simd(), dt_ui_restore_panels(), dt_ui_toggle_panels_visibility(), dt_view_manager_button_pressed(), dt_view_manager_button_released(), dt_view_manager_scrolled(), gaussian_noise_simd(), guide_laplacians(), inpaint_mask(), inpaint_noise(), make_noise(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), poisson_noise_simd(), process_cl(), process_nlmeans_cl(), scrolled(), scrolled(), scrolled(), scrolled(), setup_color_variables(), show_pango_text(), tree_reveal_func(), uniform_noise_simd(), xoshiro128plus(), and xoshiro128plus().

◆ u2