Commit 7fc699e9 by claincly Committed by Ian Baker

Change SSIM transcode MIME type to H264.

The MIME type was set to H265 to force transcoding. Now that we have an encoder
factory that forces encoding, switching back to H264 ensures the quality test
is conducted on more devices (those don't support H265 can be tested now).

However, H265 should be part of the quality test after we have proper mechanism
to skip test based on device capability.

PiperOrigin-RevId: 440132471
parent 005882e6
...@@ -33,13 +33,15 @@ import org.junit.runner.RunWith; ...@@ -33,13 +33,15 @@ import org.junit.runner.RunWith;
/** Checks transcoding quality. */ /** Checks transcoding quality. */
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public final class TranscodeQualityTest { public final class TranscodeQualityTest {
// TODO(b/228455984) Add test that calculates SSIM for transcoding to H265.
@Test @Test
public void singleTranscode_ssimIsGreaterThan90Percent() throws Exception { public void transformWithDecodeEncode_ssimIsGreaterThan90Percent() throws Exception {
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = Transformer transformer =
new Transformer.Builder(context) new Transformer.Builder(context)
.setTransformationRequest( .setTransformationRequest(
new TransformationRequest.Builder().setVideoMimeType(MimeTypes.VIDEO_H265).build()) new TransformationRequest.Builder().setVideoMimeType(MimeTypes.VIDEO_H264).build())
.setEncoderFactory(AndroidTestUtil.FORCE_ENCODE_ENCODER_FACTORY)
.setRemoveAudio(true) .setRemoveAudio(true)
.build(); .build();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment