Home
last modified time | relevance | path

Searched refs:clamp (Results 1 – 25 of 61) 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/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/services/Car/cpp/evs/support_library/
DFormatConvert.cpp36 static inline float clamp(float v, float min, float max) { in clamp() function
53 unsigned char R = (unsigned char)clamp(Rf, 0.0f, 255.0f); in yuvToRgbx()
54 unsigned char G = (unsigned char)clamp(Gf, 0.0f, 255.0f); in yuvToRgbx()
55 unsigned char B = (unsigned char)clamp(Bf, 0.0f, 255.0f); in yuvToRgbx()
/packages/services/Car/cpp/evs/apps/default/
DFormatConvert.cpp33 static inline float clamp(float v, float min, float max) { in clamp() function
50 unsigned char R = (unsigned char)clamp(Rf, 0.0f, 255.0f); in yuvToRgbx()
51 unsigned char G = (unsigned char)clamp(Gf, 0.0f, 255.0f); in yuvToRgbx()
52 unsigned char B = (unsigned char)clamp(Bf, 0.0f, 255.0f); in yuvToRgbx()
/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/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/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/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/recyclerview/
DCarUiSnapHelper.java302 outDist[0] = clamp(outDist[0], minDistance, maxDistance); in calculateScrollDistance()
303 outDist[1] = clamp(outDist[1], minDistance, maxDistance); in calculateScrollDistance()
462 private static int clamp(int value, int min, int max) { in clamp() method in CarUiSnapHelper
/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/Launcher3/quickstep/src/com/android/quickstep/interaction/
DEdgeBackGesturePanel.java556 float progress = MathUtils.clamp(diff / (mScreenSize - mBaseTranslation), 0, 1); in handleMoveEvent()
562 float progress = MathUtils.clamp(diff / mBaseTranslation, 0, 1); in handleMoveEvent()
605 MathUtils.clamp(Math.abs(yOffset) / (maxYOffset * RUBBER_BAND_AMOUNT), 0, 1); in handleMoveEvent()
616 setY(MathUtils.clamp((int) positionY, 0, mDisplaySize.y)); in updatePosition()
/packages/apps/Launcher3/src/com/android/launcher3/
DAppWidgetResizeFrame.java330 mDeltaX = mDeltaXRange.clamp(deltaX); in visualizeResizeForDelta()
331 mDeltaY = mDeltaYRange.clamp(deltaY); in visualizeResizeForDelta()
334 mDeltaX = mDeltaXRange.clamp(deltaX); in visualizeResizeForDelta()
339 mDeltaY = mDeltaYRange.clamp(deltaY); in visualizeResizeForDelta()
639 public int clamp(int value) { in clamp() method in AppWidgetResizeFrame.IntRange
/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/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/services/Car/cpp/evs/manager/1.1/emul/
DEvsEmulatedCamera.cpp42 const unsigned char R = static_cast<unsigned char>(std::clamp(Rf, 0.0f, 255.0f)); in yuvToRgbx()
43 const unsigned char G = static_cast<unsigned char>(std::clamp(Gf, 0.0f, 255.0f)); in yuvToRgbx()
44 const unsigned char B = static_cast<unsigned char>(std::clamp(Bf, 0.0f, 255.0f)); in yuvToRgbx()
/packages/modules/ExtServices/java/src/android/ext/services/notification/
DNotificationEntry.java191 n.priority = clamp(n.priority, Notification.PRIORITY_MIN, in calculateInitialImportance()
337 private int clamp(int x, int low, int high) { in clamp() method in NotificationEntry

123