Test: Update tone mapping capabilities check output format.

Checking the output format's mime type may skip tests more often than we'd like,
because we may desire using a lower-spec output mimetype than what's passed in, if
based on the input's HDR mimetype value.

Therefore, update this output format to null, for tone-mapping tests

PiperOrigin-RevId: 592855713
This commit is contained in:
huangdarwin 2023-12-21 07:27:30 -08:00 committed by Copybara-Service
parent 639d380762
commit 4774fa1a60
3 changed files with 7 additions and 35 deletions

View file

@ -15,13 +15,11 @@
*/
package androidx.media3.transformer.mh;
import static androidx.media3.transformer.AndroidTestUtil.MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT;
import static androidx.media3.transformer.AndroidTestUtil.recordTestSkipped;
import static androidx.media3.transformer.AndroidTestUtil.skipAndLogIfFormatsUnsupported;
import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
import android.content.Context;
import androidx.media3.common.ColorInfo;
import androidx.media3.common.Format;
import androidx.media3.common.util.GlUtil;
import androidx.media3.common.util.Util;
@ -52,14 +50,7 @@ public final class HdrCapabilitiesUtil {
recordTestSkipped(context, testId, SKIP_REASON_NO_YUV);
return true;
}
if (skipAndLogIfFormatsUnsupported(
context,
testId,
inputFormat,
/* outputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
if (skipAndLogIfFormatsUnsupported(context, testId, inputFormat, /* outputFormat= */ null)) {
return true;
}
return false;

View file

@ -231,10 +231,7 @@ public final class HdrEditingTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT,
/* outputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}
@ -297,10 +294,7 @@ public final class HdrEditingTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT,
/* outputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}

View file

@ -26,7 +26,6 @@ import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import android.net.Uri;
import androidx.media3.common.C;
import androidx.media3.common.ColorInfo;
import androidx.media3.common.MediaItem;
import androidx.media3.transformer.AndroidTestUtil;
import androidx.media3.transformer.Composition;
@ -59,10 +58,7 @@ public class ToneMapHdrToSdrUsingMediaCodecTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT,
/* outputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}
@ -120,10 +116,7 @@ public class ToneMapHdrToSdrUsingMediaCodecTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT,
/* outputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}
@ -181,10 +174,7 @@ public class ToneMapHdrToSdrUsingMediaCodecTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT,
/* outputFormat= */ MP4_ASSET_720P_4_SECOND_HDR10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}
@ -243,10 +233,7 @@ public class ToneMapHdrToSdrUsingMediaCodecTest {
context,
testId,
/* inputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT,
/* outputFormat= */ MP4_ASSET_1080P_5_SECOND_HLG10_FORMAT
.buildUpon()
.setColorInfo(ColorInfo.SDR_BT709_LIMITED)
.build())) {
/* outputFormat= */ null)) {
return;
}