Home
last modified time | relevance | path

Searched refs:tolerance (Results 1 – 25 of 34) sorted by relevance

12

/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DColorUtils.java34 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 …]
DMediaPerfUtils.java168 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/
Dfloat16_gen.c122 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/
DVelocityTrackerTest.kt348 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 …]
DMotionPredictorTest.kt240 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/
DSamplePointVerifier.java40 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()
DRectVerifier.java32 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/
DSamplePointVerifier.java40 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()
DRectVerifier.java32 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/
DFaceDetector_FaceTest.java63 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()
DMediaSyncTest.java441 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/
DGetPasswordExpirationTest.java51 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/
DWallpaperTestUtils.java77 float tolerance = 0.1f; in isSimilar() local
95 .anyMatch(delta -> delta / 255f > tolerance); in isSimilar()
/cts/tests/tests/graphics/src/android/graphics/cts/
DSweepGradientTest.java99 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
DFrameRateCtsActivity.java457 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()
DBitmapFactoryTest.java265 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/
Dandroid_graphics_cts_MediaVulkanGpuTest.cpp38 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/
DBaseSineAnalyzer.java153 public void setTolerance(double tolerance) { in setTolerance() argument
154 mTolerance = tolerance; in setTolerance()
/cts/tests/videocodec/src/android/videocodec/cts/
DVideoEncoderIntraFrameIntervalTest.java148 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/
DCameraErrorCollector.java351 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/
DAudioEncoderTest.java192 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/
DGlitchAnalyzer.h49 void setTolerance(double tolerance) { in setTolerance() argument
50 mTolerance = tolerance; in setTolerance()
/cts/tests/tests/media/player/src/android/media/player/cts/
DMediaPlayerTest.java324 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/
DMediaRecorderTest.java818 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/
DActivityManagerTest.java206 final double tolerance = 0.2d; in testActivityManager_appExitReasonPackageNames() local
213 assertTrue(Math.abs((double) mockPackagescores / totalLoops - 0.5d) < tolerance); in testActivityManager_appExitReasonPackageNames()

12