|
Blender
V2.93
|
#include <math.h>#include "MEM_guardedalloc.h"#include "BLI_math_base.h"#include "BLI_utildefines.h"#include "IMB_filter.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "imbuf.h"Go to the source code of this file.
Functions | |
| static void | filtrow (unsigned char *point, int x) |
| static void | filtrowf (float *point, int x) |
| static void | filtcolum (unsigned char *point, int y, int skip) |
| static void | filtcolumf (float *point, int y, int skip) |
| void | IMB_filtery (struct ImBuf *ibuf) |
| void | imb_filterx (struct ImBuf *ibuf) |
| static void | imb_filterN (ImBuf *out, ImBuf *in) |
| void | IMB_filter (struct 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 (struct ImBuf *ibuf, char *mask, int filter) |
| void | IMB_remakemipmap (ImBuf *ibuf, int use_filter) |
| void | IMB_makemipmap (ImBuf *ibuf, int use_filter) |
| ImBuf * | IMB_getmipmap (ImBuf *ibuf, int level) |
| void | IMB_premultiply_rect (unsigned int *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 (unsigned int *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 |
|
static |
|
static |
| void IMB_filter | ( | struct ImBuf * | ibuf | ) |
Definition at line 318 of file filter.c.
References imb_filterx(), and IMB_filtery().
| void IMB_filter_extend | ( | struct 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, only effect pixels with a mask value of 1, defined as #BAKE_MASK_MARGIN in rendercore.c
Definition at line 429 of file filter.c.
References Freestyle::c, check_pixel_assigned(), filter(), filter_make_index(), FILTER_MASK_MARGIN, float(), height, mask(), MEM_dupallocN, MEM_freeN, NULL, r, ImBuf::rect, ImBuf::rect_float, sqrt(), width, x, ImBuf::x, y, and ImBuf::y.
Referenced by bake_ibuf_filter(), and RE_bake_margin().
Definition at line 201 of file filter.c.
References BLI_assert, ImBuf::channels, ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.
Referenced by IMB_makemipmap(), and IMB_remakemipmap().
| void imb_filterx | ( | struct ImBuf * | ibuf | ) |
Definition at line 160 of file filter.c.
References filtrow(), filtrowf(), ImBuf::planes, ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.
Referenced by IMB_double_x(), and IMB_filter().
| void IMB_filtery | ( | struct ImBuf * | ibuf | ) |
Definition at line 119 of file filter.c.
References filtcolum(), filtcolumf(), ImBuf::planes, ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.
Referenced by IMB_anim_absolute(), IMB_double_y(), IMB_filter(), and input_preprocess().
Definition at line 635 of file filter.c.
References CLAMP, ImBuf::mipmap, and ImBuf::miptot.
Referenced by IMB_tiles_to_rect().
| void IMB_makemipmap | ( | ImBuf * | ibuf, |
| int | use_filter | ||
| ) |
Definition at line 598 of file filter.c.
References ImBuf::channels, ImBuf::flags, IMB_allocImBuf(), imb_filterN(), IMB_freeImBuf(), imb_freemipmapImBuf(), IMB_MIPMAP_LEVELS, IMB_onehalf(), ImBuf::miplevel, ImBuf::mipmap, ImBuf::miptot, ImBuf::planes, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by image_mipmap_test().
| void IMB_mask_clear | ( | ImBuf * | ibuf, |
| const char * | mask, | ||
| int | val | ||
| ) |
Definition at line 368 of file filter.c.
References col, mask(), ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.
| void IMB_mask_filter_extend | ( | char * | mask, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 324 of file filter.c.
References FILTER_MASK_MARGIN, height, mask(), MEM_dupallocN, MEM_freeN, width, x, and y.
| void IMB_premultiply_alpha | ( | ImBuf * | ibuf | ) |
Definition at line 687 of file filter.c.
References ImBuf::channels, IMB_premultiply_rect(), IMB_premultiply_rect_float(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by BKE_previewimg_ensure(), icon_preview_startjob(), imb_handle_alpha(), UI_icon_alert_imbuf_get(), UI_icons_reload_internal_textures(), wm_block_create_about(), and wm_block_splash_image().
| void IMB_premultiply_rect | ( | unsigned int * | rect, |
| char | planes, | ||
| int | w, | ||
| int | h | ||
| ) |
| void IMB_premultiply_rect_float | ( | float * | rect_float, |
| int | channels, | ||
| int | w, | ||
| int | h | ||
| ) |
Definition at line 669 of file filter.c.
Referenced by do_processor_transform_thread(), IMB_colormanagement_transform_from_byte_threaded(), IMB_float_from_rect(), and IMB_premultiply_alpha().
| void IMB_remakemipmap | ( | ImBuf * | ibuf, |
| int | use_filter | ||
| ) |
Definition at line 561 of file filter.c.
References ImBuf::flags, IMB_allocImBuf(), imb_filterN(), IMB_freeImBuf(), IMB_MIPMAP_LEVELS, imb_onehalf_no_alloc(), ImBuf::miplevel, ImBuf::mipmap, ImBuf::miptot, ImBuf::planes, ImBuf::x, and ImBuf::y.
Referenced by image_mipmap_test().
| void IMB_unpremultiply_alpha | ( | ImBuf * | ibuf | ) |
Definition at line 749 of file filter.c.
References ImBuf::channels, IMB_unpremultiply_rect(), IMB_unpremultiply_rect_float(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_alpha().
| void IMB_unpremultiply_rect | ( | unsigned int * | rect, |
| char | planes, | ||
| int | w, | ||
| int | h | ||
| ) |
Definition at line 702 of file filter.c.
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 731 of file filter.c.
Referenced by IMB_rect_from_float(), and IMB_unpremultiply_alpha().