|
Blender V5.0
|
#include <cmath>#include "MEM_guardedalloc.h"#include "BLI_math_base.h"#include "BLI_utildefines.h"#include "IMB_filter.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"Go to the source code of this file.
Functions | |
| static void | filtcolum (uchar *point, int y, int skip) |
| static void | filtcolumf (float *point, int y, int skip) |
| void | IMB_filtery (ImBuf *ibuf) |
| void | IMB_mask_filter_extend (char *mask, int width, int height) |
| void | IMB_mask_clear (ImBuf *ibuf, const char *mask, int val) |
| static int | filter_make_index (const int x, const int y, const int w, const int h) |
| static int | check_pixel_assigned (const void *buffer, const char *mask, const int index, const int depth, const bool is_float) |
| void | IMB_filter_extend (ImBuf *ibuf, char *mask, int filter) |
| void | IMB_premultiply_rect (uint8_t *rect, char planes, int w, int h) |
| void | IMB_premultiply_rect_float (float *rect_float, int channels, int w, int h) |
| void | IMB_premultiply_alpha (ImBuf *ibuf) |
| void | IMB_unpremultiply_rect (uint8_t *rect, char planes, int w, int h) |
| void | IMB_unpremultiply_rect_float (float *rect_float, int channels, int w, int h) |
| void | IMB_unpremultiply_alpha (ImBuf *ibuf) |
|
static |
|
static |
|
static |
|
static |
| void IMB_filter_extend | ( | ImBuf * | ibuf, |
| char * | mask, | ||
| int | filter ) |
If alpha is zero, it checks surrounding pixels and averages color. sets new alphas to 1.0 When a mask is given, the mask will be used instead of the alpha channel, where only pixels with a mask value of 0 will be written to, and only pixels with a mask value of 1 will be used for the average. The mask will be set to one for the pixels which were written.
Definition at line 200 of file filter.cc.
References ImBuf::byte_buffer, check_pixel_assigned(), ImBufByteBuffer::data, ImBufFloatBuffer::data, filter, filter_make_index(), FILTER_MASK_MARGIN, float, ImBuf::float_buffer, i, mask(), MEM_dupallocN(), MEM_freeN(), nullptr, roundf, sqrt, ImBuf::x, x, ImBuf::y, and y.
Referenced by blender::render::texturemargin::generate_margin(), and RE_bake_margin().
| void IMB_filtery | ( | ImBuf * | ibuf | ) |
Definition at line 63 of file filter.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, ImBufFloatBuffer::data, filtcolum(), filtcolumf(), ImBuf::float_buffer, ImBuf::planes, ImBuf::x, x, ImBuf::y, and y.
Referenced by blender::seq::input_preprocess().
| void IMB_mask_clear | ( | ImBuf * | ibuf, |
| const char * | mask, | ||
| int | val ) |
Definition at line 144 of file filter.cc.
References ImBuf::byte_buffer, col, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, mask(), ImBuf::x, x, ImBuf::y, and y.
| void IMB_mask_filter_extend | ( | char * | mask, |
| int | width, | ||
| int | height ) |
Definition at line 100 of file filter.cc.
References FILTER_MASK_MARGIN, mask(), MEM_dupallocN(), MEM_freeN(), x, and y.
| void IMB_premultiply_alpha | ( | ImBuf * | ibuf | ) |
Definition at line 381 of file filter.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMB_premultiply_rect(), IMB_premultiply_rect_float(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by BKE_previewimg_ensure(), imb_handle_colorspace_and_alpha(), UI_svg_icon_bitmap(), wm_block_splash_banner_image(), and wm_block_splash_image().
| void IMB_premultiply_rect | ( | uint8_t * | rect, |
| char | planes, | ||
| int | w, | ||
| int | h ) |
| void IMB_premultiply_rect_float | ( | float * | rect_float, |
| int | channels, | ||
| int | w, | ||
| int | h ) |
Definition at line 363 of file filter.cc.
Referenced by do_processor_transform_thread(), and IMB_premultiply_alpha().
| void IMB_unpremultiply_alpha | ( | ImBuf * | ibuf | ) |
Definition at line 443 of file filter.cc.
References ImBuf::byte_buffer, ImBuf::channels, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::float_buffer, IMB_unpremultiply_rect(), IMB_unpremultiply_rect_float(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_colorspace_and_alpha().
| void IMB_unpremultiply_rect | ( | uint8_t * | rect, |
| char | planes, | ||
| int | w, | ||
| int | h ) |
Definition at line 396 of file filter.cc.
References float, unit_float_to_uchar_clamp(), w(), x, and y.
Referenced by IMB_unpremultiply_alpha().
| void IMB_unpremultiply_rect_float | ( | float * | rect_float, |
| int | channels, | ||
| int | w, | ||
| int | h ) |
Definition at line 425 of file filter.cc.
Referenced by IMB_byte_from_float(), and IMB_unpremultiply_alpha().