Test: Expand GL tone-map pixel difference threshold.

PiperOrigin-RevId: 610374358
This commit is contained in:
huangdarwin 2024-02-26 05:11:13 -08:00 committed by Copybara-Service
parent a45e734bb0
commit e98858424a

View file

@ -29,10 +29,12 @@ import android.util.Log;
import androidx.media3.common.C;
import androidx.media3.common.ColorInfo;
import androidx.media3.common.Format;
import androidx.media3.common.util.Util;
import androidx.media3.effect.DefaultVideoFrameProcessor;
import androidx.media3.test.utils.DecodeOneFrameUtil;
import androidx.media3.test.utils.VideoFrameProcessorTestRunner;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.google.common.base.Ascii;
import com.google.common.collect.ImmutableList;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.junit.After;
@ -59,7 +61,10 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
* across codec/OpenGL versions don't affect whether the test passes for most devices, but
* substantial distortions introduced by changes in tested components will cause the test to fail.
*/
private static final float MAXIMUM_DEVICE_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE = 6f;
private static final float MAXIMUM_DEVICE_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE =
!Ascii.equalsIgnoreCase(Util.MODEL, "dn2103") && !Ascii.equalsIgnoreCase(Util.MODEL, "v2059")
? 6f
: 7f;
// This file is generated on a Pixel 7, because the emulator isn't able to decode HLG to generate
// this file.