From 6bc5ae0cf7323566a8890fa243952e39bd823b12 Mon Sep 17 00:00:00 2001 From: hkuang Date: Tue, 14 Jul 2020 12:01:50 -0700 Subject: [PATCH] Transcoding: Add HEVC->AVC performance test. Due to slowness in transcoding video with audio, only adding the video only file for now. Bug: 154734456 Test: Unit test. Change-Id: I5a353e24cca0a6624df4e9309ac64bc2fef4b0ed --- .../MediaTranscodingBenchmark.java | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingBenchmark.java b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingBenchmark.java index de5ed5422dd10..5c87d30068b26 100644 --- a/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingBenchmark.java +++ b/media/tests/MediaTranscodingTest/src/com/android/mediatranscodingtest/MediaTranscodingBenchmark.java @@ -283,5 +283,50 @@ public class MediaTranscodingBenchmark String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; transcode(testVideoName, transcodedVideoName); - }*/ + } */ + + @Test + public void testBenchmarkingHEVCToAVCWith107FramesWithoutAudio() throws Exception { + String videoNameWithoutExtension = "video_1920x1080_107frame_hevc_4Mbps_30fps"; + String testVideoName = videoNameWithoutExtension + ".mp4"; + String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; + + transcode(testVideoName, transcodedVideoName); + } + + @Test + public void testBenchmarkingHEVCToAVCWith928FramesWithoutAudio() throws Exception { + String videoNameWithoutExtension = "video_1920x1080_928frame_hevc_4Mbps_30fps"; + String testVideoName = videoNameWithoutExtension + ".mp4"; + String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; + + transcode(testVideoName, transcodedVideoName); + } + + @Test + public void testBenchmarkingHEVCToAVCWith1863FramesWithoutAudio() throws Exception { + String videoNameWithoutExtension = "video_1920x1080_1863frame_hevc_4Mbps_30fps"; + String testVideoName = videoNameWithoutExtension + ".mp4"; + String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; + + transcode(testVideoName, transcodedVideoName); + } + + @Test + public void testBenchmarkingHEVCToAVCWith3863FramesWithoutAudio() throws Exception { + String videoNameWithoutExtension = "video_1920x1080_3863frame_hevc_4Mbps_30fps"; + String testVideoName = videoNameWithoutExtension + ".mp4"; + String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; + + transcode(testVideoName, transcodedVideoName); + } + + @Test + public void testBenchmarkingHEVCToAVCWith9374FramesWithoutAudio() throws Exception { + String videoNameWithoutExtension = "video_1920x1080_9374frame_hevc_4Mbps_30fps"; + String testVideoName = videoNameWithoutExtension + ".mp4"; + String transcodedVideoName = videoNameWithoutExtension + "_transcode.mp4"; + + transcode(testVideoName, transcodedVideoName); + } }