Home
last modified time | relevance | path

Searched refs:clamp (Results 1 – 25 of 172) sorted by relevance

1234567

/frameworks/support/core-utils/tests/java/android/support/v4/math/
DMathUtilsTest.java34 assertEquals(0, MathUtils.clamp(-4, 0, 7)); in testClamp()
35 assertEquals(3, MathUtils.clamp(3, -2, 7)); in testClamp()
36 assertEquals(0, MathUtils.clamp(0, 0, 7)); in testClamp()
37 assertEquals(7, MathUtils.clamp(7, 0, 7)); in testClamp()
38 assertEquals(7, MathUtils.clamp(8, -2, 7)); in testClamp()
41 assertEquals(0.0, MathUtils.clamp(-0.4, 0.0, 7.0), 0.0); in testClamp()
42 assertEquals(3.0, MathUtils.clamp(3.0, 0.0, 7.0), 0.0); in testClamp()
43 assertEquals(0.1, MathUtils.clamp(0.1, 0.0, 7.0), 0.0); in testClamp()
44 assertEquals(7.0, MathUtils.clamp(7.0, 0.0, 7.0), 0.0); in testClamp()
45 assertEquals(-0.6, MathUtils.clamp(-0.7, -0.6, 7.0), 0.0); in testClamp()
[all …]
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
Dresize.rs27 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 …]
Dlevels.rsh28 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);
Dvibrance.rs48 o.r = clamp((int) Rc, 0, 255);
49 o.g = clamp((int) Gc, 0, 255);
50 o.b = clamp((int) Bc, 0, 255);
Dthreshold.rs88 int validH = clamp((int)y + r, (int)0, (int)(height - 1));
94 out.xyz = convert_uchar3(clamp(blurredPixel, 0.f, 255.f));
110 int validX = clamp((int)x + r, (int)0, (int)(width - 1));
Dthreshold_half.rs88 int validH = clamp((int)y + r, (int)0, (int)(height - 1));
94 out.xyz = convert_uchar3(clamp(blurredPixel, (half) 0.f, (half) 255.f));
110 int validX = clamp((int)x + r, (int)0, (int)(width - 1));
/frameworks/support/core-utils/java/android/support/v4/math/
DMathUtils.java38 public static float clamp(float value, float min, float max) { in clamp() method in MathUtils
59 public static double clamp(double value, double min, double max) { in clamp() method in MathUtils
80 public static int clamp(int value, int min, int max) { in clamp() method in MathUtils
/frameworks/native/services/sensorservice/
Dquat.h65 } clamp; in matrixToQuat() local
71 q.x = sqrtf( clamp( Hx - My - Az + 1) * 0.25f ); in matrixToQuat()
72 q.y = sqrtf( clamp(-Hx + My - Az + 1) * 0.25f ); in matrixToQuat()
73 q.z = sqrtf( clamp(-Hx - My + Az + 1) * 0.25f ); in matrixToQuat()
74 q.w = sqrtf( clamp( Hx + My + Az + 1) * 0.25f ); in matrixToQuat()
/frameworks/rs/driver/runtime/arch/
Dclamp.c25 extern T __attribute__((overloadable)) clamp(T amount, T low, T high) { \
46 extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T##2 low, T##2 high) { \
53 extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T##3 low, T##3 high) { \
61 extern T##4 __attribute__((overloadable)) clamp(T##4 amount, T##4 low, T##4 high) { \
70 extern T##2 __attribute__((overloadable)) clamp(T##2 amount, T low, T high) { \
77 extern T##3 __attribute__((overloadable)) clamp(T##3 amount, T low, T high) { \
85 extern T##4 __attribute__((overloadable)) clamp(T##4 amount, T low, T high) { \
/frameworks/av/media/libstagefright/filters/
Dsaturation.rs37 v_out->x = (uchar)clamp((result.r * 255.f + 0.5f), 0.f, 255.f);
38 v_out->y = (uchar)clamp((result.g * 255.f + 0.5f), 0.f, 255.f);
39 v_out->z = (uchar)clamp((result.b * 255.f + 0.5f), 0.f, 255.f);
DsaturationARGB.rs37 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/cpu_ref/
DrsCpuIntrinsicInlines.h85 static inline int4 clamp(int4 amount, int low, int high) { in CVT_FUNC()
94 static inline float4 clamp(float4 amount, float low, float high) { in clamp() function
103 static inline int2 clamp(int2 amount, int low, int high) { in clamp() function
110 static inline float2 clamp(float2 amount, float low, float high) { in clamp() function
117 static inline int clamp(int amount, int low, int high) { in clamp() function
121 static inline float clamp(float amount, float low, float high) { in clamp() function
/frameworks/av/cmds/stagefright/filters/
Dnightvision.rs35 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);
Dsaturation.rs37 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/ImageProcessing2/src/com/android/rs/image/
Dlevels.rsh28 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/src/com/android/rs/image/
Dlevels.rsh28 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);
Dvibrance.rs48 o.r = clamp((int) Rc, 0, 255);
49 o.g = clamp((int) Gc, 0, 255);
50 o.b = clamp((int) Bc, 0, 255);
Dthreshold.rs88 int validH = clamp((int)y + r, (int)0, (int)(height - 1));
94 out.xyz = convert_uchar3(clamp(blurredPixel, 0.f, 255.f));
110 int validX = clamp((int)x + r, (int)0, (int)(width - 1));
/frameworks/support/design/src/android/support/design/widget/
DSwipeDismissBehavior.java139 mDragDismissThreshold = clamp(0f, distance, 1f); in setDragDismissDistance()
148 mAlphaStartSwipeDistance = clamp(0f, fraction, 1f); in setStartAlphaSwipeDistance()
157 mAlphaEndSwipeDistance = clamp(0f, fraction, 1f); in setEndAlphaSwipeDistance()
331 return clamp(min, left, max);
353 child.setAlpha(clamp(0f, 1f - distance, 1f));
387 static float clamp(float min, float value, float max) { in clamp() method in SwipeDismissBehavior
391 static int clamp(int min, int value, int max) { in clamp() method in SwipeDismissBehavior
/frameworks/rs/tests/java_api/RSUnitTests/supportlibsrc_gen/com/android/rs/unittest/
Dclamp.rs28 float2 res2 = clamp(src2, min2, max2);
37 float3 res3 = clamp(src3, min3, max3);
47 float4 res4 = clamp(src4, min4, max4);
/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/
Dclamp.rs10 float2 res2 = clamp(src2, min2, max2);
19 float3 res3 = clamp(src3, min3, max3);
29 float4 res4 = clamp(src4, min4, max4);
/frameworks/rs/tests/java_api/RSUnitTests/src/com/android/rs/unittest/
Dclamp.rs26 float2 res2 = clamp(src2, min2, max2);
35 float3 res3 = clamp(src3, min3, max3);
45 float4 res4 = clamp(src4, min4, max4);
/frameworks/base/core/java/android/view/
DRoundScrollbarRenderer.java78 sweepAngle = clamp(sweepAngle, MIN_SCROLLBAR_ANGLE_SWIPE, MAX_SCROLLBAR_ANGLE_SWIPE); in drawRoundScrollbars()
82 startAngle = clamp(startAngle, -SCROLLBAR_ANGLE_RANGE / 2, in drawRoundScrollbars()
97 private static float clamp(float val, float min, float max) { in clamp() method in RoundScrollbarRenderer
/frameworks/rs/tests/java_api/ScriptGroupTest/src/com/android/rs/sgtest/
Dlevels_f.rsh28 pixel = clamp(pixel, 0.f, 255.f);
31 pixel = clamp(pixel, 0.f, 255.f);
51 pixel = clamp(pixel, 0.f, 255.f);
/frameworks/rs/driver/runtime/
Drs_core.c23 return clamp(v, l, h); in rsClamp()
26 return clamp(v, l, h); in rsClamp()
29 return clamp(v, l, h); in rsClamp()
32 return clamp(v, l, h); in rsClamp()
35 return clamp(v, l, h); in rsClamp()
38 return clamp(v, l, h); in rsClamp()
41 return clamp(v, l, h); in rsClamp()

1234567