/frameworks/support/compat/src/androidTest/java/androidx/core/math/ |
MathUtilsTest.java | 34 assertEquals(0, MathUtils.clamp(-4, 0, 7)); 35 assertEquals(3, MathUtils.clamp(3, -2, 7)); 36 assertEquals(0, MathUtils.clamp(0, 0, 7)); 37 assertEquals(7, MathUtils.clamp(7, 0, 7)); 38 assertEquals(7, MathUtils.clamp(8, -2, 7)); 41 assertEquals(0.0, MathUtils.clamp(-0.4, 0.0, 7.0), 0.0); 42 assertEquals(3.0, MathUtils.clamp(3.0, 0.0, 7.0), 0.0); 43 assertEquals(0.1, MathUtils.clamp(0.1, 0.0, 7.0), 0.0); 44 assertEquals(7.0, MathUtils.clamp(7.0, 0.0, 7.0), 0.0); 45 assertEquals(-0.6, MathUtils.clamp(-0.7, -0.6, 7.0), 0.0) [all...] |
/frameworks/support/compat/src/main/java/androidx/core/math/ |
MathUtils.java | 38 public static float clamp(float value, float min, float max) { method in class:MathUtils 59 public static double clamp(double value, double min, double max) { method in class:MathUtils 80 public static int clamp(int value, int min, int max) { method in class:MathUtils
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
MoreMath.java | 27 public static int clamp(int input, int lowerBound, int upperBound) { method in class:MoreMath 37 public static float clamp(float input, float lowerBound, float upperBound) { method in class:MoreMath 47 public static double clamp(double input, double lowerBound, double upperBound) { method in class:MoreMath
|
/external/libvpx/libvpx/vp9/common/ |
vp9_quant_common.c | 167 case VPX_BITS_8: return dc_qlookup[clamp(qindex + delta, 0, MAXQ)]; 168 case VPX_BITS_10: return dc_qlookup_10[clamp(qindex + delta, 0, MAXQ)]; 169 case VPX_BITS_12: return dc_qlookup_12[clamp(qindex + delta, 0, MAXQ)]; 176 return dc_qlookup[clamp(qindex + delta, 0, MAXQ)]; 183 case VPX_BITS_8: return ac_qlookup[clamp(qindex + delta, 0, MAXQ)]; 184 case VPX_BITS_10: return ac_qlookup_10[clamp(qindex + delta, 0, MAXQ)]; 185 case VPX_BITS_12: return ac_qlookup_12[clamp(qindex + delta, 0, MAXQ)]; 192 return ac_qlookup[clamp(qindex + delta, 0, MAXQ)]; 202 return clamp(seg_qindex, 0, MAXQ);
|
/frameworks/rs/tests/java_api/ScriptGroupTest/src/com/android/rs/sgtest/ |
f4touc4.rs | 21 float4 f = clamp(in, 0.f, 255.f);
|
/packages/apps/Gallery2/jni/filters/ |
exposure.c | 31 rgb[RED] = clamp((255*(rgb[RED]))/m); 32 rgb[GREEN] = clamp((255*(rgb[GREEN]))/m); 33 rgb[BLUE] = clamp((255*(rgb[BLUE]))/m);
|
contrast.c | 20 unsigned char clamp(int c) function 50 rgb[RED] = clamp((int)(m*rgb[RED]+c)); 51 rgb[GREEN] = clamp((int)(m*rgb[GREEN]+c)); 52 rgb[BLUE] = clamp((int)(m*rgb[BLUE]+c));
|
/external/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ |
clamp.comp.pass.cpp | 15 // clamp(const T& v, const T& lo, const T& hi, Compare comp); 39 assert(&std::clamp(v, lo, hi, c) == &x); 71 assert(eq(std::clamp(x, y, z, comp), x)); 72 assert(eq(std::clamp(y, x, z, comp), y)); 80 assert(eq(std::clamp(x, y, z, comp), x)); 81 assert(eq(std::clamp(y, x, z, comp), y)); 89 assert(eq(std::clamp(x, y, z, comp), x)); 90 assert(eq(std::clamp(z, y, x, comp), z)); 98 assert(eq(std::clamp(x, y, z, comp), x)); 99 assert(eq(std::clamp(y, x, z, comp), x)) [all...] |
clamp.pass.cpp | 15 // clamp(const T& v, const T& lo, const T& hi); 37 assert(&std::clamp(a, lo, hi) == &x); 69 assert(eq(std::clamp(x, y, z), x)); 70 assert(eq(std::clamp(y, x, z), y)); 78 assert(eq(std::clamp(x, y, z), x)); 79 assert(eq(std::clamp(y, x, z), y)); 87 assert(eq(std::clamp(x, y, z), x)); 88 assert(eq(std::clamp(z, y, x), z)); 96 assert(eq(std::clamp(x, y, z), x)); 97 assert(eq(std::clamp(y, x, z), x)) [all...] |
/prebuilts/ndk/r16/sources/cxx-stl/llvm-libc++/test/std/algorithms/alg.sorting/alg.clamp/ |
clamp.comp.pass.cpp | 15 // clamp(const T& v, const T& lo, const T& hi, Compare comp); 39 assert(&std::clamp(v, lo, hi, c) == &x); 71 assert(eq(std::clamp(x, y, z, comp), x)); 72 assert(eq(std::clamp(y, x, z, comp), y)); 80 assert(eq(std::clamp(x, y, z, comp), x)); 81 assert(eq(std::clamp(y, x, z, comp), y)); 89 assert(eq(std::clamp(x, y, z, comp), x)); 90 assert(eq(std::clamp(z, y, x, comp), z)); 98 assert(eq(std::clamp(x, y, z, comp), x)); 99 assert(eq(std::clamp(y, x, z, comp), x)) [all...] |
clamp.pass.cpp | 15 // clamp(const T& v, const T& lo, const T& hi); 37 assert(&std::clamp(a, lo, hi) == &x); 69 assert(eq(std::clamp(x, y, z), x)); 70 assert(eq(std::clamp(y, x, z), y)); 78 assert(eq(std::clamp(x, y, z), x)); 79 assert(eq(std::clamp(y, x, z), y)); 87 assert(eq(std::clamp(x, y, z), x)); 88 assert(eq(std::clamp(z, y, x), z)); 96 assert(eq(std::clamp(x, y, z), x)); 97 assert(eq(std::clamp(y, x, z), x)) [all...] |
/external/libvpx/libvpx/test/ |
add_noise_test.cc | 47 const int clamp = vpx_setup_noise(4.4, noise, kNoiseSize); local 54 GetParam()(s, noise, clamp, clamp, width, height, width)); 73 GetParam()(s, noise, clamp, clamp, width, height, width)); 77 EXPECT_GT(static_cast<int>(s[i]), clamp) << "i = " << i; 84 GetParam()(s, noise, clamp, clamp, width, height, width)); 88 EXPECT_LT(static_cast<int>(s[i]), 255 - clamp) << "i = " << i; 99 const int clamp = vpx_setup_noise(4.4, noise, kNoiseSize) local [all...] |
/external/syslinux/com32/lib/jpeg/ |
bgr24.c | 56 static unsigned char clamp(int i) function 103 *p++ = clamp(b); 105 *p++ = clamp(g); 107 *p++ = clamp(r); 159 *p++ = clamp(b); 161 *p++ = clamp(g); 163 *p++ = clamp(r); 168 *p++ = clamp(b); 170 *p++ = clamp(g); 172 *p++ = clamp(r) [all...] |
bgra32.c | 56 static unsigned char clamp(int i) function 103 *p++ = clamp(b); 105 *p++ = clamp(g); 107 *p++ = clamp(r); 160 *p++ = clamp(b); 162 *p++ = clamp(g); 164 *p++ = clamp(r); 171 *p++ = clamp(b); 173 *p++ = clamp(g); 175 *p++ = clamp(r) [all...] |
rgb24.c | 56 static unsigned char clamp(int i) function 102 *p++ = clamp(r); 104 *p++ = clamp(g); 106 *p++ = clamp(b); 158 *p++ = clamp(r); 160 *p++ = clamp(g); 162 *p++ = clamp(b); 167 *p++ = clamp(r); 169 *p++ = clamp(g); 171 *p++ = clamp(b) [all...] |
rgba32.c | 56 static unsigned char clamp(int i) function 103 *p++ = clamp(r); 105 *p++ = clamp(g); 107 *p++ = clamp(b); 160 *p++ = clamp(r); 162 *p++ = clamp(g); 164 *p++ = clamp(b); 171 *p++ = clamp(r); 173 *p++ = clamp(g); 175 *p++ = clamp(b) [all...] |
/cts/tests/tests/renderscript/src/android/renderscript/cts/generated/ |
TestClamp.rs | 28 return clamp(inValue, inMinValue, inMaxValue); 34 return clamp(inValue, inMinValue, inMaxValue); 40 return clamp(inValue, inMinValue, inMaxValue); 46 return clamp(inValue, inMinValue, inMaxValue); 52 return clamp(inValue, inMinValue, inMaxValue); 58 return clamp(inValue, inMinValue, inMaxValue); 64 return clamp(inValue, inMinValue, inMaxValue); 70 return clamp(inValue, inMinValue, inMaxValue); 76 return clamp(inValue, inMinValue, inMaxValue); 82 return clamp(inValue, inMinValue, inMaxValue) [all...] |
/frameworks/av/cmds/stagefright/filters/ |
nightvision.rs | 35 v_out->y = (uchar)clamp((result.r * 255.f + 0.5f), 0.f, 255.f); 36 v_out->z = (uchar)clamp((result.g * 255.f + 0.5f), 0.f, 255.f); 37 v_out->w = (uchar)clamp((result.b * 255.f + 0.5f), 0.f, 255.f);
|
saturation.rs | 37 v_out->y = (uchar)clamp((result.r * 255.f + 0.5f), 0.f, 255.f); 38 v_out->z = (uchar)clamp((result.g * 255.f + 0.5f), 0.f, 255.f); 39 v_out->w = (uchar)clamp((result.b * 255.f + 0.5f), 0.f, 255.f);
|
/frameworks/av/media/libstagefright/filters/ |
saturationARGB.rs | 37 v_out->y = (uchar)clamp((result.r * 255.f + 0.5f), 0.f, 255.f); 38 v_out->z = (uchar)clamp((result.g * 255.f + 0.5f), 0.f, 255.f); 39 v_out->w = (uchar)clamp((result.b * 255.f + 0.5f), 0.f, 255.f);
|
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/ |
levels.rsh | 28 pixel = clamp(pixel, 0.f, 255.f); 31 pixel = clamp(pixel, 0.f, 255.f); 40 pixel = clamp(pixel, 0.f, 255.f); 43 pixel = clamp(pixel, 0.f, 255.f);
|
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/ |
levels.rsh | 28 pixel = clamp(pixel, 0.f, 255.f); 31 pixel = clamp(pixel, 0.f, 255.f); 40 pixel = clamp(pixel, 0.f, 255.f); 43 pixel = clamp(pixel, 0.f, 255.f);
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
levels.rsh | 28 pixel = clamp(pixel, 0.f, 255.f); 31 pixel = clamp(pixel, 0.f, 255.f); 40 pixel = clamp(pixel, 0.f, 255.f); 43 pixel = clamp(pixel, 0.f, 255.f);
|
resize.rs | 27 float xf = clamp(x * scale, 0.f, (float)gWidthIn - 1.f); 28 float yf = clamp(y * scale, 0.f, (float)gHeightIn - 1.f); 54 uint32_t xs0 = (uint32_t) clamp(startx + 0, 0, maxx); 55 uint32_t xs1 = (uint32_t) clamp(startx + 1, 0, maxx); 56 uint32_t xs2 = (uint32_t) clamp(startx + 2, 0, maxx); 57 uint32_t xs3 = (uint32_t) clamp(startx + 3, 0, maxx); 59 uint32_t ys0 = (uint32_t) clamp(starty + 0, 0 , maxy); 60 uint32_t ys1 = (uint32_t) clamp(starty + 1, 0 , maxy); 61 uint32_t ys2 = (uint32_t) clamp(starty + 2, 0 , maxy); 62 uint32_t ys3 = (uint32_t) clamp(starty + 3, 0 , maxy) [all...] |
/external/libvpx/libvpx/vpx_dsp/ |
vpx_dsp_common.h | 52 static INLINE int clamp(int value, int low, int high) { function 63 default: return (uint16_t)clamp(val, 0, 255); 64 case 10: return (uint16_t)clamp(val, 0, 1023); 65 case 12: return (uint16_t)clamp(val, 0, 4095);
|