EncodeDecodeAccuracyTest: Relax allowed error for devices upgrading to T
Some devices and emulators need higer tolerance.
So the allowed error is increased to 8 (from 5) in steady state
and 10 (from 7) in the initial few frames for devices upgrading
to Android T
Bug: 225095136
Test: atest CtsMediaV2TestCases:EncodeDecodeAccuracyTest
Change-Id: Ia9843f3d4131528f71a52b78ac57c3238354467d
(cherry picked from commit 0b1e2c9c09bb797575d2ea474b015edec5bcbd6d)
Merged-In: Ia9843f3d4131528f71a52b78ac57c3238354467d
(cherry picked from commit ce262e2bffa71a7c3028146db1d28bf7075e80c4)
Merged-In: Ia9843f3d4131528f71a52b78ac57c3238354467d
diff --git a/tests/media/src/android/mediav2/cts/EncodeDecodeAccuracyTest.java b/tests/media/src/android/mediav2/cts/EncodeDecodeAccuracyTest.java
index b11343c..ebed139 100644
--- a/tests/media/src/android/mediav2/cts/EncodeDecodeAccuracyTest.java
+++ b/tests/media/src/android/mediav2/cts/EncodeDecodeAccuracyTest.java
@@ -55,9 +55,10 @@
// qp of the encoded clips shall drop down to < 10. Further the color bands are aligned to 2,
// so from downsampling rgb24 to yuv420p, even if bilinear filters are used as opposed to
// skipping samples, we may not see large color loss. Hence allowable tolerance is kept to 5.
- // until QP stabilizes, the tolerance is set at 7.
- private final int TRANSIENT_STATE_COLOR_DELTA = 7;
- private final int STEADY_STATE_COLOR_DELTA = 5;
+ // until QP stabilizes, the tolerance is set at 7. For devices upgrading to T, thresholds are
+ // relaxed to 8 and 10.
+ private final int TRANSIENT_STATE_COLOR_DELTA = FIRST_SDK_IS_AT_LEAST_T ? 7: 10;
+ private final int STEADY_STATE_COLOR_DELTA = FIRST_SDK_IS_AT_LEAST_T ? 5: 8;
private final int[][] mColorBars = new int[][]{
{66, 133, 244},
{219, 68, 55},