Commit f137f1cf authored by Victor Costan's avatar Victor Costan Committed by Chromium LUCI CQ

media: Run Android GPU decoding tests for AV1.

The MediaCodecVideoDecoderAV1Test test suite is currently not
instantiated, so it does not run at all. Also, the
MediaCodecVideoDecoderTest suite is not currently run for the AV1 codec.
This CL fixes both problems.

The first problem was discovered by attempting to roll googletest past
CL 315255779, which causes test binaries to fail when they include test
suites / parametrized tests that are not instantiated, and when they
include empty test suites.

Bug: 1163396
Change-Id: Id2a070cfeed6d37b920b5d28f947037ac5699fbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2616486
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841304}
parent 298d5594
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "media/base/decoder_buffer.h" #include "media/base/decoder_buffer.h"
#include "media/base/media_util.h" #include "media/base/media_util.h"
#include "media/base/test_helpers.h" #include "media/base/test_helpers.h"
#include "media/base/video_codecs.h"
#include "media/base/video_frame.h" #include "media/base/video_frame.h"
#include "media/gpu/android/android_video_surface_chooser_impl.h" #include "media/gpu/android/android_video_surface_chooser_impl.h"
#include "media/gpu/android/fake_codec_allocator.h" #include "media/gpu/android/fake_codec_allocator.h"
...@@ -996,6 +997,8 @@ static std::vector<VideoCodec> GetTestList() { ...@@ -996,6 +997,8 @@ static std::vector<VideoCodec> GetTestList() {
test_codecs.push_back(kCodecVP8); test_codecs.push_back(kCodecVP8);
if (MediaCodecUtil::IsVp9DecoderAvailable()) if (MediaCodecUtil::IsVp9DecoderAvailable())
test_codecs.push_back(kCodecVP9); test_codecs.push_back(kCodecVP9);
if (MediaCodecUtil::IsAv1DecoderAvailable())
test_codecs.push_back(kCodecAV1);
return test_codecs; return test_codecs;
} }
...@@ -1013,6 +1016,12 @@ static std::vector<VideoCodec> GetVp8IfAvailable() { ...@@ -1013,6 +1016,12 @@ static std::vector<VideoCodec> GetVp8IfAvailable() {
: std::vector<VideoCodec>(); : std::vector<VideoCodec>();
} }
static std::vector<VideoCodec> GetAv1IfAvailable() {
return MediaCodecUtil::IsAv1DecoderAvailable()
? std::vector<VideoCodec>(1, kCodecAV1)
: std::vector<VideoCodec>();
}
INSTANTIATE_TEST_SUITE_P(MediaCodecVideoDecoderTest, INSTANTIATE_TEST_SUITE_P(MediaCodecVideoDecoderTest,
MediaCodecVideoDecoderTest, MediaCodecVideoDecoderTest,
testing::ValuesIn(GetTestList())); testing::ValuesIn(GetTestList()));
...@@ -1027,4 +1036,8 @@ INSTANTIATE_TEST_SUITE_P(MediaCodecVideoDecoderVp8Test, ...@@ -1027,4 +1036,8 @@ INSTANTIATE_TEST_SUITE_P(MediaCodecVideoDecoderVp8Test,
MediaCodecVideoDecoderVp8Test, MediaCodecVideoDecoderVp8Test,
testing::ValuesIn(GetVp8IfAvailable())); testing::ValuesIn(GetVp8IfAvailable()));
INSTANTIATE_TEST_SUITE_P(MediaCodecVideoDecoderAV1Test,
MediaCodecVideoDecoderAV1Test,
testing::ValuesIn(GetAv1IfAvailable()));
} // namespace media } // namespace media
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 to comment