![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/color_picker.h"#include "common/bspline.h"#include "common/darktable.h"#include "common/colorspaces_inline_conversions.h"#include "common/iop_profile.h"#include "develop/format.h"#include "develop/imageop.h"#include "develop/imageop_math.h"
Include dependency graph for color_picker.c:Functions | |
| static size_t | _box_size (const int *const box) |
| static void | rgb_to_JzCzhz (const dt_aligned_pixel_t rgb, dt_aligned_pixel_t JzCzhz, const dt_iop_order_iccprofile_info_t *const profile) |
| static void | _color_picker_convert_buffer (const float *const restrict input, float *const restrict output, const size_t pixels, const dt_iop_colorspace_type_t image_cst, const dt_iop_colorspace_type_t picker_cst, const dt_iop_order_iccprofile_info_t *const profile) |
| Convert a 4-channel sampling buffer into the picker colorspace. | |
| static void | _color_picker_rgb_or_lab (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width) |
| static void | _color_picker_direct_hsl (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width) |
| static void | _color_picker_direct_lch_or_jzczhz (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width) |
| static void | _color_picker_lch (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width) |
| static void | _color_picker_hsl (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width) |
| static void | _color_picker_jzczhz (dt_aligned_pixel_t avg, dt_aligned_pixel_t min, dt_aligned_pixel_t max, const float *const pixels, const float w, const size_t width, const dt_iop_order_iccprofile_info_t *const profile) |
| static void | color_picker_helper_4ch_seq (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t cst_to, const dt_iop_order_iccprofile_info_t *const profile) |
| static void | color_picker_helper_4ch_parallel (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t cst_to, const dt_iop_order_iccprofile_info_t *const profile) |
| static void | color_picker_helper_4ch (const dt_iop_buffer_dsc_t *dsc, const float *const pixel, const dt_iop_roi_t *roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t cst_to, const dt_iop_order_iccprofile_info_t *const profile) |
| static void | color_picker_helper_4ch_converted_seq (const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t picker_cst) |
| static void | color_picker_helper_4ch_converted_parallel (const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t picker_cst) |
| static void | color_picker_helper_4ch_converted (const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t picker_cst) |
| static void | color_picker_helper_bayer_seq (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| static void | color_picker_helper_bayer_parallel (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| static void | color_picker_helper_bayer (const dt_iop_buffer_dsc_t *dsc, const float *const pixel, const dt_iop_roi_t *roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| static void | color_picker_helper_xtrans_seq (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| static void | color_picker_helper_xtrans_parallel (const dt_iop_buffer_dsc_t *const dsc, const float *const pixel, const dt_iop_roi_t *const roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| static void | color_picker_helper_xtrans (const dt_iop_buffer_dsc_t *dsc, const float *const pixel, const dt_iop_roi_t *roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max) |
| void | dt_color_picker_helper (const dt_iop_buffer_dsc_t *dsc, const float *const pixel, const dt_iop_roi_t *roi, const int *const box, dt_aligned_pixel_t picked_color, dt_aligned_pixel_t picked_color_min, dt_aligned_pixel_t picked_color_max, const dt_iop_colorspace_type_t image_cst, const dt_iop_colorspace_type_t picker_cst, const dt_iop_order_iccprofile_info_t *const profile) |
|
inlinestatic |
|
static |
Convert a 4-channel sampling buffer into the picker colorspace.
GUI sampling must never rewrite live pixelpipe cachelines. When the picker needs a colorspace conversion, we therefore copy the denoised sampling buffer into a disposable external cache allocation and overwrite that private copy in place. The conversion keeps the alpha slot untouched because some callers reuse channel 3 for auxiliary picker statistics.
References IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LAB, IOP_CS_LCH, IOP_CS_RGB, and rgb_to_JzCzhz().
Referenced by dt_color_picker_helper().
|
inlinestatic |
References i, max, min, and width.
Referenced by color_picker_helper_4ch_converted_parallel(), and color_picker_helper_4ch_converted_seq().
|
inlinestatic |
References i, max, min, and width.
Referenced by color_picker_helper_4ch_converted_parallel(), and color_picker_helper_4ch_converted_seq().
|
inlinestatic |
References i, max, min, and width.
Referenced by color_picker_helper_4ch_parallel(), and color_picker_helper_4ch_seq().
|
inlinestatic |
References i, max, min, rgb_to_JzCzhz(), and width.
Referenced by color_picker_helper_4ch_parallel(), and color_picker_helper_4ch_seq().
|
inlinestatic |
References i, max, min, and width.
Referenced by color_picker_helper_4ch_parallel(), and color_picker_helper_4ch_seq().
|
inlinestatic |
References i, max, min, and width.
Referenced by color_picker_helper_4ch_converted_parallel(), color_picker_helper_4ch_converted_seq(), color_picker_helper_4ch_parallel(), and color_picker_helper_4ch_seq().
|
static |
References _box_size(), color_picker_helper_4ch_parallel(), color_picker_helper_4ch_seq(), and size.
Referenced by dt_color_picker_helper().
|
static |
References _box_size(), color_picker_helper_4ch_converted_parallel(), and color_picker_helper_4ch_converted_seq().
Referenced by dt_color_picker_helper().
|
static |
References _box_size(), _color_picker_direct_hsl(), _color_picker_direct_lch_or_jzczhz(), _color_picker_rgb_or_lab(), darktable, dt_get_bythread, dt_get_perthread, dt_pixelpipe_cache_alloc_perthread_float, dt_pixelpipe_cache_free_align, error(), for_four_channels, IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LCH, n, darktable_t::num_openmp_threads, size, width, and dt_iop_roi_t::width.
Referenced by color_picker_helper_4ch_converted().
|
static |
References _box_size(), _color_picker_direct_hsl(), _color_picker_direct_lch_or_jzczhz(), _color_picker_rgb_or_lab(), IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LCH, size, width, and dt_iop_roi_t::width.
Referenced by color_picker_helper_4ch_converted().
|
static |
References _box_size(), _color_picker_hsl(), _color_picker_jzczhz(), _color_picker_lch(), _color_picker_rgb_or_lab(), darktable, dt_get_perthread, dt_pixelpipe_cache_alloc_perthread_float, dt_pixelpipe_cache_free_align, error(), IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LCH, n, darktable_t::num_openmp_threads, size, width, and dt_iop_roi_t::width.
Referenced by color_picker_helper_4ch().
|
static |
References _box_size(), _color_picker_hsl(), _color_picker_jzczhz(), _color_picker_lch(), _color_picker_rgb_or_lab(), IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LCH, size, width, and dt_iop_roi_t::width.
Referenced by color_picker_helper_4ch().
|
static |
References _box_size(), color_picker_helper_bayer_parallel(), color_picker_helper_bayer_seq(), and size.
Referenced by dt_color_picker_helper().
|
static |
References c, darktable, dt_free, dt_get_thread_num(), error(), FC(), dt_iop_buffer_dsc_t::filters, i, n, darktable_t::num_openmp_threads, v, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by color_picker_helper_bayer().
|
static |
References c, FC(), dt_iop_buffer_dsc_t::filters, i, v, width, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
Referenced by color_picker_helper_bayer().
|
static |
References _box_size(), color_picker_helper_xtrans_parallel(), color_picker_helper_xtrans_seq(), and size.
Referenced by dt_color_picker_helper().
|
static |
References c, darktable, dt_free, dt_get_thread_num(), error(), FCxtrans(), i, n, darktable_t::num_openmp_threads, v, width, dt_iop_roi_t::width, and dt_iop_buffer_dsc_t::xtrans.
Referenced by color_picker_helper_xtrans().
|
static |
References c, FCxtrans(), i, v, width, dt_iop_roi_t::width, and dt_iop_buffer_dsc_t::xtrans.
Referenced by color_picker_helper_xtrans().
| void dt_color_picker_helper | ( | const dt_iop_buffer_dsc_t * | dsc, |
| const float *const | pixel, | ||
| const dt_iop_roi_t * | roi, | ||
| const int *const | box, | ||
| dt_aligned_pixel_t | picked_color, | ||
| dt_aligned_pixel_t | picked_color_min, | ||
| dt_aligned_pixel_t | picked_color_max, | ||
| const dt_iop_colorspace_type_t | image_cst, | ||
| const dt_iop_colorspace_type_t | picker_cst, | ||
| const dt_iop_order_iccprofile_info_t *const | profile | ||
| ) |
References _color_picker_convert_buffer(), blur_2D_Bspline(), dt_iop_buffer_dsc_t::channels, dt_times_t::clock, color_picker_helper_4ch(), color_picker_helper_4ch_converted(), color_picker_helper_bayer(), color_picker_helper_xtrans(), darktable, DT_ALIGNED_ARRAY, DT_DEBUG_PERF, dt_get_times(), dt_pixelpipe_cache_alloc_align_float_cache, dt_pixelpipe_cache_alloc_perthread_float, dt_pixelpipe_cache_free_align, dt_unreachable_codepath, error(), FALSE, dt_iop_buffer_dsc_t::filters, dt_iop_roi_t::height, IOP_CS_HSL, IOP_CS_JZCZHZ, IOP_CS_LAB, IOP_CS_LCH, IOP_CS_NONE, IOP_CS_RGB, darktable_t::unmuted, dt_times_t::user, and dt_iop_roi_t::width.
Referenced by _pixelpipe_pick_from_image(), and _sample_picker_buffer().
|
inlinestatic |
References dt_ioppr_rgb_matrix_to_xyz(), JzAzBz, JzCzhz, dt_iop_order_iccprofile_info_t::lut_in, dt_iop_order_iccprofile_info_t::lutsize, dt_iop_order_iccprofile_info_t::matrix_in_transposed, dt_iop_order_iccprofile_info_t::nonlinearlut, rgb, XYZ_D50, and XYZ_D65.
Referenced by _color_picker_convert_buffer(), and _color_picker_jzczhz().