/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ColorUtils.java | 34 public static void verifyColor(int expected, int observed, int tolerance) { in verifyColor() argument 35 verifyColor("", expected, observed, tolerance); in verifyColor() 46 public static void verifyColor(@NonNull String s, int expected, int observed, int tolerance) { in verifyColor() argument 49 + ", tolerated channel error 0x" + tolerance; in verifyColor() 50 String red = verifyChannel("red", expected, observed, tolerance, (i) -> Color.red(i)); in verifyColor() 51 String green = verifyChannel("green", expected, observed, tolerance, (i) -> Color.green(i)); in verifyColor() 52 String blue = verifyChannel("blue", expected, observed, tolerance, (i) -> Color.blue(i)); in verifyColor() 53 String alpha = verifyChannel("alpha", expected, observed, tolerance, (i) -> Color.alpha(i)); in verifyColor() 72 int tolerance, IntUnaryOperator f) { in verifyChannel() argument 75 if (Math.abs(e - o) <= tolerance) { in verifyChannel() [all …]
|
D | MediaPerfUtils.java | 168 double tolerance = FRAMERATE_TOLERANCE; in verifyAchievableFrameRates() local 170 tolerance *= EXTRA_TOLERANCE_BFRAMES; in verifyAchievableFrameRates() 172 double lowerBoundary1 = reported.getLower() / tolerance; in verifyAchievableFrameRates() 173 double upperBoundary1 = reported.getUpper() * tolerance; in verifyAchievableFrameRates() 174 double lowerBoundary2 = reported.getUpper() / Math.pow(tolerance, 2); in verifyAchievableFrameRates() 175 double upperBoundary2 = reported.getLower() * Math.pow(tolerance, 2); in verifyAchievableFrameRates()
|
/cts/tests/tests/renderscript/src/android/renderscript/cts/ |
D | float16_gen.c | 122 void getErrorBar(unsigned short value, int tolerance, unsigned short bounds[2]) { in getErrorBar() argument 124 if (tolerance != 1 && tolerance != 3) { in getErrorBar() 126 tolerance); in getErrorBar() 160 half lb = hValue - tolerance * ulp; in getErrorBar() 161 half ub = hValue + tolerance * ulp; in getErrorBar() 226 int tolerance) { in printReferenceOutput() argument 237 getErrorBar(result, tolerance, resultBounds); in printReferenceOutput()
|
/cts/tests/input/src/android/input/cts/ |
D | VelocityTrackerTest.kt | 348 private fun assertVelocity(tolerance: Float, message: String) { in assertVelocity() 352 assertVelocity({ mPlanarVelocityTracker.xVelocity }, tolerance, mVx, message) in assertVelocity() 353 assertVelocity(mPlanarVelocityTracker, MotionEvent.AXIS_X, tolerance, mVx, message) in assertVelocity() 355 assertVelocity({ mPlanarVelocityTracker.yVelocity }, tolerance, mVy, message) in assertVelocity() 356 assertVelocity(mPlanarVelocityTracker, MotionEvent.AXIS_Y, tolerance, mVy, message) in assertVelocity() 361 tolerance, in assertVelocity() 380 tolerance: Float, in assertVelocity() 386 tolerance, in assertVelocity() 394 tolerance: Float, in assertVelocity() 400 if (error > tolerance) { in assertVelocity() [all …]
|
D | MotionPredictorTest.kt | 240 val tolerance = Math.PI.toFloat() / 16 in testTiltOrientation() constant 241 assertEquals(tilt, predicted!!.getAxisValue(MotionEvent.AXIS_TILT, 0), tolerance) in testTiltOrientation() 242 assertEquals(orientation, predicted.getOrientation(0), tolerance) in testTiltOrientation()
|
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapverifiers/ |
D | SamplePointVerifier.java | 40 public SamplePointVerifier(Point[] testPoints, int[] expectedColors, int tolerance) { in SamplePointVerifier() argument 43 mTolerance = tolerance; in SamplePointVerifier() 83 int tolerance, VerifyPixelColor verifier) { in create() argument 84 return new SamplePointVerifier(testPoints, expectedColors, tolerance) { in create()
|
D | RectVerifier.java | 32 public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) { in RectVerifier() argument 33 super(tolerance); in RectVerifier()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/ |
D | SamplePointVerifier.java | 40 public SamplePointVerifier(Point[] testPoints, int[] expectedColors, int tolerance) { in SamplePointVerifier() argument 43 mTolerance = tolerance; in SamplePointVerifier() 83 int tolerance, VerifyPixelColor verifier) { in create() argument 84 return new SamplePointVerifier(testPoints, expectedColors, tolerance) { in create()
|
D | RectVerifier.java | 32 public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) { in RectVerifier() argument 33 super(tolerance); in RectVerifier()
|
/cts/tests/tests/media/misc/src/android/media/misc/cts/ |
D | FaceDetector_FaceTest.java | 63 float tolerance = 5f; in testFaceProperties() local 67 assertEquals(eyesDistance, face.eyesDistance(), tolerance); in testFaceProperties() 70 assertEquals(eyesMidpointX, eyesMP.x, tolerance); in testFaceProperties() 71 assertEquals(eyesMidpointY, eyesMP.y, tolerance); in testFaceProperties()
|
D | MediaSyncTest.java | 441 final double tolerance = state.mMediaDurationUs in playAV() local 450 + ", tolerance " + tolerance + "\n"; in playAV() 453 if (Math.abs(diff) <= tolerance) { in playAV()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | GetPasswordExpirationTest.java | 51 private void checkPasswordExpiration(String error, long timeout, long tolerance) { in checkPasswordExpiration() argument 54 ADMIN_RECEIVER_COMPONENT)) <= tolerance); in checkPasswordExpiration()
|
/cts/tests/app/WallpaperTest/src/android/app/cts/wallpapers/util/ |
D | WallpaperTestUtils.java | 77 float tolerance = 0.1f; in isSimilar() local 95 .anyMatch(delta -> delta / 255f > tolerance); in isSimilar()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | SweepGradientTest.java | 99 private void verifyColors(int[] colors, float[] positions, int tolerance) { in verifyColors() argument 141 assertEquals(Color.alpha(color), Color.alpha(pixel), tolerance); in verifyColors() local 142 assertEquals(Color.red(color), Color.red(pixel), tolerance); in verifyColors() local 143 assertEquals(Color.green(color), Color.green(pixel), tolerance); in verifyColors() local 144 assertEquals(Color.blue(color), Color.blue(pixel), tolerance); in verifyColors() local
|
D | FrameRateCtsActivity.java | 457 float higherFrameRate, float lowerFrameRate, float tolerance) { in isFrameRateMultiple() argument 461 && Math.abs(roundedMultiple * lowerFrameRate - higherFrameRate) <= tolerance; in isFrameRateMultiple() 571 private void verifyCompatibleAndStableFrameRate(float expectedFrameRate, float tolerance, in verifyCompatibleAndStableFrameRate() argument 578 if (expectedFrameRate > tolerance) { // expectedFrameRate > 0 in verifyCompatibleAndStableFrameRate() 580 while (!isFrameRateMultiple(mDeviceFrameRate, expectedFrameRate, tolerance) in verifyCompatibleAndStableFrameRate()
|
D | BitmapFactoryTest.java | 265 public void testWebpStreamDecode(Config config, int tolerance) { in testWebpStreamDecode() argument 274 BitmapUtils.assertBitmapsMse(bPng, bWebp, tolerance, true, bPng.isPremultiplied()); in testWebpStreamDecode() 279 public void testWebpStreamEncode(Config config, int tolerance) { in testWebpStreamEncode() argument 292 BitmapUtils.assertBitmapsMse(bPng, bWebp2, tolerance, true, bPng.isPremultiplied()); in testWebpStreamEncode() 297 final int tolerance = 72; in testDecodeStream5() local 317 BitmapUtils.assertBitmapsMse(bPng, bWebP1, tolerance, true, bPng.isPremultiplied()); in testDecodeStream5() 329 BitmapUtils.assertBitmapsMse(bPng, bWebP2, tolerance, true, bPng.isPremultiplied()); in testDecodeStream5()
|
/cts/tests/tests/graphics/jni/ |
D | android_graphics_cts_MediaVulkanGpuTest.cpp | 38 bool fuzzyMatch(uint32_t value1, uint32_t value2, int32_t tolerance) { in fuzzyMatch() argument 46 if (std::abs(value1Masked - value2Masked) > tolerance) in fuzzyMatch()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/analyzers/ |
D | BaseSineAnalyzer.java | 153 public void setTolerance(double tolerance) { in setTolerance() argument 154 mTolerance = tolerance; in setTolerance()
|
/cts/tests/videocodec/src/android/videocodec/cts/ |
D | VideoEncoderIntraFrameIntervalTest.java | 148 int tolerance = mEncCfgParams[0].mKeyFrameInterval == 0 ? 0 : mEncCfgParams[0].mMaxBFrames; in testEncoderSyncFrameSupport() local 157 Math.abs(maxKeyFrameDistance - expDistance) <= tolerance); in testEncoderSyncFrameSupport()
|
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/ |
D | CameraErrorCollector.java | 351 public <T> boolean expectEquals(String msg, float expected, float actual, float tolerance) { in expectEquals() argument 356 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals() 358 expected, actual, tolerance)); in expectEquals() 374 public <T> boolean expectEquals(String msg, double expected, double actual, double tolerance) { in expectEquals() argument 379 if (!(Math.abs(expected - actual) <= tolerance)) { in expectEquals() 381 expected, actual, tolerance)); in expectEquals()
|
/cts/tests/media/src/android/mediav2/cts/ |
D | AudioEncoderTest.java | 192 float tolerance = ACCEPTABLE_AV_SYNC_ERROR * mActiveEncCfg.mSampleRate in encodeAndValidate() local 194 if (mInputData.length > out.limit() + tolerance) { in encodeAndValidate()
|
/cts/apps/CtsVerifier/jni/audio_loopback/analyzer/ |
D | GlitchAnalyzer.h | 49 void setTolerance(double tolerance) { in setTolerance() argument 50 mTolerance = tolerance; in setTolerance()
|
/cts/tests/tests/media/player/src/android/media/player/cts/ |
D | MediaPlayerTest.java | 324 final int tolerance = 70; in testPlayAudioFromDataURI() local 350 assertEquals(mp3Duration, mp.getDuration(), tolerance); in testPlayAudioFromDataURI() 356 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); in testPlayAudioFromDataURI() 402 int mp3Duration, int tolerance, int seekDuration) throws Exception { 419 assertEquals(mp3Duration, mp.getDuration(), tolerance); 425 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); 552 final int tolerance = 70; in runMidiTest() local 567 assertEquals(midiDuration, mp.getDuration(), tolerance); in runMidiTest() 573 assertEquals(pos + seekDuration, mp.getCurrentPosition(), tolerance); in runMidiTest() 1102 final int tolerance = 150; in testVideoSurfaceResetting() local [all …]
|
/cts/tests/tests/media/recorder/src/android/media/recorder/cts/ |
D | MediaRecorderTest.java | 818 private void checkRecordedTime(long expectedMs, long actualMs, long tolerance) { in checkRecordedTime() argument 819 assertEquals(expectedMs, actualMs, tolerance); in checkRecordedTime() 821 assertEquals(actualFileDurationMs, actualMs, tolerance); in checkRecordedTime() 838 long fileSize, long tolerance) throws Exception { in testSetMaxFileSize() argument 865 checkOutputFileSize(OUTPUT_PATH, fileSize, tolerance); in testSetMaxFileSize() 1152 long tolerance = 400 * 1024; in testRecordExceedFileSizeLimit() local 1299 checkOutputFileSize(filePath, fileSize, tolerance); in testRecordExceedFileSizeLimit() 1303 private void checkOutputFileSize(final String fileName, long fileSize, long tolerance) { in checkOutputFileSize() argument 1306 assertEquals(fileSize, file.length(), tolerance); in checkOutputFileSize()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | ActivityManagerTest.java | 206 final double tolerance = 0.2d; in testActivityManager_appExitReasonPackageNames() local 213 assertTrue(Math.abs((double) mockPackagescores / totalLoops - 0.5d) < tolerance); in testActivityManager_appExitReasonPackageNames()
|