Lines Matching defs:scale
134 SI U32 round (F v, F scale) { return (uint32_t)(v*scale + 0.5f); }
217 SI U32 round(F v, F scale) { return vcvtnq_u32_f32(v*scale); }
232 SI U32 round(F v, F scale) {
233 return vcvtq_u32_f32(mad(v,scale,0.5f));
380 SI U32 round (F v, F scale) { return _mm256_cvtps_epi32(v*scale); }
711 SI U32 round(F v, F scale) { return _mm_cvtps_epi32(v*scale); }
1263 // We often have a nominally [0,1] float value we need to scale and convert to an integer,
1270 SI U32 to_unorm(F v, F scale, F bias = 1.0f) {
1272 return round(min(max(0, v), bias), scale);
1496 // Map min channel to 0, max channel to s, and scale the middle proportionally.
1497 auto scale = [=](F c) {
1500 *r = scale(*r);
1501 *g = scale(*g);
1502 *b = scale(*b);
1687 auto scale = if_then_else(1.0f/a < inf, 1.0f/a, 0);
1688 r *= scale;
1689 g *= scale;
1690 b *= scale;
2304 return v - floor_(v*ctx->invScale)*ctx->scale;
2307 auto limit = ctx->scale;
2595 // from x and y, multiplying them together here to get each pixel's total scale factor.
2596 auto scale = sk_unaligned_load<F>(c->scalex)
2598 dr = mad(scale, r, dr);
2599 dg = mad(scale, g, dg);
2600 db = mad(scale, b, db);
2601 da = mad(scale, a, da);
2851 F scale = scalex[xx] * scaley[yy];
2860 r = mad(scale, sr, r);
2861 g = mad(scale, sg, g);
2862 b = mad(scale, sb, b);
2863 a = mad(scale, sa, a);
3660 // These bit replications are the same as multiplying by 255/31 or 255/63 to scale to 8-bit.