Blender
V3.3
|
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_color_types.h"
#include "DNA_curve_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "BKE_colortools.h"
#include "BKE_curve.h"
#include "BKE_fcurve.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf_types.h"
#include "BLO_read_write.h"
Go to the source code of this file.
Classes | |
struct | ScopesUpdateData |
struct | ScopesUpdateDataChunk |
Macros | |
#define | p2_h1 ((p2)-3) |
#define | p2_h2 ((p2) + 3) |
#define | INV_255 (1.0f / 255.0f) |
Typedefs | |
typedef struct ScopesUpdateData | ScopesUpdateData |
typedef struct ScopesUpdateDataChunk | ScopesUpdateDataChunk |
#define INV_255 (1.0f / 255.0f) |
Definition at line 1314 of file colortools.c.
#define p2_h1 ((p2)-3) |
#define p2_h2 ((p2) + 3) |
typedef struct ScopesUpdateData ScopesUpdateData |
typedef struct ScopesUpdateDataChunk ScopesUpdateDataChunk |
void BKE_color_managed_colorspace_settings_copy | ( | ColorManagedColorspaceSettings * | colorspace_settings, |
const ColorManagedColorspaceSettings * | settings | ||
) |
Definition at line 1888 of file colortools.c.
References BLI_strncpy(), and ColorManagedColorspaceSettings::name.
bool BKE_color_managed_colorspace_settings_equals | ( | const ColorManagedColorspaceSettings * | settings1, |
const ColorManagedColorspaceSettings * | settings2 | ||
) |
Definition at line 1895 of file colortools.c.
References ColorManagedColorspaceSettings::name, and STREQ.
void BKE_color_managed_colorspace_settings_init | ( | ColorManagedColorspaceSettings * | colorspace_settings | ) |
Definition at line 1882 of file colortools.c.
References BLI_strncpy(), and ColorManagedColorspaceSettings::name.
Referenced by BKE_image_format_init(), image_init(), and movie_clip_init_data().
void BKE_color_managed_display_settings_copy | ( | ColorManagedDisplaySettings * | new_settings, |
const ColorManagedDisplaySettings * | settings | ||
) |
Definition at line 1796 of file colortools.c.
References BLI_strncpy(), and ColorManagedDisplaySettings::display_device.
void BKE_color_managed_display_settings_init | ( | ColorManagedDisplaySettings * | settings | ) |
Definition at line 1789 of file colortools.c.
References BLI_strncpy(), ColorManagedDisplaySettings::display_device, and IMB_colormanagement_display_get_default_name().
Referenced by BKE_image_format_init(), blo_do_versions_280(), and scene_init_data().
void BKE_color_managed_view_settings_blend_read_data | ( | BlendDataReader * | reader, |
ColorManagedViewSettings * | settings | ||
) |
Definition at line 1872 of file colortools.c.
References BKE_curvemapping_blend_read(), BLO_read_data_address, and ColorManagedViewSettings::curve_mapping.
Referenced by BKE_image_format_blend_read_data(), and scene_blend_read_data().
void BKE_color_managed_view_settings_blend_write | ( | BlendWriter * | writer, |
ColorManagedViewSettings * | settings | ||
) |
Definition at line 1864 of file colortools.c.
References BKE_curvemapping_blend_write(), and ColorManagedViewSettings::curve_mapping.
Referenced by BKE_image_format_blend_write(), and scene_blend_write().
void BKE_color_managed_view_settings_copy | ( | ColorManagedViewSettings * | new_settings, |
const ColorManagedViewSettings * | settings | ||
) |
Definition at line 1836 of file colortools.c.
References BKE_curvemapping_copy(), BLI_strncpy(), ColorManagedViewSettings::curve_mapping, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, ColorManagedViewSettings::look, NULL, and ColorManagedViewSettings::view_transform.
void BKE_color_managed_view_settings_free | ( | ColorManagedViewSettings * | settings | ) |
Definition at line 1856 of file colortools.c.
References BKE_curvemapping_free(), ColorManagedViewSettings::curve_mapping, and NULL.
Referenced by BKE_image_format_color_management_copy(), BKE_image_format_color_management_copy_from_scene(), BKE_image_format_free(), GPU_viewport_colorspace_set(), GPU_viewport_free(), preview_prepare_scene(), render_freejob(), and scene_free_data().
void BKE_color_managed_view_settings_init_default | ( | struct ColorManagedViewSettings * | settings, |
const struct ColorManagedDisplaySettings * | display_settings | ||
) |
Initialize view settings which are best suitable for viewing non-render images. For example,s movie clips while tracking.
Definition at line 1829 of file colortools.c.
References IMB_colormanagement_init_default_view_settings().
Referenced by BKE_image_format_init().
void BKE_color_managed_view_settings_init_render | ( | ColorManagedViewSettings * | view_settings, |
const ColorManagedDisplaySettings * | display_settings, | ||
const char * | view_transform | ||
) |
Definition at line 1804 of file colortools.c.
References ColorManagedViewSettings::curve_mapping, ColorManagedDisplaySettings::display_device, ColorManagedViewSettings::exposure, ColorManagedViewSettings::flag, ColorManagedViewSettings::gamma, IMB_colormanagement_display_get_default_view_transform_name(), IMB_colormanagement_display_get_named(), IMB_colormanagement_validate_settings(), ColorManagedViewSettings::look, NULL, STRNCPY, and ColorManagedViewSettings::view_transform.
float BKE_curvemap_evaluateF | ( | const CurveMapping * | cumap, |
const CurveMap * | cuma, | ||
float | value | ||
) |
Definition at line 951 of file colortools.c.
References CM_TABLE, curvemap_calc_extend(), float(), CurveMap::mintable, CurveMap::range, CurveMap::table, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by BKE_curvemapping_evaluate3F(), BKE_curvemapping_evaluate_premulRGBF_ex(), BKE_curvemapping_evaluateF(), BKE_curvemapping_evaluateRGBF(), BKE_curvemapping_premultiply(), and curvemapping_evaluateRGBF_filmlike().
type | eBezTriple_Handle |
Definition at line 424 of file colortools.c.
References Freestyle::a, CUMA_HANDLE_AUTO_ANIM, CUMA_HANDLE_VECTOR, CUMA_SELECT, CurveMap::curve, CurveMapPoint::flag, HD_AUTO_ANIM, HD_VECT, CurveMap::totpoint, and type.
Referenced by curvemap_tools_dofunc().
CurveMapPoint* BKE_curvemap_insert | ( | CurveMap * | cuma, |
float | x, | ||
float | y | ||
) |
Definition at line 222 of file colortools.c.
References Freestyle::a, usdtokens::b(), CUMA_SELECT, curve, CurveMap::curve, CurveMapPoint::flag, MEM_callocN, MEM_freeN, NULL, CurveMapPoint::shorty, CurveMap::totpoint, x, CurveMapPoint::x, y, and CurveMapPoint::y.
Referenced by ui_do_but_CURVE().
Removes with flag set.
Definition at line 199 of file colortools.c.
References Freestyle::a, usdtokens::b(), CurveMap::curve, CurveMapPoint::flag, MEM_freeN, MEM_mallocN, and CurveMap::totpoint.
Referenced by BKE_curvemapping_changed(), and curvemap_buttons_delete().
bool BKE_curvemap_remove_point | ( | struct CurveMap * | cuma, |
struct CurveMapPoint * | cmp | ||
) |
Remove specified point.
Definition at line 170 of file colortools.c.
References Freestyle::a, usdtokens::b(), CurveMap::curve, MEM_freeN, MEM_mallocN, point, and CurveMap::totpoint.
Definition at line 256 of file colortools.c.
References CUMA_HANDLE_VECTOR, CurveMap::curve, CURVE_PRESET_BELL, CURVE_PRESET_GAUSS, CURVE_PRESET_LINE, CURVE_PRESET_MAX, CURVE_PRESET_MID9, CURVE_PRESET_ROOT, CURVE_PRESET_ROUND, CURVE_PRESET_SHARP, CURVE_PRESET_SMOOTH, CURVEMAP_SLOPE_POS_NEG, CURVEMAP_SLOPE_POSITIVE, CurveMapPoint::flag, float(), MEM_callocN, MEM_dupallocN, MEM_freeN, MEM_mallocN, NULL, CurveMap::table, CurveMap::totpoint, CurveMapPoint::x, rctf::xmax, rctf::xmin, CurveMapPoint::y, rctf::ymax, and rctf::ymin.
CurveMapping* BKE_curvemapping_add | ( | int | tot, |
float | minx, | ||
float | miny, | ||
float | maxx, | ||
float | maxy | ||
) |
Definition at line 72 of file colortools.c.
References BKE_curvemapping_set_defaults(), and MEM_callocN.
Referenced by BKE_brush_curve_preset(), BKE_brush_init_gpencil_settings(), BKE_linestyle_alpha_modifier_add(), BKE_linestyle_thickness_modifier_add(), BKE_paint_cavity_curve_preset(), BKE_particlesettings_clump_curve_init(), BKE_particlesettings_rough_curve_init(), BKE_particlesettings_twist_curve_init(), BKE_texture_pointdensity_init_data(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_pre250(), blo_update_defaults_scene(), deformVerts_do(), ED_gpencil_add_defaults(), gpencil_interpolate_seq_exec(), initData(), light_init_data(), blender::nodes::node_composite_curves_cc::node_composit_init_curve_rgb(), blender::nodes::node_composite_curves_cc::node_composit_init_curve_vec(), blender::nodes::node_composite_curves_cc::node_composit_init_curves_time(), blender::nodes::node_composite_huecorrect_cc::node_composit_init_huecorrect(), blender::nodes::node_shader_curves_cc::node_shader_init_curve_float(), blender::nodes::node_shader_curves_cc::node_shader_init_curve_rgb(), blender::nodes::node_shader_curves_cc::node_shader_init_curve_vec(), rgb_init(), scene_init_data(), time_init(), and warpModifier_do().
void BKE_curvemapping_blend_read | ( | struct BlendDataReader * | reader, |
struct CurveMapping * | cumap | ||
) |
cumap
itself has been read already. Definition at line 1300 of file colortools.c.
References Freestyle::a, BLO_read_data_address, CurveMapping::cm, CM_TOT, CUMA_PREMULLED, CurveMap::curve, CurveMapping::flag, NULL, CurveMap::premultable, and CurveMap::table.
Referenced by BKE_color_managed_view_settings_blend_read_data(), BKE_gpencil_modifier_blend_read_data(), BKE_paint_blend_read_data(), blendRead(), brush_blend_read_data(), direct_link_linestyle_alpha_modifier(), direct_link_linestyle_thickness_modifier(), light_blend_read_data(), ntreeBlendReadData(), particle_settings_blend_read_data(), scene_blend_read_data(), and SEQ_modifier_blend_read_data().
void BKE_curvemapping_blend_write | ( | BlendWriter * | writer, |
const CurveMapping * | cumap | ||
) |
Definition at line 1287 of file colortools.c.
References BKE_curvemapping_curves_blend_write(), and BLO_write_struct.
Referenced by BKE_color_managed_view_settings_blend_write().
void BKE_curvemapping_changed | ( | struct CurveMapping * | cumap, |
bool | rem_doubles | ||
) |
Definition at line 855 of file colortools.c.
References Freestyle::a, BKE_curvemap_remove(), BLI_rctf_size_x(), BLI_rctf_size_y(), CurveMapping::changed_timestamp, CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CUMA_HANDLE_VECTOR, CUMA_SELECT, CurveMapping::cur, CurveMapping::curr, CurveMap::curve, curvemap_make_table(), CurveMapPoint::flag, CurveMapping::flag, max_ff(), min_ff(), sort_curvepoints(), sqrtf, CurveMap::totpoint, x, CurveMapPoint::x, rctf::xmax, rctf::xmin, y, CurveMapPoint::y, rctf::ymax, and rctf::ymin.
Referenced by BKE_brush_curve_preset(), BKE_curvemapping_changed_all(), BKE_paint_cavity_curve_preset(), BKE_texture_pointdensity_init_data(), curvemap_buttons_delete(), curvemap_buttons_reset(), curvemap_buttons_setclip(), curvemap_buttons_update(), curvemap_tools_dofunc(), Freestyle_evaluateCurveMappingF(), render_shutter_curve_preset_exec(), ui_do_but_CURVE(), ui_draw_but_CURVE(), and ui_numedit_but_CURVE().
void BKE_curvemapping_changed_all | ( | CurveMapping * | cumap | ) |
Definition at line 932 of file colortools.c.
References Freestyle::a, BKE_curvemapping_changed(), CurveMapping::cm, CM_TOT, CurveMapping::cur, and CurveMap::curve.
Referenced by do_guides(), psys_thread_context_init_path(), and vector_curve_node_remap().
void BKE_curvemapping_compute_range_dividers | ( | const CurveMapping * | curve_mapping, |
float | dividers[CM_TOT] | ||
) |
Definition at line 1168 of file colortools.c.
References CurveMapping::cm, CM_TOT, max_ff(), CurveMap::maxtable, and CurveMap::mintable.
Referenced by BKE_curvemapping_compute_slopes().
void BKE_curvemapping_compute_slopes | ( | const CurveMapping * | curve_mapping, |
float | start_slopes[CM_TOT], | ||
float | end_slopes[CM_TOT] | ||
) |
Definition at line 1177 of file colortools.c.
References BKE_curvemapping_compute_range_dividers(), CurveMapping::cm, CM_TOT, CUMA_EXTEND_EXTRAPOLATE, CurveMap::ext_in, CurveMap::ext_out, and CurveMapping::flag.
CurveMapping* BKE_curvemapping_copy | ( | const CurveMapping * | cumap | ) |
Definition at line 130 of file colortools.c.
References BKE_curvemapping_copy_data(), MEM_dupallocN, and NULL.
Referenced by BKE_color_managed_view_settings_copy().
void BKE_curvemapping_copy_data | ( | CurveMapping * | target, |
const CurveMapping * | cumap | ||
) |
Definition at line 111 of file colortools.c.
References Freestyle::a, CurveMapping::cm, CM_TOT, CurveMap::curve, MEM_dupallocN, CurveMap::premultable, and CurveMap::table.
Referenced by BKE_curvemapping_copy().
void BKE_curvemapping_curves_blend_write | ( | BlendWriter * | writer, |
const CurveMapping * | cumap | ||
) |
Definition at line 1293 of file colortools.c.
References Freestyle::a, BLO_write_struct_array, CurveMapping::cm, CM_TOT, CurveMap::curve, and CurveMap::totpoint.
Referenced by BKE_curvemapping_blend_write().
void BKE_curvemapping_evaluate3F | ( | const CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 991 of file colortools.c.
References BKE_curvemap_evaluateF(), and CurveMapping::cm.
void BKE_curvemapping_evaluate_premulRGB | ( | const CurveMapping * | cumap, |
unsigned char | vecout_byte[3], | ||
const unsigned char | vecin_byte[3] | ||
) |
Definition at line 1100 of file colortools.c.
References BKE_curvemapping_evaluate_premulRGBF(), float(), and unit_float_to_uchar_clamp().
void BKE_curvemapping_evaluate_premulRGBF | ( | const CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 1093 of file colortools.c.
References BKE_curvemapping_evaluate_premulRGBF_ex(), CurveMapping::black, and CurveMapping::bwmul.
Referenced by BKE_curvemapping_evaluate_premulRGB().
void BKE_curvemapping_evaluate_premulRGBF_ex | ( | const CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3], | ||
const float | black[3], | ||
const float | bwmul[3] | ||
) |
Definition at line 1028 of file colortools.c.
References usdtokens::b(), BKE_curvemap_evaluateF(), CurveMapping::cm, copy_v2_fl2(), CURVE_TONE_FILMLIKE, CURVE_TONE_STANDARD, curvemapping_evaluateRGBF_filmlike(), usdtokens::g(), r, and CurveMapping::tone.
Referenced by BKE_curvemapping_evaluate_premulRGBF().
float BKE_curvemapping_evaluateF | ( | const CurveMapping * | cumap, |
int | cur, | ||
float | value | ||
) |
Definition at line 973 of file colortools.c.
References BKE_curvemap_evaluateF(), CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CurveMapping::flag, rctf::ymax, and rctf::ymin.
void BKE_curvemapping_evaluateRGBF | ( | const CurveMapping * | cumap, |
float | vecout[3], | ||
const float | vecin[3] | ||
) |
Definition at line 998 of file colortools.c.
References BKE_curvemap_evaluateF(), and CurveMapping::cm.
void BKE_curvemapping_free | ( | CurveMapping * | cumap | ) |
Definition at line 103 of file colortools.c.
References BKE_curvemapping_free_data(), and MEM_freeN.
Referenced by BKE_color_managed_view_settings_free(), BKE_linestyle_alpha_modifier_remove(), BKE_linestyle_thickness_modifier_remove(), BKE_paint_free(), BKE_texture_pointdensity_free_data(), BKE_toolsettings_free(), brush_free_data(), colormanagement_exit(), copyData(), blender::compositor::CurveBaseOperation::deinit_execution(), freeData(), IMB_colormanagement_processor_free(), light_free_data(), node_free_curves(), particle_settings_free_data(), psys_thread_context_free(), blender::compositor::CurveBaseOperation::set_curve_mapping(), update_glsl_curve_mapping(), version_fix_image_format_copy(), and blender::compositor::CurveBaseOperation::~CurveBaseOperation().
void BKE_curvemapping_free_data | ( | CurveMapping * | cumap | ) |
Definition at line 83 of file colortools.c.
References Freestyle::a, CurveMapping::cm, CM_TOT, CurveMap::curve, MEM_freeN, NULL, CurveMap::premultable, and CurveMap::table.
Referenced by BKE_curvemapping_free(), BKE_scene_duplicate(), curves_free_data(), hue_correct_free_data(), RE_FreeRender(), render_copy_renderdata(), scene_free_data(), ui_but_clipboard_free(), ui_but_copy_curvemapping(), and ui_but_paste_curvemapping().
void BKE_curvemapping_get_range_minimums | ( | const CurveMapping * | curve_mapping, |
float | minimums[CM_TOT] | ||
) |
Definition at line 1161 of file colortools.c.
References CurveMapping::cm, CM_TOT, and CurveMap::mintable.
void BKE_curvemapping_init | ( | struct CurveMapping * | cumap | ) |
Call before all evaluation functions.
Definition at line 1235 of file colortools.c.
References Freestyle::a, CurveMapping::cm, CM_TOT, curvemap_make_table(), NULL, and CurveMap::table.
Referenced by BKE_brush_gen_radial_control_imbuf(), BKE_gpencil_brush_preset_set(), BKE_gpencil_modifier_blend_read_data(), BKE_particlesettings_clump_curve_init(), BKE_particlesettings_rough_curve_init(), BKE_particlesettings_twist_curve_init(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_pre250(), blo_update_defaults_scene(), cloth_brush_apply_brush_foces(), blender::compositor::TimeNode::convert_to_operations(), createTransGPencil(), curve_mapping_to_ocio_settings(), curves_apply(), deformVerts_do(), density_falloff(), ED_gpencil_add_defaults(), Freestyle_evaluateCurveMappingF(), gpencil_init_drawing_brush(), gpencil_interpolate_seq_exec(), gpencil_primitive_update_strokes(), gpencil_sculpt_brush_init(), gpencil_vertexpaint_brush_init(), gpencil_weightpaint_brush_init(), blender::nodes::node_shader_curves_cc::gpu_shader_curve_float(), blender::nodes::node_shader_curves_cc::gpu_shader_curve_rgb(), blender::nodes::node_shader_curves_cc::gpu_shader_curve_vec(), hue_correct_apply(), blender::compositor::CurveBaseOperation::init_execution(), initData(), light_init_data(), load_tex_cursor(), node_initexec_curves(), paint_stroke_new(), paint_weight_gradient_exec(), psys_sim_data_init(), radial_control_paint_curve(), scene_init_data(), sculpt_boundary_falloff_factor_init(), SCULPT_do_displacement_eraser_brush(), SCULPT_do_displacement_smear_brush(), SCULPT_do_draw_brush(), SCULPT_do_draw_face_sets_brush(), SCULPT_do_draw_sharp_brush(), SCULPT_do_paint_brush(), SCULPT_do_slide_relax_brush(), SCULPT_do_smear_brush(), sculpt_expand_cache_initial_config_set(), sculpt_pose_do_translate_deform(), sculpt_pose_do_twist_deform(), blender::nodes::node_shader_curves_cc::sh_node_curve_float_build_multi_function(), blender::nodes::node_shader_curves_cc::sh_node_curve_rgb_build_multi_function(), blender::nodes::node_shader_curves_cc::sh_node_curve_vec_build_multi_function(), smooth_brush_toggle_on(), time_colorfn(), uv_sculpt_stroke_init(), warpModifier_do(), and weightvg_do_map().
bool BKE_curvemapping_is_map_identity | ( | const CurveMapping * | curve_mapping, |
int | index | ||
) |
Definition at line 1208 of file colortools.c.
References CurveMapping::cm, CUMA_EXTEND_EXTRAPOLATE, CurveMap::curve, CurveMap::ext_in, CurveMap::ext_out, CurveMapping::flag, CurveMap::maxtable, CurveMap::mintable, CurveMap::totpoint, CurveMapPoint::x, and CurveMapPoint::y.
void BKE_curvemapping_premultiply | ( | struct CurveMapping * | cumap, |
bool | restore | ||
) |
Call when you do images etc, needs restore too. also verifies tables. non-const (these modify the curve).
Definition at line 782 of file colortools.c.
References Freestyle::a, usdtokens::b(), BKE_curvemap_evaluateF(), CurveMapping::cm, CM_TABLE, copy_v2_v2(), CUMA_PREMULLED, curvemap_make_table(), CurveMap::ext_in, CurveMap::ext_out, CurveMapping::flag, MEM_freeN, MEM_mallocN, mul_v2_v2(), NULL, CurveMap::premul_ext_in, CurveMap::premul_ext_out, CurveMap::premultable, CurveMap::table, CurveMapPoint::y, and zero_v2().
Referenced by curve_mapping_to_ocio_settings(), curves_apply(), IMB_colormanagement_display_processor_new(), blender::compositor::ColorCurveOperation::init_execution(), and blender::compositor::ConstantLevelColorCurveOperation::init_execution().
void BKE_curvemapping_reset_view | ( | struct CurveMapping * | cumap | ) |
Reset the view for current curve.
Definition at line 946 of file colortools.c.
References CurveMapping::clipr, and CurveMapping::curr.
Referenced by curvemap_tools_dofunc().
bool BKE_curvemapping_RGBA_does_something | ( | const CurveMapping * | cumap | ) |
Definition at line 1117 of file colortools.c.
References Freestyle::a, CurveMapping::black, CurveMapping::cm, CM_TOT, CurveMap::curve, CurveMap::totpoint, CurveMapping::white, CurveMapPoint::x, and CurveMapPoint::y.
void BKE_curvemapping_set_black_white | ( | CurveMapping * | cumap, |
const float | black[3], | ||
const float | white[3] | ||
) |
Definition at line 152 of file colortools.c.
References BKE_curvemapping_set_black_white_ex(), CurveMapping::black, CurveMapping::bwmul, CurveMapping::changed_timestamp, copy_v3_v3(), and CurveMapping::white.
Referenced by curvemap_buttons_reset(), curves_apply(), image_sample_apply(), and blender::compositor::ConstantLevelColorCurveOperation::init_execution().
void BKE_curvemapping_set_black_white_ex | ( | const float | black[3], |
const float | white[3], | ||
float | r_bwmul[3] | ||
) |
Definition at line 140 of file colortools.c.
References Freestyle::a, and max_ff().
Referenced by BKE_curvemapping_set_black_white(), blender::compositor::ColorCurveOperation::execute_pixel_sampled(), and blender::compositor::ColorCurveOperation::update_memory_buffer_partial().
void BKE_curvemapping_set_defaults | ( | CurveMapping * | cumap, |
int | tot, | ||
float | minx, | ||
float | miny, | ||
float | maxx, | ||
float | maxy | ||
) |
Definition at line 37 of file colortools.c.
References Freestyle::a, BLI_rctf_init(), CurveMapping::bwmul, CurveMapping::changed_timestamp, CurveMapping::clipr, CurveMapping::cm, CUMA_DO_CLIP, CUMA_EXTEND_EXTRAPOLATE, CurveMapping::cur, CurveMapping::curr, CurveMap::curve, CurveMapping::flag, max_ff(), MEM_callocN, min_ff(), CurveMap::totpoint, CurveMapping::white, CurveMapPoint::x, and CurveMapPoint::y.
Referenced by BKE_curvemapping_add(), BKE_gpencil_brush_preset_set(), blo_do_versions_270(), curves_init_data(), hue_correct_init_data(), and scene_init_data().
void BKE_curvemapping_table_F | ( | const CurveMapping * | cumap, |
float ** | array, | ||
int * | size | ||
) |
Definition at line 1250 of file colortools.c.
References Freestyle::a, CurveMapping::cm, CM_TABLE, MEM_callocN, size(), CurveMap::table, and CurveMapPoint::y.
void BKE_curvemapping_table_RGBA | ( | const CurveMapping * | cumap, |
float ** | array, | ||
int * | size | ||
) |
Definition at line 1264 of file colortools.c.
References Freestyle::a, CurveMapping::cm, CM_TABLE, MEM_callocN, size(), CurveMap::table, and CurveMapPoint::y.
void BKE_histogram_update_sample_line | ( | Histogram * | hist, |
ImBuf * | ibuf, | ||
const ColorManagedViewSettings * | view_settings, | ||
const ColorManagedDisplaySettings * | display_settings | ||
) |
Definition at line 1364 of file colortools.c.
References BLI_assert_unreachable, ImBuf::channels, Histogram::channels, Histogram::co, copy_v3_fl(), copy_v3_v3(), copy_v4_v4(), Histogram::data_a, Histogram::data_b, Histogram::data_g, Histogram::data_luma, Histogram::data_r, float(), IMB_colormanagement_display_processor_new(), IMB_colormanagement_get_luminance(), IMB_colormanagement_get_luminance_byte(), IMB_colormanagement_processor_apply_v3(), IMB_colormanagement_processor_apply_v4(), IMB_colormanagement_processor_free(), NULL, ImBuf::rect, ImBuf::rect_float, usdtokens::rgba(), x, ImBuf::x, x2, Histogram::x_resolution, Histogram::xmax, y, ImBuf::y, and y1.
Definition at line 1765 of file colortools.c.
References MEM_SAFE_FREE, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, and Scopes::waveform_3.
Referenced by image_free().
Definition at line 1773 of file colortools.c.
References Scopes::accuracy, Histogram::height, Scopes::hist, HISTO_MODE_RGB, Histogram::mode, NULL, Scopes::ok, Scopes::vecscope, Scopes::vecscope_alpha, Scopes::vecscope_height, Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, Scopes::wavefrm_alpha, and Scopes::wavefrm_height.
Referenced by blo_do_versions_250(), image_create(), and image_duplicate().
void BKE_scopes_update | ( | Scopes * | scopes, |
ImBuf * | ibuf, | ||
const ColorManagedViewSettings * | view_settings, | ||
const ColorManagedDisplaySettings * | display_settings | ||
) |
Definition at line 1606 of file colortools.c.
References Freestyle::a, Scopes::accuracy, ScopesUpdateDataChunk::bin_a, ScopesUpdateDataChunk::bin_b, ScopesUpdateDataChunk::bin_g, ScopesUpdateDataChunk::bin_lum, ScopesUpdateDataChunk::bin_r, BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), BLI_YCC_ITU_BT601, BLI_YCC_ITU_BT709, BLI_YCC_JFIF_0_255, ImBuf::channels, Histogram::channels, CLAMP_MIN, data, Histogram::data_a, Histogram::data_b, Histogram::data_g, Histogram::data_luma, Histogram::data_r, double(), ELEM, TaskParallelSettings::func_reduce, Scopes::hist, IMB_colormanagement_display_processor_new(), IMB_colormanagement_processor_free(), IMB_display_buffer_acquire(), IMB_display_buffer_release(), INIT_MINMAX, ScopesUpdateDataChunk::max, MEM_callocN, MEM_freeN, ScopesUpdateDataChunk::min, Scopes::minmax, NULL, Scopes::ok, ImBuf::rect, ImBuf::rect_float, Scopes::sample_full, Scopes::sample_lines, scopes_update_cb(), scopes_update_reduce(), SCOPES_WAVEFRM_LUMA, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_RGB_PARADE, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG, TaskParallelSettings::use_threading, TaskParallelSettings::userdata_chunk, TaskParallelSettings::userdata_chunk_size, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, Scopes::waveform_tot, Scopes::wavefrm_mode, ImBuf::x, Histogram::x_resolution, ImBuf::y, and Histogram::ymax.
|
static |
reduced copy of calchandleNurb_intern code in curve.c
Definition at line 449 of file colortools.c.
References ELEM, BezTriple::h1, BezTriple::h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT, len, len_v2(), madd_v2_v2v2fl(), next, NULL, p2_h1, p2_h2, blender::meshintersect::prev(), sub_v2_v2v2(), and BezTriple::vec.
Referenced by curvemap_make_table().
|
static |
Definition at line 572 of file colortools.c.
References CUMA_EXTEND_EXTRAPOLATE, CurveMap::ext_in, CurveMap::ext_out, CurveMapping::flag, and x.
Referenced by BKE_curvemap_evaluateF(), and curvemap_make_table().
|
static |
Definition at line 606 of file colortools.c.
References Freestyle::a, add_v3_v3v3(), BKE_curve_correct_bezpart(), BKE_curve_forward_diff_bezier(), calchandle_curvemap(), CurveMapping::clipr, CM_RESOL, CM_TABLE, CM_TABLEDIV, compare_ff(), copy_v3_v3(), CUMA_HANDLE_AUTO_ANIM, CUMA_HANDLE_VECTOR, CurveMap::curve, curvemap_calc_extend(), CurveMap::ext_in, CurveMap::ext_out, float(), BezTriple::h1, BezTriple::h2, HD_AUTO, HD_AUTO_ANIM, HD_VECT, len_v3(), len_v3v3(), max_ff(), CurveMap::maxtable, MEM_callocN, MEM_freeN, min_ff(), CurveMap::mintable, mul_v3_fl(), NULL, point, CurveMap::range, sqrtf, sub_v3_v3(), sub_v3_v3v3(), CurveMap::table, CurveMap::totpoint, BezTriple::vec, CurveMapPoint::x, rctf::xmax, rctf::xmin, and CurveMapPoint::y.
Referenced by BKE_curvemapping_changed(), BKE_curvemapping_init(), and BKE_curvemapping_premultiply().
|
static |
Definition at line 1010 of file colortools.c.
References BKE_curvemap_evaluateF(), CurveMapping::cm, v1, and v2.
Referenced by BKE_curvemapping_evaluate_premulRGBF_ex().
BLI_INLINE int get_bin_float | ( | float | f | ) |
|
static |
Definition at line 1326 of file colortools.c.
References BLI_YUV_ITU_BT709, usdtokens::rgb(), rgb_to_yuv(), SCOPES_WAVEFRM_LUMA, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_RGB_PARADE, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, Scopes::waveform_3, and Scopes::wavefrm_mode.
Referenced by scopes_update_cb().
|
static |
Definition at line 1468 of file colortools.c.
References ScopesUpdateDataChunk::bin_a, ScopesUpdateDataChunk::bin_b, ScopesUpdateDataChunk::bin_g, ScopesUpdateDataChunk::bin_lum, ScopesUpdateDataChunk::bin_r, BLI_assert_unreachable, Freestyle::c, ImBuf::channels, copy_v3_fl(), copy_v3_v3(), copy_v4_v4(), data, float(), get_bin_float(), IMB_colormanagement_get_luminance(), IMB_colormanagement_processor_apply_v3(), IMB_colormanagement_processor_apply_v4(), INV_255, ScopesUpdateDataChunk::max, max, min, ScopesUpdateDataChunk::min, minmax_v3v3_v3(), mul_v3_fl(), NULL, ImBuf::rect_float, rgb_to_ycc(), usdtokens::rgba(), Scopes::sample_lines, save_sample_line(), x, ImBuf::x, y, and ImBuf::y.
Referenced by BKE_scopes_update().
|
static |
Definition at line 1567 of file colortools.c.
References usdtokens::b(), ScopesUpdateDataChunk::bin_a, ScopesUpdateDataChunk::bin_b, ScopesUpdateDataChunk::bin_g, ScopesUpdateDataChunk::bin_lum, ScopesUpdateDataChunk::bin_r, Freestyle::c, ScopesUpdateDataChunk::max, max, min, and ScopesUpdateDataChunk::min.
Referenced by BKE_scopes_update().
Definition at line 840 of file colortools.c.
References CurveMapPoint::x, and x2.
Referenced by BKE_curvemapping_changed().