diff --git a/media/codec2/hidl/1.0/vts/functional/Android.bp b/media/codec2/hidl/1.0/vts/functional/Android.bp index 5f0ba7dc81..cd3be81201 100644 --- a/media/codec2/hidl/1.0/vts/functional/Android.bp +++ b/media/codec2/hidl/1.0/vts/functional/Android.bp @@ -89,6 +89,8 @@ filegroup { "res/bbb_av1_176_144.av1", "res/bbb_av1_640_360.info", "res/bbb_av1_176_144.info", + "res/bbb_vp9_704x480_280kbps_24fps_altref_2.vp9", + "res/bbb_vp9_704x480_280kbps_24fps_altref_2.info", ], } diff --git a/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.info b/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.info new file mode 100644 index 0000000000..9ea1ffade8 --- /dev/null +++ b/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.info @@ -0,0 +1,352 @@ +73 0 0 +159 16 41000 +103 16 41000 +34 0 41000 +30 0 83000 +30 0 125000 +30 0 166000 +1 0 208000 +105 0 250000 +54 0 291000 +65 0 333000 +1 0 375000 +239 0 416000 +1373 16 458000 +263 16 458000 +133 0 458000 +109 0 500000 +127 0 541000 +1 0 583000 +134 0 625000 +159 0 666000 +131 0 708000 +1 0 750000 +4420 16 791000 +349 16 791000 +151 0 791000 +1 0 833000 +120 0 875000 +1 0 916000 +3203 16 958000 +433 16 958000 +125 0 958000 +1 0 1000000 +107 0 1041000 +1 0 1083000 +3832 16 1125000 +541 16 1125000 +116 0 1125000 +1 0 1166000 +115 0 1208000 +1 0 1250000 +3777 16 1291000 +495 16 1291000 +109 0 1291000 +1 0 1333000 +79 0 1375000 +1 0 1416000 +3906 16 1458000 +539 16 1458000 +149 0 1458000 +1 0 1500000 +112 0 1541000 +1 0 1583000 +5495 16 1625000 +594 16 1625000 +392 0 1625000 +235 0 1666000 +170 0 1708000 +1 0 1750000 +384 0 1791000 +378 0 1833000 +120 0 1875000 +1 0 1916000 +16843 16 1958000 +1951 16 1958000 +774 0 1958000 +831 0 2000000 +560 0 2041000 +489 0 2083000 +345 0 2125000 +243 0 2166000 +260 0 2208000 +1 0 2250000 +498 0 2291000 +463 0 2333000 +414 0 2375000 +341 0 2416000 +262 0 2458000 +194 0 2500000 +85 0 2541000 +1 0 2583000 +11253 16 2625000 +1561 16 2625000 +250 0 2625000 +402 0 2666000 +454 0 2708000 +350 0 2750000 +316 0 2791000 +164 0 2833000 +108 0 2875000 +1 0 2916000 +246 0 2958000 +586 0 3000000 +493 0 3041000 +363 0 3083000 +325 0 3125000 +170 0 3166000 +78 0 3208000 +40 0 3250000 +15630 16 3291000 +2228 16 3291000 +346 0 3291000 +707 0 3333000 +685 0 3375000 +582 0 3416000 +473 0 3458000 +249 0 3500000 +177 0 3541000 +1 0 3583000 +541 0 3625000 +834 0 3666000 +614 0 3708000 +473 0 3750000 +365 0 3791000 +211 0 3833000 +91 0 3875000 +1 0 3916000 +8384 16 3958000 +1138 16 3958000 +256 0 3958000 +377 0 4000000 +316 0 4041000 +267 0 4083000 +119 0 4125000 +1 0 4166000 +319 0 4208000 +390 0 4250000 +243 0 4291000 +203 0 4333000 +110 0 4375000 +1 0 4416000 +11302 16 4458000 +1527 16 4458000 +408 0 4458000 +507 0 4500000 +350 0 4541000 +377 0 4583000 +239 0 4625000 +125 0 4666000 +1 0 4708000 +351 0 4750000 +469 0 4791000 +288 0 4833000 +244 0 4875000 +224 0 4916000 +108 0 4958000 +1 0 5000000 +6016 16 5041000 +561 16 5041000 +235 0 5041000 +213 0 5083000 +118 0 5125000 +1 0 5166000 +299 0 5208000 +213 0 5250000 +129 0 5291000 +1 0 5333000 +7029 16 5375000 +728 16 5375000 +339 0 5375000 +287 0 5416000 +225 0 5458000 +147 0 5500000 +1 0 5541000 +270 0 5583000 +217 0 5625000 +138 0 5666000 +46 0 5708000 +32861 0 5750000 +16095 16 5791000 +2033 16 5791000 +318 0 5791000 +443 0 5833000 +361 0 5875000 +313 0 5916000 +274 0 5958000 +210 0 6000000 +134 0 6041000 +1 0 6083000 +295 0 6125000 +415 0 6166000 +330 0 6208000 +264 0 6250000 +242 0 6291000 +166 0 6333000 +116 0 6375000 +1 0 6416000 +9488 16 6458000 +1466 16 6458000 +378 0 6458000 +419 0 6500000 +335 0 6541000 +290 0 6583000 +315 0 6625000 +199 0 6666000 +131 0 6708000 +1 0 6750000 +342 0 6791000 +421 0 6833000 +306 0 6875000 +320 0 6916000 +245 0 6958000 +205 0 7000000 +143 0 7041000 +1 0 7083000 +16554 16 7125000 +1744 16 7125000 +482 0 7125000 +365 0 7166000 +352 0 7208000 +308 0 7250000 +295 0 7291000 +199 0 7333000 +149 0 7375000 +1 0 7416000 +360 0 7458000 +428 0 7500000 +377 0 7541000 +347 0 7583000 +270 0 7625000 +187 0 7666000 +130 0 7708000 +39 0 7750000 +14637 16 7791000 +1832 16 7791000 +422 0 7791000 +466 0 7833000 +375 0 7875000 +405 0 7916000 +352 0 7958000 +275 0 8000000 +173 0 8041000 +1 0 8083000 +484 0 8125000 +516 0 8166000 +497 0 8208000 +452 0 8250000 +428 0 8291000 +293 0 8333000 +190 0 8375000 +1 0 8416000 +11534 16 8458000 +1655 16 8458000 +446 0 8458000 +531 0 8500000 +465 0 8541000 +495 0 8583000 +402 0 8625000 +330 0 8666000 +227 0 8708000 +1 0 8750000 +568 0 8791000 +694 0 8833000 +382 0 8875000 +422 0 8916000 +280 0 8958000 +305 0 9000000 +203 0 9041000 +1 0 9083000 +17067 16 9125000 +1521 16 9125000 +428 0 9125000 +434 0 9166000 +359 0 9208000 +368 0 9250000 +240 0 9291000 +215 0 9333000 +211 0 9375000 +1 0 9416000 +346 0 9458000 +533 0 9500000 +391 0 9541000 +313 0 9583000 +326 0 9625000 +211 0 9666000 +233 0 9708000 +35 0 9750000 +23743 16 9791000 +1968 16 9791000 +277 0 9791000 +276 0 9833000 +285 0 9875000 +232 0 9916000 +179 0 9958000 +203 0 10000000 +121 0 10041000 +1 0 10083000 +318 0 10125000 +391 0 10166000 +362 0 10208000 +291 0 10250000 +235 0 10291000 +187 0 10333000 +117 0 10375000 +43 0 10416000 +12465 16 10458000 +1607 16 10458000 +280 0 10458000 +295 0 10500000 +244 0 10541000 +211 0 10583000 +171 0 10625000 +159 0 10666000 +106 0 10708000 +1 0 10750000 +216 0 10791000 +195 0 10833000 +180 0 10875000 +164 0 10916000 +156 0 10958000 +96 0 11000000 +1 0 11041000 +54547 0 11083000 +2920 16 11125000 +153 16 11125000 +117 0 11125000 +83 0 11166000 +86 0 11208000 +1 0 11250000 +92 0 11291000 +93 0 11333000 +80 0 11375000 +1 0 11416000 +1314 16 11458000 +311 16 11458000 +79 0 11458000 +65 0 11500000 +74 0 11541000 +61 0 11583000 +1 0 11625000 +65 0 11666000 +64 0 11708000 +49 0 11750000 +51 0 11791000 +1 0 11833000 +19309 0 11875000 +3848 16 11916000 +771 16 11916000 +167 0 11916000 +202 0 11958000 +190 0 12000000 +173 0 12041000 +128 0 12083000 +79 0 12125000 +1 0 12166000 +155 0 12208000 +211 0 12250000 +192 0 12291000 +131 0 12333000 +91 0 12375000 +128 0 12416000 +1 0 12458000 diff --git a/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.vp9 b/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.vp9 new file mode 100644 index 0000000000..00c7dec340 Binary files /dev/null and b/media/codec2/hidl/1.0/vts/functional/res/bbb_vp9_704x480_280kbps_24fps_altref_2.vp9 differ diff --git a/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.cpp b/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.cpp index ec3fd7b348..f2164295b9 100644 --- a/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.cpp +++ b/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.cpp @@ -267,7 +267,7 @@ void validateComponent(const std::shared_ptr& } // number of elementary streams per component -#define STREAM_COUNT 2 +#define STREAM_COUNT 3 // LookUpTable of clips and metadata for component testing void GetURLForComponent(Codec2VideoDecHidlTest::standardComp comp, char* mURL, char* info, size_t streamIndex = 1) { @@ -280,29 +280,31 @@ void GetURLForComponent(Codec2VideoDecHidlTest::standardComp comp, char* mURL, c static const CompToURL kCompToURL[] = { {Codec2VideoDecHidlTest::standardComp::avc, - {"bbb_avc_176x144_300kbps_60fps.h264", "bbb_avc_640x360_768kbps_30fps.h264"}, - {"bbb_avc_176x144_300kbps_60fps.info", "bbb_avc_640x360_768kbps_30fps.info"}}, + {"bbb_avc_176x144_300kbps_60fps.h264", "bbb_avc_640x360_768kbps_30fps.h264", ""}, + {"bbb_avc_176x144_300kbps_60fps.info", "bbb_avc_640x360_768kbps_30fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::hevc, - {"bbb_hevc_176x144_176kbps_60fps.hevc", "bbb_hevc_640x360_1600kbps_30fps.hevc"}, - {"bbb_hevc_176x144_176kbps_60fps.info", "bbb_hevc_640x360_1600kbps_30fps.info"}}, + {"bbb_hevc_176x144_176kbps_60fps.hevc", "bbb_hevc_640x360_1600kbps_30fps.hevc", ""}, + {"bbb_hevc_176x144_176kbps_60fps.info", "bbb_hevc_640x360_1600kbps_30fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::mpeg2, - {"bbb_mpeg2_176x144_105kbps_25fps.m2v", "bbb_mpeg2_352x288_1mbps_60fps.m2v"}, - {"bbb_mpeg2_176x144_105kbps_25fps.info", "bbb_mpeg2_352x288_1mbps_60fps.info"}}, + {"bbb_mpeg2_176x144_105kbps_25fps.m2v", "bbb_mpeg2_352x288_1mbps_60fps.m2v", ""}, + {"bbb_mpeg2_176x144_105kbps_25fps.info", "bbb_mpeg2_352x288_1mbps_60fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::h263, - {"", "bbb_h263_352x288_300kbps_12fps.h263"}, - {"", "bbb_h263_352x288_300kbps_12fps.info"}}, + {"", "bbb_h263_352x288_300kbps_12fps.h263", ""}, + {"", "bbb_h263_352x288_300kbps_12fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::mpeg4, - {"", "bbb_mpeg4_352x288_512kbps_30fps.m4v"}, - {"", "bbb_mpeg4_352x288_512kbps_30fps.info"}}, + {"", "bbb_mpeg4_352x288_512kbps_30fps.m4v", ""}, + {"", "bbb_mpeg4_352x288_512kbps_30fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::vp8, - {"bbb_vp8_176x144_240kbps_60fps.vp8", "bbb_vp8_640x360_2mbps_30fps.vp8"}, - {"bbb_vp8_176x144_240kbps_60fps.info", "bbb_vp8_640x360_2mbps_30fps.info"}}, + {"bbb_vp8_176x144_240kbps_60fps.vp8", "bbb_vp8_640x360_2mbps_30fps.vp8", ""}, + {"bbb_vp8_176x144_240kbps_60fps.info", "bbb_vp8_640x360_2mbps_30fps.info", ""}}, {Codec2VideoDecHidlTest::standardComp::vp9, - {"bbb_vp9_176x144_285kbps_60fps.vp9", "bbb_vp9_640x360_1600kbps_30fps.vp9"}, - {"bbb_vp9_176x144_285kbps_60fps.info", "bbb_vp9_640x360_1600kbps_30fps.info"}}, + {"bbb_vp9_176x144_285kbps_60fps.vp9", "bbb_vp9_640x360_1600kbps_30fps.vp9", + "bbb_vp9_704x480_280kbps_24fps_altref_2.vp9"}, + {"bbb_vp9_176x144_285kbps_60fps.info", "bbb_vp9_640x360_1600kbps_30fps.info", + "bbb_vp9_704x480_280kbps_24fps_altref_2.info"}}, {Codec2VideoDecHidlTest::standardComp::av1, - {"bbb_av1_640_360.av1", "bbb_av1_176_144.av1"}, - {"bbb_av1_640_360.info", "bbb_av1_176_144.info"}}, + {"bbb_av1_640_360.av1", "bbb_av1_176_144.av1", ""}, + {"bbb_av1_640_360.info", "bbb_av1_176_144.info", ""}}, }; for (size_t i = 0; i < sizeof(kCompToURL) / sizeof(kCompToURL[0]); ++i) { @@ -481,7 +483,9 @@ TEST_P(Codec2VideoDecDecodeTest, DecodeTest) { eleInfo >> flags; eleInfo >> timestamp; bool codecConfig = flags ? ((1 << (flags - 1)) & C2FrameData::FLAG_CODEC_CONFIG) != 0 : 0; - if (mTimestampDevTest && !codecConfig) mTimestampUslist.push_back(timestamp); + bool nonDisplayFrame = ((flags & FLAG_NON_DISPLAY_FRAME) != 0); + if (mTimestampDevTest && !codecConfig && !nonDisplayFrame) + mTimestampUslist.push_back(timestamp); Info.push_back({bytesCount, flags, timestamp}); } eleInfo.close(); @@ -545,6 +549,10 @@ TEST_P(Codec2VideoDecHidlTest, AdaptiveDecodeTest) { strcpy(mURL, sResourceDir.c_str()); strcpy(info, sResourceDir.c_str()); GetURLForComponent(mCompName, mURL, info, i % STREAM_COUNT); + if (!(strcmp(mURL, sResourceDir.c_str())) || !(strcmp(info, sResourceDir.c_str()))) { + ALOGV("Stream not available, skipping this index"); + continue; + } eleInfo.open(info); ASSERT_EQ(eleInfo.is_open(), true) << mURL << " - file not found"; @@ -560,10 +568,12 @@ TEST_P(Codec2VideoDecHidlTest, AdaptiveDecodeTest) { Info.push_back({bytesCount, flags, timestamp}); bool codecConfig = flags ? ((1 << (flags - 1)) & C2FrameData::FLAG_CODEC_CONFIG) != 0 : 0; + bool nonDisplayFrame = ((flags & FLAG_NON_DISPLAY_FRAME) != 0); { ULock l(mQueueLock); - if (mTimestampDevTest && !codecConfig) mTimestampUslist.push_back(timestamp); + if (mTimestampDevTest && !codecConfig && !nonDisplayFrame) + mTimestampUslist.push_back(timestamp); } if (timestampMax < timestamp) timestampMax = timestamp; } @@ -903,6 +913,10 @@ int main(int argc, char** argv) { std::make_tuple(std::get<0>(params), std::get<1>(params), "1", "false")); kDecodeTestParameters.push_back( std::make_tuple(std::get<0>(params), std::get<1>(params), "1", "true")); + kDecodeTestParameters.push_back( + std::make_tuple(std::get<0>(params), std::get<1>(params), "2", "false")); + kDecodeTestParameters.push_back( + std::make_tuple(std::get<0>(params), std::get<1>(params), "2", "true")); } // Set the resource directory based on command line args. diff --git a/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.xml b/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.xml index 87617977ef..63e7a6930a 100644 --- a/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.xml +++ b/media/codec2/hidl/1.0/vts/functional/video/VtsHalMediaC2V1_0TargetVideoDecTest.xml @@ -49,6 +49,8 @@