Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/filter.c
| Show First 20 Lines • Show All 419 Lines • ▼ Show 20 Lines | static int check_pixel_assigned( | ||||
| return res; | return res; | ||||
| } | } | ||||
| /** | /** | ||||
| * if alpha is zero, it checks surrounding pixels and averages color. sets new alphas to 1.0 | * 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, | * When a mask is given, only effect pixels with a mask value of 1, | ||||
| * defined as #BAKE_MASK_MARGIN in rendercore.c | * defined as #BAKE_MASK_MARGIN in rendercore.c | ||||
| * */ | */ | ||||
| void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter) | void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter) | ||||
| { | { | ||||
| const int width = ibuf->x; | const int width = ibuf->x; | ||||
| const int height = ibuf->y; | const int height = ibuf->y; | ||||
| const int depth = 4; /* always 4 channels */ | const int depth = 4; /* always 4 channels */ | ||||
| const int chsize = ibuf->rect_float ? sizeof(float) : sizeof(unsigned char); | const int chsize = ibuf->rect_float ? sizeof(float) : sizeof(unsigned char); | ||||
| const size_t bsize = ((size_t)width) * height * depth * chsize; | const size_t bsize = ((size_t)width) * height * depth * chsize; | ||||
| const bool is_float = (ibuf->rect_float != NULL); | const bool is_float = (ibuf->rect_float != NULL); | ||||
| ▲ Show 20 Lines • Show All 326 Lines • Show Last 20 Lines | |||||