Replace 640x360 H264 test video with 320x240 H264 video.
Decoding and encoding 320x240 H264 video should be supported on all devices from Android 5.0 based on CDD requirements. https://source.android.com/compatibility/5.0/android-5.0-cdd#5_2_video_encoding 640x360 encoding doesn't seem to be supported on Nexus 5. PiperOrigin-RevId: 450901715
This commit is contained in:
parent
c6ed7c4bcb
commit
678b6c0438
Binary file not shown.
@ -58,14 +58,14 @@ public final class AndroidTestUtil {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
/** Baseline profile level 3.0 H.264 stream, which should be supported on all devices. */
|
/** Baseline profile level 3.0 H.264 stream, which should be supported on all devices. */
|
||||||
public static final String MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_URI_STRING =
|
public static final String MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_URI_STRING =
|
||||||
"asset:///media/mp4/sample_with_increasing_timestamps_360p.mp4";
|
"asset:///media/mp4/sample_with_increasing_timestamps_320w_240h.mp4";
|
||||||
|
|
||||||
public static final Format MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_FORMAT =
|
public static final Format MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_FORMAT =
|
||||||
new Format.Builder()
|
new Format.Builder()
|
||||||
.setSampleMimeType(MimeTypes.VIDEO_H264)
|
.setSampleMimeType(MimeTypes.VIDEO_H264)
|
||||||
.setWidth(640)
|
.setWidth(320)
|
||||||
.setHeight(360)
|
.setHeight(240)
|
||||||
.setFrameRate(30.00f)
|
.setFrameRate(30.00f)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -279,8 +279,8 @@ public final class AndroidTestUtil {
|
|||||||
return MP4_ASSET_FORMAT;
|
return MP4_ASSET_FORMAT;
|
||||||
case MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING:
|
case MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING:
|
||||||
return MP4_ASSET_WITH_INCREASING_TIMESTAMPS_FORMAT;
|
return MP4_ASSET_WITH_INCREASING_TIMESTAMPS_FORMAT;
|
||||||
case MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_URI_STRING:
|
case MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_URI_STRING:
|
||||||
return MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_FORMAT;
|
return MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_FORMAT;
|
||||||
case MP4_ASSET_SEF_URI_STRING:
|
case MP4_ASSET_SEF_URI_STRING:
|
||||||
return MP4_ASSET_SEF_FORMAT;
|
return MP4_ASSET_SEF_FORMAT;
|
||||||
case MP4_REMOTE_10_SECONDS_URI_STRING:
|
case MP4_REMOTE_10_SECONDS_URI_STRING:
|
||||||
|
@ -96,9 +96,9 @@ public final class TranscodeQualityTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void transcodeAvcToAvc360p_ssimIsGreaterThan90Percent() throws Exception {
|
public void transcodeAvcToAvc360x240_ssimIsGreaterThan90Percent() throws Exception {
|
||||||
Context context = ApplicationProvider.getApplicationContext();
|
Context context = ApplicationProvider.getApplicationContext();
|
||||||
String testId = "transcodeAvcToAvc360p_ssim";
|
String testId = "transcodeAvcToAvc320x240_ssim";
|
||||||
|
|
||||||
// Note: We never skip this test as the input and output formats should be within CDD
|
// Note: We never skip this test as the input and output formats should be within CDD
|
||||||
// requirements on all supported API versions.
|
// requirements on all supported API versions.
|
||||||
@ -115,7 +115,9 @@ public final class TranscodeQualityTest {
|
|||||||
new TransformerAndroidTestRunner.Builder(context, transformer)
|
new TransformerAndroidTestRunner.Builder(context, transformer)
|
||||||
.setCalculateSsim(true)
|
.setCalculateSsim(true)
|
||||||
.build()
|
.build()
|
||||||
.run(testId, AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_URI_STRING);
|
.run(
|
||||||
|
testId,
|
||||||
|
AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_URI_STRING);
|
||||||
|
|
||||||
assertThat(result.ssim).isGreaterThan(0.90);
|
assertThat(result.ssim).isGreaterThan(0.90);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ public class EncoderPerformanceAnalysisTest {
|
|||||||
|
|
||||||
private static final ImmutableList<String> INPUT_FILES =
|
private static final ImmutableList<String> INPUT_FILES =
|
||||||
ImmutableList.of(
|
ImmutableList.of(
|
||||||
AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_360P_15S_URI_STRING,
|
AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_320W_240H_15S_URI_STRING,
|
||||||
AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING,
|
AndroidTestUtil.MP4_ASSET_WITH_INCREASING_TIMESTAMPS_URI_STRING,
|
||||||
AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_URI_STRING);
|
AndroidTestUtil.MP4_REMOTE_4K60_PORTRAIT_URI_STRING);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user