Home
last modified time | relevance | path

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

123

/packages/apps/Camera2/src/com/android/camera/one/v2/autofocus/
DPointMeteringParameters.java115 meteringRegion.left = clamp(meteringRegion.left, cropRegion.left, in regionForNormalizedCoord()
117 meteringRegion.top = clamp(meteringRegion.top, cropRegion.top, cropRegion.bottom); in regionForNormalizedCoord()
118 meteringRegion.right = clamp(meteringRegion.right, cropRegion.left, in regionForNormalizedCoord()
120 meteringRegion.bottom = clamp(meteringRegion.bottom, cropRegion.top, in regionForNormalizedCoord()
148 private int clamp(int value, int min, int max) { in clamp() method in PointMeteringParameters
/packages/apps/Gallery2/jni/filters/
Dcontrast.c20 unsigned char clamp(int c) in clamp() function
50 rgb[RED] = clamp((int)(m*rgb[RED]+c)); in JNIFUNCF()
51 rgb[GREEN] = clamp((int)(m*rgb[GREEN]+c)); in JNIFUNCF()
52 rgb[BLUE] = clamp((int)(m*rgb[BLUE]+c)); in JNIFUNCF()
Dexposure.c31 rgb[RED] = clamp((255*(rgb[RED]))/m); in JNIFUNCF()
32 rgb[GREEN] = clamp((255*(rgb[GREEN]))/m); in JNIFUNCF()
33 rgb[BLUE] = clamp((255*(rgb[BLUE]))/m); in JNIFUNCF()
Dhue.c38 rgb[RED] = clamp((int)rf); in JNIFUNCF()
39 rgb[GREEN] = clamp((int)gf); in JNIFUNCF()
40 rgb[BLUE] = clamp((int)bf); in JNIFUNCF()
Dfx.c80 rgb[RED] = clamp(interp(lutrgb,p ,off,dr,dg,db)); in JNIFUNCF()
81 rgb[GREEN] = clamp(interp(lutrgb,p+1,off,dr,dg,db)); in JNIFUNCF()
82 rgb[BLUE] = clamp(interp(lutrgb,p+2,off,dr,dg,db)); in JNIFUNCF()
Dwbalance.c166 rgb[RED] = clamp(Rc); in JNIFUNCF()
167 rgb[GREEN] = clamp(Gc); in JNIFUNCF()
168 rgb[BLUE] = clamp(Bc); in JNIFUNCF()
/packages/services/Car/evs/app/
DFormatConvert.cpp32 static inline float clamp(float v, float min, float max) { in clamp() function
49 unsigned char R = (unsigned char)clamp(Rf, 0.0f, 255.0f); in yuvToRgbx()
50 unsigned char G = (unsigned char)clamp(Gf, 0.0f, 255.0f); in yuvToRgbx()
51 unsigned char B = (unsigned char)clamp(Bf, 0.0f, 255.0f); in yuvToRgbx()
/packages/apps/Contacts/src/com/android/contacts/util/
DMoreMath.java27 public static int clamp(int input, int lowerBound, int upperBound) { in clamp() method in MoreMath
37 public static float clamp(float input, float lowerBound, float upperBound) { in clamp() method in MoreMath
47 public static double clamp(double input, double lowerBound, double upperBound) { in clamp() method in MoreMath
/packages/apps/Camera2/src/com/android/camera/one/v2/
DAutoFocusHelper.java150 … meteringRegion.left = CameraUtil.clamp(meteringRegion.left, cropRegion.left, cropRegion.right); in regionsForNormalizedCoord()
151 … meteringRegion.top = CameraUtil.clamp(meteringRegion.top, cropRegion.top, cropRegion.bottom); in regionsForNormalizedCoord()
152 … meteringRegion.right = CameraUtil.clamp(meteringRegion.right, cropRegion.left, cropRegion.right); in regionsForNormalizedCoord()
153 …meteringRegion.bottom = CameraUtil.clamp(meteringRegion.bottom, cropRegion.top, cropRegion.bottom); in regionsForNormalizedCoord()
/packages/services/Car/evs/sampleDriver/
DbufferCopy.cpp40 static inline float clamp(float v, float min, float max) { in clamp() function
57 unsigned char R = (unsigned char)clamp(Rf, 0.0f, 255.0f); in yuvToRgbx()
58 unsigned char G = (unsigned char)clamp(Gf, 0.0f, 255.0f); in yuvToRgbx()
59 unsigned char B = (unsigned char)clamp(Bf, 0.0f, 255.0f); in yuvToRgbx()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DEyePosition.java133 mX = Utils.clamp((x * USER_ANGEL_COS / glength in onAccelerometerChanged()
136 mY = -Utils.clamp((y * USER_ANGEL_COS / glength in onAccelerometerChanged()
172 mX = Utils.clamp((float) (mX + x * t / Math.hypot(mZ, mX)), in onGyroscopeChanged()
174 mY = Utils.clamp((float) (mY + y * t / Math.hypot(mZ, mY)), in onGyroscopeChanged()
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DPaper.java136 mValue = Utils.clamp(mValue + deltaDistance, -1.0f, 1.0f); in onPull()
146 float finish = Utils.clamp(mValue + velocity * VELOCITY_FACTOR, in onAbsorb()
155 float t = Utils.clamp((float)(now() - mStartTime) / mDuration, 0.0f, 1.0f); in update()
DPositionController.java488 int targetX = Utils.clamp(x, mBoundLeft, mBoundRight); in zoomIn()
489 int targetY = Utils.clamp(y, mBoundTop, mBoundBottom); in zoomIn()
490 targetScale = Utils.clamp(targetScale, b.mScaleMin, b.mScaleMax); in zoomIn()
598 y = Utils.clamp(y, mBoundTop, mBoundBottom); in scrollPage()
1455 float scale = Utils.clamp(b.mCurrentScale, scaleMin, scaleMax); in startSnapback()
1475 x = Utils.clamp(x, mBoundLeft, mBoundRight); in startSnapback()
1635 scale = Utils.clamp(mCurrentScale, scaleMin, scaleMax); in startSnapback()
1647 y = Utils.clamp(y, mBoundTop, mBoundBottom); in startSnapback()
1682 return Utils.clamp(s, in clampScale()
/packages/apps/LegacyCamera/src/com/android/camera/
DFocusManager.java278 int left = Util.clamp(x - focusWidth / 2, 0, previewWidth - focusWidth); in onTouch()
279 int top = Util.clamp(y - focusHeight / 2, 0, previewHeight - focusHeight); in onTouch()
451 int left = Util.clamp(x - areaWidth / 2, 0, previewWidth - areaWidth); in calculateTapArea()
452 int top = Util.clamp(y - areaHeight / 2, 0, previewHeight - areaHeight); in calculateTapArea()
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/widget/
DPagedSnapHelper.java229 outDist[0] = clamp(outDist[0], minDistance, maxDistance); in calculateScrollDistance()
230 outDist[1] = clamp(outDist[1], minDistance, maxDistance); in calculateScrollDistance()
312 private static int clamp(int value, int min, int max) { in clamp() method in PagedSnapHelper
/packages/apps/Launcher3/src/com/android/launcher3/
DAppWidgetResizeFrame.java233 mDeltaX = mDeltaXRange.clamp(deltaX); in visualizeResizeForDelta()
234 mDeltaY = mDeltaYRange.clamp(deltaY); in visualizeResizeForDelta()
237 mDeltaX = mDeltaXRange.clamp(deltaX); in visualizeResizeForDelta()
242 mDeltaY = mDeltaYRange.clamp(deltaY); in visualizeResizeForDelta()
558 public int clamp(int value) { in clamp() method in AppWidgetResizeFrame.IntRange
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/
DUtils.java99 public static int clamp(int x, int min, int max) { in clamp() method in Utils
106 public static float clamp(float x, float min, float max) { in clamp() method in Utils
113 public static long clamp(long x, long min, long max) { in clamp() method in Utils
/packages/apps/Dialer/java/com/android/dialer/callcomposer/camera/camerafocus/
DFocusOverlayManager.java420 int left = maxW > 0 ? clamp(x - areaWidth / 2, 0, maxW) : 0; in calculateTapArea()
422 int top = maxH > 0 ? clamp(y - areaHeight / 2, 0, maxH) : 0; in calculateTapArea()
429 private int clamp(int x, int min, int max) { in clamp() method in FocusOverlayManager
/packages/apps/Messaging/src/com/android/messaging/ui/mediapicker/camerafocus/
DFocusOverlayManager.java495 int left = clamp(x - areaWidth / 2, 0, previewWidth - areaWidth); in calculateTapArea()
496 int top = clamp(y - areaHeight / 2, 0, previewHeight - areaHeight); in calculateTapArea()
572 public static int clamp(int x, int min, int max) { in clamp() method in FocusOverlayManager
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/recyclerview/
DCarUiSnapHelper.java436 outDist[0] = clamp(outDist[0], minDistance, maxDistance); in calculateScrollDistance()
437 outDist[1] = clamp(outDist[1], minDistance, maxDistance); in calculateScrollDistance()
521 private static int clamp(int value, int min, int max) { in clamp() method in CarUiSnapHelper
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DTimeClustering.java186 …mClusterSplitTime = Utils.clamp(mClusterSplitTime, MIN_CLUSTER_SPLIT_TIME_IN_MS, MAX_CLUSTER_SPLIT… in setTimeRange()
188 mMinClusterSize = Utils.clamp(mMinClusterSize, MIN_MIN_CLUSTER_SIZE, MAX_MIN_CLUSTER_SIZE); in setTimeRange()
189 mMaxClusterSize = Utils.clamp(mMaxClusterSize, MIN_MAX_CLUSTER_SIZE, MAX_MAX_CLUSTER_SIZE); in setTimeRange()
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/crop/
DCropMath.java100 array[x] = GeometryMathUtils.clamp(array[x], imageBound.left, imageBound.right); in getEdgePoints()
101 array[x + 1] = GeometryMathUtils.clamp(array[x + 1], imageBound.top, imageBound.bottom); in getEdgePoints()
/packages/modules/ExtServices/src/android/ext/services/notification/
DNotificationEntry.java199 n.priority = clamp(n.priority, Notification.PRIORITY_MIN, in calculateInitialImportance()
346 private int clamp(int x, int low, int high) { in clamp() method in NotificationEntry
/packages/apps/Camera2/src/com/android/camera/util/
DCameraUtil.java363 public static int clamp(int x, int min, int max) { in clamp() method in CameraUtil
377 public static float clamp(float x, float min, float max) { in clamp() method in CameraUtil
945 dx = clamp(dx, 0, w - 1); in blur()
961 dy = clamp(dy, 0, h - 1); in blur()
/packages/apps/Dialer/java/com/android/dialer/common/
DMathUtil.java54 public static float clamp(float value, float min, float max) { in clamp() method in MathUtil

123