/frameworks/support/compat/src/androidTest/java/androidx/core/math/ |
H A D | 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( [all...] |
/frameworks/support/compat/src/main/java/androidx/core/math/ |
H A D | 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
|
/frameworks/rs/tests/java_api/ScriptGroupTest/src/com/android/rs/sgtest/ |
H A D | f4touc4.rs | 21 float4 f = clamp(in, 0.f, 255.f);
|
H A D | levels_f.rsh | 28 pixel = clamp(pixel, 0.f, 255.f); 31 pixel = clamp(pixel, 0.f, 255.f); 51 pixel = clamp(pixel, 0.f, 255.f);
|
/frameworks/av/cmds/stagefright/filters/ |
H A D | 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);
|
H A D | 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/ |
H A D | 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/ |
H A D | 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);
|
H A D | vibrance.rs | 48 o.r = clamp((int) Rc, 0, 255); 49 o.g = clamp((int) Gc, 0, 255); 50 o.b = clamp((int) Bc, 0, 255);
|
H A D | colormatrix.rs | 33 f = clamp(f, 0.f, 255.f);
|
H A D | exposure.rs | 30 out.rgb = convert_uchar3(clamp(convert_int3(t * bright), 0, 255));
|
H A D | contrast.rs | 31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
|
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/ |
H A D | 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);
|
H A D | colormatrix.rs | 33 f = clamp(f, 0.f, 255.f);
|
H A D | contrast.rs | 31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
H A D | 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);
|
H A D | 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(start [all...] |
H A D | vibrance.rs | 48 o.r = clamp((int) Rc, 0, 255); 49 o.g = clamp((int) Gc, 0, 255); 50 o.b = clamp((int) Bc, 0, 255);
|
H A D | colormatrix.rs | 33 f = clamp(f, 0.f, 255.f);
|
H A D | exposure.rs | 30 out.rgb = convert_uchar3(clamp(convert_int3(t * bright), 0, 255));
|
H A D | contrast.rs | 31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/ |
H A D | imgprocutil.h | 27 inline int clamp(int min, int val, int max) { function
|
/frameworks/native/services/sensorservice/ |
H A D | quat.h | 65 } clamp; local 71 q.x = sqrtf( clamp( Hx - My - Az + 1) * 0.25f ); 72 q.y = sqrtf( clamp(-Hx + My - Az + 1) * 0.25f ); 73 q.z = sqrtf( clamp(-Hx - My + Az + 1) * 0.25f ); 74 q.w = sqrtf( clamp( Hx + My + Az + 1) * 0.25f );
|
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/ |
H A D | clamp.rs | 26 float2 res2 = clamp(src2, min2, max2); 35 float3 res3 = clamp(src3, min3, max3); 45 float4 res4 = clamp(src4, min4, max4);
|
/frameworks/rs/rsov/compiler/tests/image/ |
H A D | contrast.rs | 32 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
|