diff options
author | Haripriya Deshmukh <haripriya.deshmukh@ittiam.com> | 2024-05-07 16:32:32 +0530 |
---|---|---|
committer | Haripriya Deshmukh <haripriya.deshmukh@ittiam.com> | 2024-05-09 11:13:27 +0530 |
commit | 54a9561a8de2809262fdab19cd7f05ca4bf5a9f4 (patch) | |
tree | fa3522fb68befe026050946166c50a5e2231efca | |
parent | d1bf037a39584f35575caaaa65b916e36957d5d2 (diff) | |
download | cts-54a9561a8de2809262fdab19cd7f05ca4bf5a9f4.tar.gz |
MediaMisc: Modify testGetImageAtIndexAvifWithCrop for 720x480
Bug: 336111488
Test: atest CtsMediaMiscTestCases:MediaMetadataRetrieverTest
Change-Id: Ied6108c425414ee6c780e2c5fdb088dc3010b233
-rw-r--r-- | tests/tests/media/misc/src/android/media/misc/cts/MediaMetadataRetrieverTest.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/tests/media/misc/src/android/media/misc/cts/MediaMetadataRetrieverTest.java b/tests/tests/media/misc/src/android/media/misc/cts/MediaMetadataRetrieverTest.java index 8c5bf2fd5eb..020fd09895e 100644 --- a/tests/tests/media/misc/src/android/media/misc/cts/MediaMetadataRetrieverTest.java +++ b/tests/tests/media/misc/src/android/media/misc/cts/MediaMetadataRetrieverTest.java @@ -1242,17 +1242,15 @@ public class MediaMetadataRetrieverTest { @SdkSuppress(minSdkVersion = Build.VERSION_CODES.VANILLA_ICE_CREAM, codeName = "VanillaIceCream") public void testGetImageAtIndexAvifWithCrop() throws Exception { - // sample_1960x1120_crop_20_20_1920_1080.avif is a 1960x1120 AVIF image with the crop window - // set to left: 20 top: 20 crop width: 1920 crop height: 1080. The cropped image should + // sample_720x480_crop_20_20_680_440.avif is a 720x480 AVIF image with the crop window + // set to left: 20 top: 20 crop width: 680 crop height: 440. The cropped image should // contain the same pixels as other sample AVIF images. So in order to verify the cropping, // it is sufficient to pass checkColor to true to testGetImage. If the cropping was // incorrect, then checking of color bars will fail. The expected width and height should be // that of the cropped image. - if (!MediaUtils.canDecodeVideo(MediaFormat.MIMETYPE_VIDEO_AV1, 1960, 1120, 30)) { - MediaUtils.skipTest("No AV1 codec for 1960x1120"); - return; - } - testGetImage("sample_1960x1120_crop_20_20_1920_1080.avif", 1920, 1080, "image/avif", + assumeTrue("No AV1 codec for 720x480", + MediaUtils.canDecodeVideo(MediaFormat.MIMETYPE_VIDEO_AV1, 720, 480, 30)); + testGetImage("sample_720x480_crop_20_20_680_440.avif", 680, 440, "image/avif", 0 /*rotation*/, 1 /*imageCount*/, 0 /*primary*/, false /*useGrid*/, true /*checkColor*/); } |