|
Blender
V2.93
|
#include <math.h>#include <stdlib.h>#include "MEM_guardedalloc.h"#include "BLI_math.h"#include "BLI_task.h"#include "BLI_utildefines.h"#include "IMB_colormanagement.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"Go to the source code of this file.
Classes | |
| struct | ScanlineGlobalData |
Functions | |
| void | IMB_convert_rgba_to_abgr (struct ImBuf *ibuf) |
| static void | pixel_from_buffer (struct ImBuf *ibuf, unsigned char **outI, float **outF, int x, int y) |
Bi-Cubic Interpolation | |
| void | bicubic_interpolation_color (struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) |
| void | bicubic_interpolation (ImBuf *in, ImBuf *out, float u, float v, int xout, int yout) |
Bi-Linear Interpolation | |
| void | bilinear_interpolation_color (struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) |
| void | bilinear_interpolation_color_wrap (struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) |
| void | bilinear_interpolation (ImBuf *in, ImBuf *out, float u, float v, int xout, int yout) |
Nearest Interpolation | |
| void | nearest_interpolation_color (struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) |
| void | nearest_interpolation_color_wrap (struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v) |
| void | nearest_interpolation (ImBuf *in, ImBuf *out, float u, float v, int xout, int yout) |
Alpha-under | |
| void | IMB_alpha_under_color_float (float *rect_float, int x, int y, float backcol[3]) |
| void | IMB_alpha_under_color_byte (unsigned char *rect, int x, int y, const float backcol[3]) |
Sample Pixel | |
| void | IMB_sampleImageAtLocation (ImBuf *ibuf, float x, float y, bool make_linear_rgb, float color[4]) |
Threaded Image Processing | |
| typedef struct ScanlineGlobalData | ScanlineGlobalData |
| static void | processor_apply_func (TaskPool *__restrict pool, void *taskdata) |
| void | IMB_processor_apply_threaded (int buffer_lines, int handle_size, void *init_customdata, void(init_handle)(void *handle, int start_line, int tot_line, void *customdata), void *(do_thread)(void *)) |
| static void | processor_apply_scanline_func (TaskPool *__restrict pool, void *taskdata) |
| void | IMB_processor_apply_threaded_scanlines (int total_scanlines, ScanlineThreadFunc do_thread, void *custom_data) |
This file was moved here from the src/ directory. It is meant to deal with endianness. It resided in a general blending lib. The other functions were only used during rendering. This single function remained. It should probably move to imbuf/intern/util.c, but we'll keep it here for the time being. (nzc)
Definition in file imageprocess.c.
| typedef struct ScanlineGlobalData ScanlineGlobalData |
| void bicubic_interpolation | ( | struct ImBuf * | in, |
| struct ImBuf * | out, | ||
| float | u, | ||
| float | v, | ||
| int | xout, | ||
| int | yout | ||
| ) |
Definition at line 109 of file imageprocess.c.
References bicubic_interpolation_color(), NULL, pixel_from_buffer(), ImBuf::rect, ImBuf::rect_float, and v.
| void bicubic_interpolation_color | ( | struct ImBuf * | in, |
| unsigned char | outI[4], | ||
| float | outF[4], | ||
| float | u, | ||
| float | v | ||
| ) |
Definition at line 98 of file imageprocess.c.
References BLI_bicubic_interpolation_char(), BLI_bicubic_interpolation_fl(), ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, and ImBuf::y.
Referenced by bicubic_interpolation(), do_projectpaint_thread(), blender::compositor::MovieClipBaseOperation::executePixelSampled(), blender::compositor::MultilayerColorOperation::executePixelSampled(), and blender::compositor::sampleImageAtLocation().
Definition at line 220 of file imageprocess.c.
References bilinear_interpolation_color(), NULL, pixel_from_buffer(), ImBuf::rect, ImBuf::rect_float, and v.
| void bilinear_interpolation_color | ( | struct ImBuf * | in, |
| unsigned char | outI[4], | ||
| float | outF[4], | ||
| float | u, | ||
| float | v | ||
| ) |
Definition at line 130 of file imageprocess.c.
References BLI_bilinear_interpolation_char(), BLI_bilinear_interpolation_fl(), ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, and ImBuf::y.
Referenced by bilinear_interpolation(), blender::compositor::MovieClipBaseOperation::executePixelSampled(), blender::compositor::MultilayerColorOperation::executePixelSampled(), and blender::compositor::sampleImageAtLocation().
| void bilinear_interpolation_color_wrap | ( | struct ImBuf * | in, |
| unsigned char | outI[4], | ||
| float | outF[4], | ||
| float | u, | ||
| float | v | ||
| ) |
Definition at line 148 of file imageprocess.c.
References Freestyle::a, ceil(), clamp_v4(), floor(), floorf, ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, x2, ImBuf::y, and y1.
Referenced by paint_sample_color(), project_face_pixel(), and project_paint_PickColor().
| void IMB_alpha_under_color_byte | ( | unsigned char * | rect, |
| int | x, | ||
| int | y, | ||
| const float | backcol[3] | ||
| ) |
Definition at line 469 of file imageprocess.c.
References Freestyle::a, alpha, mul(), x, and y.
Referenced by IMB_colormanagement_imbuf_for_write().
Definition at line 455 of file imageprocess.c.
References Freestyle::a, madd_v3_v3fl(), mul(), x, and y.
Referenced by IMB_colormanagement_imbuf_for_write().
| void IMB_convert_rgba_to_abgr | ( | struct ImBuf * | ibuf | ) |
Change the ordering of the color bytes pointed to by rect from rgba to abgr. size * 4 color bytes are reordered.
Definition at line 45 of file imageprocess.c.
References if(), ImBuf::rect, ImBuf::rect_float, size(), ImBuf::x, and ImBuf::y.
Referenced by IMB_anim_absolute(), imb_loadiris(), imb_loadtarga(), imb_read_tiff_pixels(), and imb_saveiris().
| void IMB_processor_apply_threaded | ( | int | buffer_lines, |
| int | handle_size, | ||
| void * | init_customdata, | ||
| void(init_handle)(void *handle, int start_line, int tot_line, void *customdata) | , | ||
| void * | do_thread)(void * | ||
| ) |
Definition at line 362 of file imageprocess.c.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), handles, MEM_callocN, MEM_freeN, NULL, processor_apply_func(), task_pool, and TASK_PRIORITY_LOW.
Referenced by display_buffer_apply_threaded(), do_gaussian_blur_effect(), IMB_scaleImBuf_threaded(), input_preprocess(), modifier_apply_threaded(), modifier_color_balance_apply(), processor_transform_apply_threaded(), and seq_render_effect_execute_threaded().
| void IMB_processor_apply_threaded_scanlines | ( | int | total_scanlines, |
| ScanlineThreadFunc | do_thread, | ||
| void * | custom_data | ||
| ) |
Definition at line 424 of file imageprocess.c.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), data, NULL, POINTER_FROM_INT, processor_apply_scanline_func(), task_pool, and TASK_PRIORITY_LOW.
Referenced by BKE_image_buf_fill_checker(), BKE_image_buf_fill_checker_color(), BKE_image_buf_fill_color(), IMB_buffer_float_from_float_threaded(), imb_partial_display_buffer_update_ex(), and IMB_rectblend_threaded().
| void IMB_sampleImageAtLocation | ( | ImBuf * | ibuf, |
| float | x, | ||
| float | y, | ||
| bool | make_linear_rgb, | ||
| float | color[4] | ||
| ) |
Definition at line 505 of file imageprocess.c.
References IMB_colormanagement_colorspace_to_scene_linear_v4(), nearest_interpolation_color(), NULL, ImBuf::rect_colorspace, ImBuf::rect_float, rgba_uchar_to_float(), x, and y.
Referenced by BKE_gpencil_from_image(), and palette_extract_img_exec().
Definition at line 337 of file imageprocess.c.
References nearest_interpolation_color(), NULL, pixel_from_buffer(), ImBuf::rect, ImBuf::rect_float, and v.
Referenced by BKE_tracking_stabilize_frame(), sequencer_image_crop_transform_do_thread(), and transform_image().
| void nearest_interpolation_color | ( | struct ImBuf * | in, |
| unsigned char | outI[4], | ||
| float | outF[4], | ||
| float | u, | ||
| float | v | ||
| ) |
Definition at line 242 of file imageprocess.c.
References ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, ImBuf::y, and y1.
Referenced by blender::compositor::MovieClipBaseOperation::executePixelSampled(), blender::compositor::MultilayerColorOperation::executePixelSampled(), IMB_sampleImageAtLocation(), nearest_interpolation(), blender::compositor::sampleImageAtLocation(), and studiolight_matcap_preview().
| void nearest_interpolation_color_wrap | ( | struct ImBuf * | in, |
| unsigned char | outI[4], | ||
| float | outF[4], | ||
| float | u, | ||
| float | v | ||
| ) |
Definition at line 298 of file imageprocess.c.
References floor(), ImBuf::rect, ImBuf::rect_float, v, x, ImBuf::x, y, and ImBuf::y.
Referenced by studiolight_calculate_radiance().
|
static |
Definition at line 80 of file imageprocess.c.
References ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, and y.
Referenced by bicubic_interpolation(), bilinear_interpolation(), and nearest_interpolation().
|
static |
Definition at line 356 of file imageprocess.c.
References BLI_task_pool_user_data(), and blender::compositor::pool.
Referenced by IMB_processor_apply_threaded().
|
static |
Definition at line 416 of file imageprocess.c.
References BLI_task_pool_user_data(), data, min_ii(), POINTER_AS_INT, and blender::compositor::pool.
Referenced by IMB_processor_apply_threaded_scanlines().