/packages/apps/Camera/jni/feature_stab/db_vlvm/ |
D | db_utilities.h | 61 inline int db_roundi (double x) { in db_roundi() argument 66 fld x; in db_roundi() local 71 return static_cast<int>(floor(x+0.5)); in db_roundi() 156 inline double db_sign(double x) in db_sign() argument 158 if(x>=0.0) return(1.0); in db_sign() 225 inline double db_CubRoot(double x) in db_CubRoot() argument 227 if(x>=0.0) return(pow(x,1.0/3.0)); in db_CubRoot() 228 else return(-pow(-x,1.0/3.0)); in db_CubRoot() 233 inline double db_SquareSum3(const double x[3]) in db_SquareSum3() 235 return(db_sqr(x[0])+db_sqr(x[1])+db_sqr(x[2])); in db_SquareSum3() [all …]
|
D | db_utilities_linalg.cpp | 102 void db_CholeskyBacksub(double *x,const double * const *A,const double *d,int n,const double *b) in db_CholeskyBacksub() argument 109 for(s=b[i],k=i-1;k>=0;k--) s-=A[i][k]*x[k]; in db_CholeskyBacksub() 110 x[i]=db_SafeDivision(s,d[i]); in db_CholeskyBacksub() 114 for(s=x[i],k=i+1;k<n;k++) s-=A[k][i]*x[k]; in db_CholeskyBacksub() 115 x[i]=db_SafeDivision(s,d[i]); in db_CholeskyBacksub() 145 void db_CholeskyBacksub3x3(double x[3],const double A[9],const double d[3],const double b[3]) in db_CholeskyBacksub3x3() 148 x[0]=db_SafeDivision(b[0],d[0]); in db_CholeskyBacksub3x3() 149 x[1]=db_SafeDivision((b[1]-A[3]*x[0]),d[1]); in db_CholeskyBacksub3x3() 150 x[2]=db_SafeDivision((b[2]-A[6]*x[0]-A[7]*x[1]),d[2]); in db_CholeskyBacksub3x3() 151 x[2]=db_SafeDivision(x[2],d[2]); in db_CholeskyBacksub3x3() [all …]
|
D | db_metrics.h | 119 …double db_SquaredReprojectionErrorHomography(const double y[2],const double H[9],const double x[3]) in db_SquaredReprojectionErrorHomography() 124 x0=H[0]*x[0]+H[1]*x[1]+H[2]*x[2]; in db_SquaredReprojectionErrorHomography() 125 x1=H[3]*x[0]+H[4]*x[1]+H[5]*x[2]; in db_SquaredReprojectionErrorHomography() 126 x2=H[6]*x[0]+H[7]*x[1]+H[8]*x[2]; in db_SquaredReprojectionErrorHomography() 133 …double db_SquaredInhomogenousHomographyError(const double y[2],const double H[9],const double x[2]) in db_SquaredInhomogenousHomographyError() 138 x0=H[0]*x[0]+H[1]*x[1]+H[2]; in db_SquaredInhomogenousHomographyError() 139 x1=H[3]*x[0]+H[4]*x[1]+H[5]; in db_SquaredInhomogenousHomographyError() 140 x2=H[6]*x[0]+H[7]*x[1]+H[8]; in db_SquaredInhomogenousHomographyError() 153 …uble db_ExpCauchyInhomogenousHomographyError(const double y[2],const double H[9],const double x[2], in db_ExpCauchyInhomogenousHomographyError() 157 sd=db_SquaredInhomogenousHomographyError(y,H,x); in db_ExpCauchyInhomogenousHomographyError() [all …]
|
/packages/apps/LegacyCamera/jni/feature_stab/db_vlvm/ |
D | db_utilities.h | 61 inline int db_roundi (double x) { in db_roundi() argument 66 fld x; in db_roundi() local 71 return static_cast<int>(floor(x+0.5)); in db_roundi() 156 inline double db_sign(double x) in db_sign() argument 158 if(x>=0.0) return(1.0); in db_sign() 225 inline double db_CubRoot(double x) in db_CubRoot() argument 227 if(x>=0.0) return(pow(x,1.0/3.0)); in db_CubRoot() 228 else return(-pow(-x,1.0/3.0)); in db_CubRoot() 233 inline double db_SquareSum3(const double x[3]) in db_SquareSum3() 235 return(db_sqr(x[0])+db_sqr(x[1])+db_sqr(x[2])); in db_SquareSum3() [all …]
|
D | db_utilities_linalg.cpp | 102 void db_CholeskyBacksub(double *x,const double * const *A,const double *d,int n,const double *b) in db_CholeskyBacksub() argument 109 for(s=b[i],k=i-1;k>=0;k--) s-=A[i][k]*x[k]; in db_CholeskyBacksub() 110 x[i]=db_SafeDivision(s,d[i]); in db_CholeskyBacksub() 114 for(s=x[i],k=i+1;k<n;k++) s-=A[k][i]*x[k]; in db_CholeskyBacksub() 115 x[i]=db_SafeDivision(s,d[i]); in db_CholeskyBacksub() 145 void db_CholeskyBacksub3x3(double x[3],const double A[9],const double d[3],const double b[3]) in db_CholeskyBacksub3x3() 148 x[0]=db_SafeDivision(b[0],d[0]); in db_CholeskyBacksub3x3() 149 x[1]=db_SafeDivision((b[1]-A[3]*x[0]),d[1]); in db_CholeskyBacksub3x3() 150 x[2]=db_SafeDivision((b[2]-A[6]*x[0]-A[7]*x[1]),d[2]); in db_CholeskyBacksub3x3() 151 x[2]=db_SafeDivision(x[2],d[2]); in db_CholeskyBacksub3x3() [all …]
|
D | db_metrics.h | 119 …double db_SquaredReprojectionErrorHomography(const double y[2],const double H[9],const double x[3]) in db_SquaredReprojectionErrorHomography() 124 x0=H[0]*x[0]+H[1]*x[1]+H[2]*x[2]; in db_SquaredReprojectionErrorHomography() 125 x1=H[3]*x[0]+H[4]*x[1]+H[5]*x[2]; in db_SquaredReprojectionErrorHomography() 126 x2=H[6]*x[0]+H[7]*x[1]+H[8]*x[2]; in db_SquaredReprojectionErrorHomography() 133 …double db_SquaredInhomogenousHomographyError(const double y[2],const double H[9],const double x[2]) in db_SquaredInhomogenousHomographyError() 138 x0=H[0]*x[0]+H[1]*x[1]+H[2]; in db_SquaredInhomogenousHomographyError() 139 x1=H[3]*x[0]+H[4]*x[1]+H[5]; in db_SquaredInhomogenousHomographyError() 140 x2=H[6]*x[0]+H[7]*x[1]+H[8]; in db_SquaredInhomogenousHomographyError() 153 …uble db_ExpCauchyInhomogenousHomographyError(const double y[2],const double H[9],const double x[2], in db_ExpCauchyInhomogenousHomographyError() 157 sd=db_SquaredInhomogenousHomographyError(y,H,x); in db_ExpCauchyInhomogenousHomographyError() [all …]
|
/packages/apps/Gallery2/jni/filters/ |
D | kmeans.h | 27 int x, y; in sum() local 29 for (x = 0; x < dimension; x++) { in sum() 30 dst[x] = 0; in sum() 32 for (x = 0; x < len; x+= stride) { in sum() 34 dst[y] += values[x + y]; in sum() 41 int x; in set() local 42 for (x = 0; x < dimension; x++) { in set() 43 val1[x] = val2[x]; in set() 49 int x; in add() local 50 for (x = 0; x < dimension; x++) { in add() [all …]
|
D | redEyeMath.c | 36 int y, x; in findPossible() local 40 for (x = 0; x < recW; x++) { in findPossible() 41 int p = (recX + x + sy) * 4; in findPossible() 46 mask[x + y * recW] = ( in findPossible() 47 mask[x + y * recW] > 0 && (value(r, g, b) > 240) ? 1 : 0); in findPossible() 57 int y, x; in findReds() local 61 for (x = 0; x < recW; x++) { in findReds() 62 int p = (recX + x + sy) * 4; in findReds() 64 mask[x + y * recW] = ((isRed(src, p)) ? 1 : 0); in findReds() 74 int y, x; in dialateMaskIfRed() local [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/ |
D | PointerTracker.java | 324 private void callListenerOnCodeInput(final Key key, final int primaryCode, final int x, in callListenerOnCodeInput() argument 332 Log.d(TAG, String.format("[%d] onCodeInput: %4d %4d %s%s%s", mPointerId, x, y, in callListenerOnCodeInput() 346 sListener.onCodeInput(code, x, y, isKeyRepeat); in callListenerOnCodeInput() 428 public Key getKeyOn(final int x, final int y) { in getKeyOn() argument 429 return mKeyDetector.detectHitKey(x, y); in getKeyOn() 533 private Key onDownKey(final int x, final int y, final long eventTime) { in onDownKey() argument 535 CoordinateUtils.set(mDownCoordinates, x, y); in onDownKey() 537 return onMoveToNewKey(onMoveKeyInternal(x, y), x, y); in onDownKey() 544 private Key onMoveKeyInternal(final int x, final int y) { in onMoveKeyInternal() argument 545 mBogusMoveEventDetector.onMoveKey(getDistance(x, y, mLastX, mLastY)); in onMoveKeyInternal() [all …]
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BatteryHistoryChart.java | 88 void addTick(int x, int bin) { in addTick() argument 90 mTicks[mNumTicks] = (x&CHART_DATA_X_MASK) | (bin<<CHART_DATA_BIN_SHIFT); in addTick() 107 int x = tick&CHART_DATA_X_MASK; in draw() local 110 canvas.drawRect(lastX, top, x, bottom, mPaints[lastBin]); in draw() 113 lastX = x; in draw() 318 final int x; field in BatteryHistoryChart.TimeLabel 322 TimeLabel(TextPaint paint, int x, Calendar cal, boolean use24hr) { in TimeLabel() argument 323 this.x = x; in TimeLabel() 332 final int x; field in BatteryHistoryChart.DateLabel 336 DateLabel(TextPaint paint, int x, Calendar cal, boolean dayFirst) { in DateLabel() argument [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/ |
D | Spline.java | 112 public void movePoint(int pick, float x, float y) { in movePoint() argument 117 point.x = x; in movePoint() 126 if (mPoints.elementAt(0).x != 0 || mPoints.elementAt(0).y != 1) { in isOriginal() 129 if (mPoints.elementAt(1).x != 1 || mPoints.elementAt(1).y != 0) { in isOriginal() 153 points[i] = new ControlPoint(p.x, p.y); in getAppliedCurve() 158 if (points[0].x != 0) { in getAppliedCurve() 159 start = (int) (points[0].x * 256); in getAppliedCurve() 161 if (points[points.length - 1].x != 1) { in getAppliedCurve() 162 end = (int) (points[points.length - 1].x * 256); in getAppliedCurve() 173 double x = i / 256.0; in getAppliedCurve() local [all …]
|
D | EclipseControl.java | 67 public void setRadius(float x, float y) { in setRadius() argument 68 mRadiusX = x; in setRadius() 72 public void setCenter(float x, float y) { in setCenter() argument 73 mCenterX = x; in setCenter() 77 public int getCloseHandle(float x, float y) { in getCloseHandle() argument 81 float dx = handlex[i] - x; in getCloseHandle() 94 float dx = handlex[i] - x; in getCloseHandle() 111 public void actionDown(float x, float y, Oval oval) { in actionDown() argument 113 x, y}; in actionDown() 124 public void actionMove(int handle, float x, float y, Oval oval) { in actionMove() argument [all …]
|
D | ImageShow.java | 232 m.postTranslate(translate.x, translate.y); in getImageToScreenMatrix() 407 float x = point.x - maskW * maskScale; in drawImageAndAnimate() local 413 mShaderMatrix.preTranslate(-x + mImageBounds.left, -y + mImageBounds.top); in drawImageAndAnimate() 425 canvas.translate(x, y); in drawImageAndAnimate() 524 if (Math.abs(mTouch.y - mTouchDown.y) > Math.abs(mTouch.x - mTouchDown.x)) { in drawCompareImage() 537 px = mTouch.x - mImageBounds.left; in drawCompareImage() 547 if (mTouchDown.x - mTouch.x > 0) { in drawCompareImage() 568 canvas.drawLine(mTouch.x, mImageBounds.top, in drawCompareImage() 569 mTouch.x, mImageBounds.bottom, paint); in drawCompareImage() 633 mTouchDown.x = ex; in onTouchEvent() [all …]
|
/packages/inputmethods/OpenWnn/src/jp/co/omronsoft/openwnn/ |
D | Keyboard.java | 245 public int x; field in Keyboard.Key 323 public Key(Resources res, Row parent, int x, int y, XmlResourceParser parser) { in Key() argument 326 this.x = x; in Key() 344 this.x += gap; in Key() 442 public boolean isInside(int x, int y) { in isInside() argument 447 if ((x >= this.x || (leftEdge && x <= this.x + this.width)) in isInside() 448 && (x < this.x + this.width || (rightEdge && x >= this.x)) in isInside() 465 public boolean isInside(int x, int y, int w, int h) { in isInside() argument 466 if ((this.x <= (x + w)) && (x <= (this.x + this.width)) in isInside() 480 public int squaredDistanceFrom(int x, int y) { in squaredDistanceFrom() argument [all …]
|
/packages/apps/Launcher2/src/com/android/launcher2/ |
D | CellLayout.java | 330 public void setGridSize(int x, int y) { in setGridSize() argument 331 mCountX = x; in setGridSize() 566 public void setFolderLeaveBehindCell(int x, int y) { in setFolderLeaveBehindCell() argument 567 mFolderLeaveBehindCell[0] = x; in setFolderLeaveBehindCell() 714 final int x = touchX + getScrollX(); in setTagToCellInfoForPoint() local 737 if (frame.contains(x, y)) { in setTagToCellInfoForPoint() 753 pointToCellExact(x, y, cellXY); in setTagToCellInfoForPoint() 806 void pointToCellExact(int x, int y, int[] result) { in pointToCellExact() argument 810 result[0] = (x - hStartPadding) / (mCellWidth + mWidthGap); in pointToCellExact() 828 void pointToCellRounded(int x, int y, int[] result) { in pointToCellRounded() argument [all …]
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | CellLayout.java | 316 public void setGridSize(int x, int y) { in setGridSize() argument 317 mCountX = x; in setGridSize() 536 public void setFolderLeaveBehindCell(int x, int y) { in setFolderLeaveBehindCell() argument 537 mFolderLeaveBehindCell[0] = x; in setFolderLeaveBehindCell() 696 void pointToCellExact(int x, int y, int[] result) { in pointToCellExact() argument 700 result[0] = (x - hStartPadding) / (mCellWidth + mWidthGap); in pointToCellExact() 718 void pointToCellRounded(int x, int y, int[] result) { in pointToCellRounded() argument 719 pointToCellExact(x + (mCellWidth / 2), y + (mCellHeight / 2), result); in pointToCellRounded() 783 public float getDistanceFromCell(float x, float y, int[] cell) { in getDistanceFromCell() argument 785 float distance = (float) Math.sqrt( Math.pow(x - mTmpPoint[0], 2) + in getDistanceFromCell() [all …]
|
D | LauncherScroller.java | 90 float x, tx, coef; 92 x = x_min + (x_max - x_min) / 2.0f; 93 coef = 3.0f * x * (1.0f - x); 94 tx = coef * ((1.0f - x) * P1 + x * P2) + x * x * x; 96 if (tx > alpha) x_max = x; 97 else x_min = x; 99 SPLINE_POSITION[i] = coef * ((1.0f - x) * START_TENSION + x) + x * x * x; 288 float x = timePassed * mDurationReciprocal; in computeScrollOffset() local 291 x = viscousFluid(x); in computeScrollOffset() 293 x = mInterpolator.getInterpolation(x); in computeScrollOffset() [all …]
|
/packages/apps/Browser/src/com/android/browser/view/ |
D | PieMenu.java | 187 return mCenter.x < mSlop; in onTheLeft() 232 private void setCenter(int x, int y) { in setCenter() argument 233 if (x < mSlop) { in setCenter() 234 mCenter.x = 0; in setCenter() 236 mCenter.x = getWidth(); in setCenter() 261 int x = (int) (r * Math.sin(angle)); in layoutPie() local 264 x = mCenter.x + x - w / 2; in layoutPie() 266 x = mCenter.x - x - w / 2; in layoutPie() 268 view.layout(x, y, x + w, y + h); in layoutPie() 299 int left = mCenter.x - w; in onDraw() [all …]
|
/packages/apps/Camera/src/com/android/camera/ui/ |
D | PieRenderer.java | 127 mListener.onPieOpened(mCenter.x, mCenter.y); 272 public void setCenter(int x, int y) { in setCenter() argument 273 mCenter.x = x; in setCenter() 276 alignFocus(x, y); in setCenter() 313 int x = (int) (r * Math.cos(angle)); in layoutItems() local 315 x = mCenter.x + x - w / 2; in layoutItems() 316 item.setBounds(x, y, x + w, y + h); in layoutItems() 329 new RectF(center.x - outer, center.y - outer, center.x + outer, in makeSlice() 332 new RectF(center.x - inner, center.y - inner, center.x + inner, in makeSlice() 378 canvas.scale(sf, sf, mCenter.x, mCenter.y); in onDraw() [all …]
|
/packages/experimental/DreamTheater/src/com/android/dreamtheater/ |
D | BouncyDroid.java | 51 float x; field in BouncyDroid.BouncyView.World.Vec 54 x = y = 0; in Vec() 57 x = _x; in Vec() 61 return new Vec(x + v.x, y + v.y); in add() 64 return new Vec(x * a, y * a); in mul() 67 return new Vec(x - v.x, y - v.y); in sub() 70 return (float) Math.hypot(x, y); in mag() 74 return new Vec(x*k, y*k); in norm() 77 return "(" + x + "," + y + ")"; in toString() 272 if (mBody.p.x - mBody.r < 0) { in reset() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | Scroller.java | 80 float x, tx, coef; 82 x = x_min + (x_max - x_min) / 2.0f; 83 coef = 3.0f * x * (1.0f - x); 84 tx = coef * ((1.0f - x) * START_TENSION + x * END_TENSION) + x * x * x; 86 if (tx > t) x_max = x; 87 else x_min = x; 89 final float d = coef + x * x * x; 259 float x = timePassed * mDurationReciprocal; in computeScrollOffset() local 262 x = viscousFluid(x); in computeScrollOffset() 264 x = mInterpolator.getInterpolation(x); in computeScrollOffset() [all …]
|
/packages/apps/Dialer/src/com/android/dialer/widget/ |
D | ViewDragHelper.java | 896 private void saveInitialMotion(float x, float y, int pointerId) { 898 mInitialMotionX[pointerId] = mLastMotionX[pointerId] = x; 900 mInitialEdgesTouched[pointerId] = getEdgesTouched((int) x, (int) y); 908 final float x = MotionEventCompat.getX(ev, i); 910 mLastMotionX[pointerId] = x; 976 protected boolean canScroll(View v, boolean checkV, int dx, int dy, int x, int y) { 987 if (x + scrollX >= child.getLeft() && x + scrollX < child.getRight() && 989 canScroll(child, true, dx, dy, x + scrollX - child.getLeft(), 1024 final float x = ev.getX(); 1027 saveInitialMotion(x, y, pointerId); [all …]
|
/packages/apps/Camera/jni/feature_mos/src/mosaic/ |
D | Blend.cpp | 200 … FindQuadCentroid(x0, y0, x1, y1, x2, y2, x3, y3, csite->getVCenter().x, csite->getVCenter().y); in runBlend() 460 for(int x = tw; x < imgMos.Y.width - tw; ) in DoMergeAndBlend() local 463 if (imgMos.Y.ptr[y][x] != imgMos.Y.ptr[y][x+1] && in DoMergeAndBlend() 464 imgMos.Y.ptr[y][x] != 255 && in DoMergeAndBlend() 465 imgMos.Y.ptr[y][x+1] != 255) in DoMergeAndBlend() 468 unsigned char idx1 = imgMos.Y.ptr[y][x]; in DoMergeAndBlend() 469 unsigned char idx2 = imgMos.Y.ptr[y][x+1]; in DoMergeAndBlend() 474 imgMos.V.ptr[y][x - o] = idx2; in DoMergeAndBlend() 476 imgMos.U.ptr[y][x - o] = 50 + (99 - 50) * o / tw; in DoMergeAndBlend() 482 imgMos.V.ptr[y][x + o] = idx1; in DoMergeAndBlend() [all …]
|
/packages/apps/LegacyCamera/jni/feature_mos/src/mosaic/ |
D | Blend.cpp | 200 … FindQuadCentroid(x0, y0, x1, y1, x2, y2, x3, y3, csite->getVCenter().x, csite->getVCenter().y); in runBlend() 460 for(int x = tw; x < imgMos.Y.width - tw; ) in DoMergeAndBlend() local 463 if (imgMos.Y.ptr[y][x] != imgMos.Y.ptr[y][x+1] && in DoMergeAndBlend() 464 imgMos.Y.ptr[y][x] != 255 && in DoMergeAndBlend() 465 imgMos.Y.ptr[y][x+1] != 255) in DoMergeAndBlend() 468 unsigned char idx1 = imgMos.Y.ptr[y][x]; in DoMergeAndBlend() 469 unsigned char idx2 = imgMos.Y.ptr[y][x+1]; in DoMergeAndBlend() 474 imgMos.V.ptr[y][x - o] = idx2; in DoMergeAndBlend() 476 imgMos.U.ptr[y][x - o] = 50 + (99 - 50) * o / tw; in DoMergeAndBlend() 482 imgMos.V.ptr[y][x + o] = idx1; in DoMergeAndBlend() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/keyboard/internal/ |
D | GestureStrokeRecognitionPoints.java | 112 public void addDownEventPoint(final int x, final int y, final int elapsedTimeSinceFirstDown, in addDownEventPoint() argument 124 addEventPoint(x, y, elapsedTimeSinceFirstDown, true /* isMajorEvent */); in addDownEventPoint() 183 final int x = mXCoordinates.get(lastIndex); in duplicateLastPointWith() local 187 x, y, time)); in duplicateLastPointWith() 190 appendPoint(x, y, time); in duplicateLastPointWith() 191 updateIncrementalRecognitionSize(x, y, time); in duplicateLastPointWith() 206 private void appendPoint(final int x, final int y, final int time) { in appendPoint() argument 213 x, y, time, mXCoordinates.get(lastIndex), mYCoordinates.get(lastIndex), in appendPoint() 218 mXCoordinates.add(x); in appendPoint() 222 private void updateMajorEvent(final int x, final int y, final int time) { in updateMajorEvent() argument [all …]
|