Searched refs:clamp (Results 1 - 25 of 49) sorted by relevance

12

/packages/apps/Contacts/src/com/android/contacts/util/
H A DMoreMath.java27 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
/packages/apps/Gallery2/jni/filters/
H A Dexposure.c31 rgb[RED] = clamp((255*(rgb[RED]))/m);
32 rgb[GREEN] = clamp((255*(rgb[GREEN]))/m);
33 rgb[BLUE] = clamp((255*(rgb[BLUE]))/m);
H A Dcontrast.c20 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));
H A Dhue.c38 rgb[RED] = clamp((int)rf);
39 rgb[GREEN] = clamp((int)gf);
40 rgb[BLUE] = clamp((int)bf);
H A Dfx.c80 rgb[RED] = clamp(interp(lutrgb,p ,off,dr,dg,db));
81 rgb[GREEN] = clamp(interp(lutrgb,p+1,off,dr,dg,db));
82 rgb[BLUE] = clamp(interp(lutrgb,p+2,off,dr,dg,db));
H A Dfilters.h46 __inline__ unsigned char clamp(int c);
H A Dwbalance.c164 rgb[RED] = clamp(Rc);
165 rgb[GREEN] = clamp(Gc);
166 rgb[BLUE] = clamp(Bc);
/packages/apps/Gallery2/src/com/android/gallery3d/anim/
H A DAlphaAnimation.java45 mCurrentAlpha = Utils.clamp(mStartAlpha
H A DAnimation.java84 float x = Utils.clamp((float) elapse / mDuration, 0f, 1f);
/packages/apps/Gallery2/src/com/android/gallery3d/glrenderer/
H A DFadeTexture.java75 return Utils.clamp(1.0f - r, 0.0f, 1.0f);
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
H A DPaper.java136 mValue = Utils.clamp(mValue + deltaDistance, -1.0f, 1.0f);
146 float finish = Utils.clamp(mValue + velocity * VELOCITY_FACTOR,
155 float t = Utils.clamp((float)(now() - mStartTime) / mDuration, 0.0f, 1.0f);
H A DScrollerHelper.java89 int newPosition = Utils.clamp(finalPosition + distance, min, max);
H A DTiledScreenNail.java204 return Utils.clamp(1.0f - r, 0.0f, 1.0f);
/packages/apps/Gallery2/src/com/android/gallery3d/app/
H A DEyePosition.java134 mX = Utils.clamp((x * USER_ANGEL_COS / glength
137 mY = -Utils.clamp((y * USER_ANGEL_COS / glength
173 mX = Utils.clamp((float) (mX + x * t / Math.hypot(mZ, mX)),
175 mY = Utils.clamp((float) (mY + y * t / Math.hypot(mZ, mY)),
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
H A Dconvolve3x3.rs65 p20 = clamp(p20, 0.f, 1.f);
H A Dgrad.rs107 float t = clamp(x*grad->dx+y*grad->dy+grad->off,0.f,1.0f);
116 uchar4 out = rsPackColorTo8888(clamp(pixel, 0.f, 1.0f));
H A Dvignette.rs76 uchar4 out = rsPackColorTo8888(clamp(wsum, 0.f, 1.0f));
/packages/apps/Camera2/src/com/android/camera/crop/
H A DUtils.java99 public static int clamp(int x, int min, int max) { method in class:Utils
106 public static float clamp(float x, float min, float max) { method in class:Utils
113 public static long clamp(long x, long min, long max) { method in class:Utils
H A DCropMath.java90 * @param imageBound the rectangle to clamp edge points to.
91 * @param array an array of points to clamp to the rectangle, gets set to
98 array[x] = GeometryMathUtils.clamp(array[x], imageBound.left, imageBound.right);
99 array[x + 1] = GeometryMathUtils.clamp(array[x + 1], imageBound.top, imageBound.bottom);
H A DGeometryMathUtils.java49 public static float clamp(float i, float low, float high) { method in class:GeometryMathUtils
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
H A DUtils.java99 public static int clamp(int x, int min, int max) { method in class:Utils
106 public static float clamp(float x, float min, float max) { method in class:Utils
113 public static long clamp(long x, long min, long max) { method in class:Utils
/packages/apps/Launcher3/src/com/android/gallery3d/common/
H A DUtils.java99 public static int clamp(int x, int min, int max) { method in class:Utils
106 public static float clamp(float x, float min, float max) { method in class:Utils
113 public static long clamp(long x, long min, long max) { method in class:Utils
/packages/apps/LegacyCamera/src/com/android/camera/
H A DFocusManager.java278 int left = Util.clamp(x - focusWidth / 2, 0, previewWidth - focusWidth);
279 int top = Util.clamp(y - focusHeight / 2, 0, previewHeight - focusHeight);
451 int left = Util.clamp(x - areaWidth / 2, 0, previewWidth - areaWidth);
452 int top = Util.clamp(y - areaHeight / 2, 0, previewHeight - areaHeight);
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
H A DCropMath.java92 * @param imageBound the rectangle to clamp edge points to.
93 * @param array an array of points to clamp to the rectangle, gets set to
100 array[x] = GeometryMathUtils.clamp(array[x], imageBound.left, imageBound.right);
101 array[x + 1] = GeometryMathUtils.clamp(array[x + 1], imageBound.top, imageBound.bottom);
/packages/apps/Gallery2/src/com/android/gallery3d/data/
H A DTimeClustering.java186 mClusterSplitTime = Utils.clamp(mClusterSplitTime, MIN_CLUSTER_SPLIT_TIME_IN_MS, MAX_CLUSTER_SPLIT_TIME_IN_MS);
188 mMinClusterSize = Utils.clamp(mMinClusterSize, MIN_MIN_CLUSTER_SIZE, MAX_MIN_CLUSTER_SIZE);
189 mMaxClusterSize = Utils.clamp(mMaxClusterSize, MIN_MAX_CLUSTER_SIZE, MAX_MAX_CLUSTER_SIZE);

Completed in 1007 milliseconds

12