![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/colorspaces_inline_conversions.h"
#include "common/imagebuf.h"
#include "common/math.h"
#include "develop/blend.h"
#include "develop/imageop.h"
#include "develop/openmp_maths.h"
Macros | |
#define | DT_BLENDIF_LAB_CH 4 |
#define | DT_BLENDIF_LAB_BCH 3 |
Typedefs | |
typedef void() | _blend_row_func(const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
Functions | |
static float | _CLAMP (const float x, const float min, const float max) |
static void | _CLAMP_XYZ (dt_aligned_pixel_t XYZ, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static float | _blendif_compute_factor (const float value, const unsigned int invert_mask, const float *const restrict parameters) |
static void | _blendif_lab_l (const float *const restrict pixels, float *const restrict mask, const size_t stride, const float *const restrict parameters, const unsigned int invert_mask) |
static void | _blendif_lab_a (const float *const restrict pixels, float *const restrict mask, const size_t stride, const float *const restrict parameters, const unsigned int invert_mask) |
static void | _blendif_lab_b (const float *const restrict pixels, float *const restrict mask, const size_t stride, const float *const restrict parameters, const unsigned int invert_mask) |
static void | _blendif_lch (const float *const restrict pixels, float *const restrict mask, const size_t stride, const float *const restrict parameters, const unsigned int *const restrict invert_mask) |
static void | _blendif_combine_channels (const float *const restrict pixels, float *const restrict mask, const size_t stride, const unsigned int blendif, const float *const restrict parameters) |
void | dt_develop_blendif_lab_make_mask (struct dt_dev_pixelpipe_iop_t *piece, const float *const restrict a, const float *const restrict b, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out, float *const restrict mask) |
static void | _blend_Lab_scale (const float *i, float *o) |
static void | _blend_Lab_rescale (const float *i, float *o) |
static void | _blend_normal_bounded (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_normal_unbounded (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_lighten (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_darken (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_multiply (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_average (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_add (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_subtract (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_difference (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_difference2 (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_screen (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_overlay (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_softlight (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_hardlight (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_vividlight (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_linearlight (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_pinlight (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_lightness (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_chromaticity (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_hue (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_color (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_coloradjust (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_Lab_lightness (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_Lab_a (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_Lab_b (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static void | _blend_Lab_color (const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
static _blend_row_func * | _choose_blend_func (const unsigned int blend_mode) |
static void | _display_channel_value (dt_aligned_pixel_t out, const float value, const float mask) |
static void | _display_channel (const float *const restrict a, float *const restrict b, const float *const restrict mask, const size_t stride, const int channel, const float *const restrict boost_factors) |
static void | _copy_mask (const float *const restrict a, float *const restrict b, const size_t stride) |
void | dt_develop_blendif_lab_blend (struct dt_dev_pixelpipe_iop_t *piece, const float *const a, float *const b, const struct dt_iop_roi_t *const roi_in, const struct dt_iop_roi_t *const roi_out, const float *const restrict mask, const dt_dev_pixelpipe_display_mask_t request_mask_display) |
#define DT_BLENDIF_LAB_BCH 3 |
#define DT_BLENDIF_LAB_CH 4 |
typedef void() _blend_row_func(const float *const restrict a, const float *const restrict b, float *const restrict out, const float *const restrict mask, const size_t stride, const dt_aligned_pixel_t min, const dt_aligned_pixel_t max) |
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP_XYZ(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, dt_Lab_2_LCH(), and dt_LCH_2_Lab().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP_XYZ(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, dt_Lab_2_LCH(), and dt_LCH_2_Lab().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP_XYZ(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, dt_Lab_2_LCH(), and dt_LCH_2_Lab().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP_XYZ(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, dt_Lab_2_LCH(), and dt_LCH_2_Lab().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
inlinestatic |
References for_each_channel.
Referenced by _blend_add(), _blend_average(), _blend_chromaticity(), _blend_color(), _blend_coloradjust(), _blend_darken(), _blend_difference(), _blend_difference2(), _blend_hardlight(), _blend_hue(), _blend_Lab_a(), _blend_Lab_b(), _blend_Lab_color(), _blend_Lab_lightness(), _blend_lighten(), _blend_lightness(), _blend_linearlight(), _blend_multiply(), _blend_normal_bounded(), _blend_normal_unbounded(), _blend_overlay(), _blend_pinlight(), _blend_screen(), _blend_softlight(), _blend_subtract(), and _blend_vividlight().
|
inlinestatic |
References for_each_channel.
Referenced by _blend_add(), _blend_average(), _blend_chromaticity(), _blend_color(), _blend_coloradjust(), _blend_darken(), _blend_difference(), _blend_difference2(), _blend_hardlight(), _blend_hue(), _blend_Lab_a(), _blend_Lab_b(), _blend_Lab_color(), _blend_Lab_lightness(), _blend_lighten(), _blend_lightness(), _blend_linearlight(), _blend_multiply(), _blend_normal_bounded(), _blend_normal_unbounded(), _blend_overlay(), _blend_pinlight(), _blend_screen(), _blend_softlight(), _blend_subtract(), and _blend_vividlight().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and for_each_channel.
Referenced by _choose_blend_func().
|
static |
References _blend_Lab_rescale(), _blend_Lab_scale(), _CLAMP(), DT_BLENDIF_LAB_BCH, DT_BLENDIF_LAB_CH, and f().
Referenced by _choose_blend_func().
|
static |
|
inlinestatic |
References factor.
Referenced by _blendif_lab_a(), _blendif_lab_b(), _blendif_lab_l(), and _blendif_lch().
|
inlinestatic |
References _blendif_compute_factor(), and DT_BLENDIF_LAB_CH.
Referenced by _blendif_combine_channels().
|
inlinestatic |
References _blendif_compute_factor(), and DT_BLENDIF_LAB_CH.
Referenced by _blendif_combine_channels().
|
inlinestatic |
References _blendif_compute_factor(), and DT_BLENDIF_LAB_CH.
Referenced by _blendif_combine_channels().
|
inlinestatic |
References _blendif_compute_factor(), DEVELOP_BLENDIF_PARAMETER_ITEMS, DT_BLENDIF_LAB_CH, dt_Lab_2_LCH(), and factor.
Referenced by _blendif_combine_channels().
|
static |
References _blend_add(), _blend_average(), _blend_chromaticity(), _blend_color(), _blend_coloradjust(), _blend_darken(), _blend_difference(), _blend_difference2(), _blend_hardlight(), _blend_hue(), _blend_Lab_a(), _blend_Lab_b(), _blend_Lab_color(), _blend_Lab_lightness(), _blend_lighten(), _blend_lightness(), _blend_linearlight(), _blend_multiply(), _blend_normal_bounded(), _blend_normal_unbounded(), _blend_overlay(), _blend_pinlight(), _blend_screen(), _blend_softlight(), _blend_subtract(), _blend_vividlight(), DEVELOP_BLEND_ADD, DEVELOP_BLEND_AVERAGE, DEVELOP_BLEND_BOUNDED, DEVELOP_BLEND_CHROMATICITY, DEVELOP_BLEND_COLOR, DEVELOP_BLEND_COLORADJUST, DEVELOP_BLEND_DARKEN, DEVELOP_BLEND_DIFFERENCE, DEVELOP_BLEND_DIFFERENCE2, DEVELOP_BLEND_HARDLIGHT, DEVELOP_BLEND_HUE, DEVELOP_BLEND_LAB_A, DEVELOP_BLEND_LAB_B, DEVELOP_BLEND_LAB_COLOR, DEVELOP_BLEND_LAB_L, DEVELOP_BLEND_LAB_LIGHTNESS, DEVELOP_BLEND_LIGHTEN, DEVELOP_BLEND_LIGHTNESS, DEVELOP_BLEND_LINEARLIGHT, DEVELOP_BLEND_MODE_MASK, DEVELOP_BLEND_MULTIPLY, DEVELOP_BLEND_NORMAL2, DEVELOP_BLEND_OVERLAY, DEVELOP_BLEND_PINLIGHT, DEVELOP_BLEND_SCREEN, DEVELOP_BLEND_SOFTLIGHT, DEVELOP_BLEND_SUBTRACT, and DEVELOP_BLEND_VIVIDLIGHT.
Referenced by dt_develop_blendif_lab_blend().
|
inlinestatic |
Referenced by _blend_add(), _blend_average(), _blend_darken(), _blend_difference(), _blend_difference2(), _blend_hardlight(), _blend_lighten(), _blend_lightness(), _blend_linearlight(), _blend_multiply(), _blend_normal_bounded(), _blend_overlay(), _blend_pinlight(), _blend_screen(), _blend_softlight(), _blend_subtract(), and _blend_vividlight().
|
inlinestatic |
References for_each_channel.
Referenced by _blend_chromaticity(), _blend_color(), _blend_coloradjust(), and _blend_hue().
|
inlinestatic |
References DT_BLENDIF_LAB_BCH, and DT_BLENDIF_LAB_CH.
Referenced by dt_develop_blendif_lab_blend().
|
static |
References _display_channel_value(), clamp_simd(), DEVELOP_BLENDIF_A_in, DEVELOP_BLENDIF_A_out, DEVELOP_BLENDIF_B_in, DEVELOP_BLENDIF_B_out, DEVELOP_BLENDIF_C_in, DEVELOP_BLENDIF_C_out, DEVELOP_BLENDIF_L_in, DEVELOP_BLENDIF_L_out, DT_BLENDIF_LAB_CH, DT_DEV_PIXELPIPE_DISPLAY_a, DT_DEV_PIXELPIPE_DISPLAY_b, DT_DEV_PIXELPIPE_DISPLAY_L, DT_DEV_PIXELPIPE_DISPLAY_LCH_C, DT_DEV_PIXELPIPE_DISPLAY_LCH_h, DT_DEV_PIXELPIPE_DISPLAY_OUTPUT, dt_Lab_2_LCH(), and factor.
Referenced by dt_develop_blendif_lab_blend().
|
inlinestatic |
Referenced by _display_channel().
void dt_develop_blendif_lab_blend | ( | struct dt_dev_pixelpipe_iop_t * | piece, |
const float *const | a, | ||
float *const | b, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
const float *const restrict | mask, | ||
const dt_dev_pixelpipe_display_mask_t | request_mask_display | ||
) |
References _choose_blend_func(), _copy_mask(), _display_channel(), dt_develop_blend_params_t::blend_mode, dt_develop_blend_params_t::blendif_boost_factors, dt_dev_pixelpipe_iop_t::blendop_data, dt_dev_pixelpipe_iop_t::colors, DEVELOP_BLEND_REVERSE, dt_alloc_align_float(), DT_BLENDIF_LAB_CH, DT_DEV_PIXELPIPE_DISPLAY_ANY, DT_DEV_PIXELPIPE_DISPLAY_MASK, dt_free_align, dt_iop_image_copy(), dt_ioppr_get_pipe_work_profile_info(), dt_ioppr_rgb_matrix_to_lab(), dt_Rec709_to_XYZ_D50(), dt_XYZ_to_Lab(), for_each_channel, dt_iop_roi_t::height, 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, dt_dev_pixelpipe_iop_t::pipe, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.
void dt_develop_blendif_lab_make_mask | ( | struct dt_dev_pixelpipe_iop_t * | piece, |
const float *const restrict | a, | ||
const float *const restrict | b, | ||
const struct dt_iop_roi_t *const | roi_in, | ||
const struct dt_iop_roi_t *const | roi_out, | ||
float *const restrict | mask | ||
) |
References _blendif_combine_channels(), dt_develop_blend_params_t::blendif, dt_dev_pixelpipe_iop_t::blendop_data, clamp_simd(), dt_dev_pixelpipe_iop_t::colors, DEVELOP_BLENDIF_L_out, DEVELOP_BLENDIF_Lab_MASK, DEVELOP_BLENDIF_PARAMETER_ITEMS, DEVELOP_BLENDIF_SIZE, DEVELOP_COMBINE_INCL, DEVELOP_COMBINE_INV, DEVELOP_MASK_CONDITIONAL, DT_ALIGNED_ARRAY, dt_alloc_align_float(), DT_BLENDIF_LAB_CH, dt_develop_blendif_process_parameters(), dt_free_align, dt_iop_image_fill(), dt_iop_image_mul_const(), dt_iop_roi_t::height, dt_develop_blend_params_t::mask_combine, dt_develop_blend_params_t::mask_mode, dt_develop_blend_params_t::opacity, dt_iop_roi_t::width, dt_iop_roi_t::x, and dt_iop_roi_t::y.