Lines Matching refs:pb
4766 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_interleaved() argument
4770 if (!pb) { in wuffs_base__pixel_buffer__set_interleaved()
4773 memset(pb, 0, sizeof(*pb)); in wuffs_base__pixel_buffer__set_interleaved()
4799 pb->pixcfg = *pixcfg; in wuffs_base__pixel_buffer__set_interleaved()
4800 pb->private_impl.planes[0] = primary_memory; in wuffs_base__pixel_buffer__set_interleaved()
4803 &pb->private_impl in wuffs_base__pixel_buffer__set_interleaved()
4814 wuffs_base__pixel_buffer__set_from_slice(wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_from_slice() argument
4817 if (!pb) { in wuffs_base__pixel_buffer__set_from_slice()
4820 memset(pb, 0, sizeof(*pb)); in wuffs_base__pixel_buffer__set_from_slice()
4849 &pb->private_impl in wuffs_base__pixel_buffer__set_from_slice()
4873 pb->pixcfg = *pixcfg; in wuffs_base__pixel_buffer__set_from_slice()
4874 wuffs_base__table_u8* tab = &pb->private_impl.planes[0]; in wuffs_base__pixel_buffer__set_from_slice()
4885 wuffs_base__pixel_buffer__set_from_table(wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_from_table() argument
4888 if (!pb) { in wuffs_base__pixel_buffer__set_from_table()
4891 memset(pb, 0, sizeof(*pb)); in wuffs_base__pixel_buffer__set_from_table()
4912 pb->pixcfg = *pixcfg; in wuffs_base__pixel_buffer__set_from_table()
4913 pb->private_impl.planes[0] = primary_memory; in wuffs_base__pixel_buffer__set_from_table()
4921 wuffs_base__pixel_buffer__palette(wuffs_base__pixel_buffer* pb) { in wuffs_base__pixel_buffer__palette() argument
4922 if (pb && in wuffs_base__pixel_buffer__palette()
4923 wuffs_base__pixel_format__is_indexed(&pb->pixcfg.private_impl.pixfmt)) { in wuffs_base__pixel_buffer__palette()
4925 &pb->private_impl in wuffs_base__pixel_buffer__palette()
4938 wuffs_base__pixel_buffer__palette_or_else(wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__palette_or_else() argument
4940 if (pb && in wuffs_base__pixel_buffer__palette_or_else()
4941 wuffs_base__pixel_format__is_indexed(&pb->pixcfg.private_impl.pixfmt)) { in wuffs_base__pixel_buffer__palette_or_else()
4943 &pb->private_impl in wuffs_base__pixel_buffer__palette_or_else()
4956 wuffs_base__pixel_buffer__pixel_format(const wuffs_base__pixel_buffer* pb) { in wuffs_base__pixel_buffer__pixel_format() argument
4957 if (pb) { in wuffs_base__pixel_buffer__pixel_format()
4958 return pb->pixcfg.private_impl.pixfmt; in wuffs_base__pixel_buffer__pixel_format()
4964 wuffs_base__pixel_buffer__plane(wuffs_base__pixel_buffer* pb, uint32_t p) { in wuffs_base__pixel_buffer__plane() argument
4965 if (pb && (p < WUFFS_BASE__PIXEL_FORMAT__NUM_PLANES_MAX)) { in wuffs_base__pixel_buffer__plane()
4966 return pb->private_impl.planes[p]; in wuffs_base__pixel_buffer__plane()
4978 wuffs_base__pixel_buffer__color_u32_at(const wuffs_base__pixel_buffer* pb,
4984 wuffs_base__pixel_buffer* pb,
4991 wuffs_base__pixel_buffer* pb,
5049 wuffs_base__pixel_buffer* pb,
16211 wuffs_base__pixel_buffer__color_u32_at(const wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__color_u32_at() argument
16214 if (!pb || (x >= pb->pixcfg.private_impl.width) || in wuffs_base__pixel_buffer__color_u32_at()
16215 (y >= pb->pixcfg.private_impl.height)) { in wuffs_base__pixel_buffer__color_u32_at()
16219 if (wuffs_base__pixel_format__is_planar(&pb->pixcfg.private_impl.pixfmt)) { in wuffs_base__pixel_buffer__color_u32_at()
16224 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__color_u32_at()
16225 const uint8_t* row = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)); in wuffs_base__pixel_buffer__color_u32_at()
16227 switch (pb->pixcfg.private_impl.pixfmt.repr) { in wuffs_base__pixel_buffer__color_u32_at()
16234 uint8_t* palette = pb->private_impl.planes[3].ptr; in wuffs_base__pixel_buffer__color_u32_at()
16249 uint8_t* palette = pb->private_impl.planes[3].ptr; in wuffs_base__pixel_buffer__color_u32_at()
16301 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_at() argument
16305 if (!pb) { in wuffs_base__pixel_buffer__set_color_u32_at()
16308 if ((x >= pb->pixcfg.private_impl.width) || in wuffs_base__pixel_buffer__set_color_u32_at()
16309 (y >= pb->pixcfg.private_impl.height)) { in wuffs_base__pixel_buffer__set_color_u32_at()
16313 if (wuffs_base__pixel_format__is_planar(&pb->pixcfg.private_impl.pixfmt)) { in wuffs_base__pixel_buffer__set_color_u32_at()
16318 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__set_color_u32_at()
16319 uint8_t* row = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)); in wuffs_base__pixel_buffer__set_color_u32_at()
16321 switch (pb->pixcfg.private_impl.pixfmt.repr) { in wuffs_base__pixel_buffer__set_color_u32_at()
16350 wuffs_base__pixel_buffer__palette(pb), in wuffs_base__pixel_buffer__set_color_u32_at()
16351 pb->pixcfg.private_impl.pixfmt, color)); in wuffs_base__pixel_buffer__set_color_u32_at()
16403 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xx() argument
16406 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xx()
16410 pb->private_impl.planes[0].ptr + (stride * ((size_t)rect.min_incl_y)); in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xx()
16422 uint8_t* ptr = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)) + in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xx()
16434 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxx() argument
16437 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxx()
16441 pb->private_impl.planes[0].ptr + (stride * ((size_t)rect.min_incl_y)); in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxx()
16453 uint8_t* ptr = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)) + in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxx()
16465 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxx() argument
16468 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxx()
16472 pb->private_impl.planes[0].ptr + (stride * ((size_t)rect.min_incl_y)); in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxx()
16484 uint8_t* ptr = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)) + in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxx()
16496 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxxxxxx() argument
16499 size_t stride = pb->private_impl.planes[0].stride; in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxxxxxx()
16503 pb->private_impl.planes[0].ptr + (stride * ((size_t)rect.min_incl_y)); in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxxxxxx()
16515 uint8_t* ptr = pb->private_impl.planes[0].ptr + (stride * ((size_t)y)) + in wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxxxxxx()
16527 wuffs_base__pixel_buffer* pb, in wuffs_base__pixel_buffer__set_color_u32_fill_rect() argument
16530 if (!pb) { in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16536 wuffs_base__pixel_config__bounds(&pb->pixcfg); in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16541 if (wuffs_base__pixel_format__is_planar(&pb->pixcfg.private_impl.pixfmt)) { in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16546 switch (pb->pixcfg.private_impl.pixfmt.repr) { in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16549 wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxxx(pb, rect, color); in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16556 pb, rect, in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16561 wuffs_base__pixel_buffer__set_color_u32_fill_rect__xxx(pb, rect, color); in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16566 pb, rect, in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16573 pb, rect, in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16580 pb, rect, in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16588 pb, rect, wuffs_base__swap_u32_argb_abgr(color)); in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16596 wuffs_base__pixel_buffer__set_color_u32_at(pb, x, y, color); in wuffs_base__pixel_buffer__set_color_u32_fill_rect()
16632 uint32_t pb = 0x101 * ((uint32_t)(palette_slice.ptr[(4 * i) + 0])); in wuffs_base__pixel_palette__closest_element() local
16639 pb = (pb * pa) / 0xFFFF; in wuffs_base__pixel_palette__closest_element()
16646 pb -= cb; in wuffs_base__pixel_palette__closest_element()
16650 uint64_t score = ((uint64_t)(pb * pb)) + ((uint64_t)(pg * pg)) + in wuffs_base__pixel_palette__closest_element()