0

media: disable global VA-API lock in video decoder/encoder binary tests

This CL removes the option to disable the VA-API lock (--disable_vaapi_lock)
when running the video binary tests:
video_decode_accelerator_tests
video_decode_accelerator_perf_tests
video_encode_accelerator_tests
video_encode_accelerator_perf_tests

The tests now run with the VA-API lock always disabled.

Bug: b:302410246
Test: ran binaries on hatch
Change-Id: I20cfee3e07e3ab20604887061154b4c8217df178
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4911660
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Pilar Molina Lopez <pmolinalopez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1205621}
This commit is contained in:
Pilar Molina Lopez
2023-10-05 02:34:10 +00:00
committed by Chromium LUCI CQ
parent 3d53835e5e
commit 3b1dbedf0d
8 changed files with 13 additions and 57 deletions

@ -107,12 +107,6 @@ Multiple command line arguments can be given to the command:
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).
--gtest_help display the gtest help and exit.
--help display this help and exit.

@ -89,12 +89,6 @@ Multiple command line arguments can be given to the command:
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).
--gtest_help display the gtest help and exit.
--help display this help and exit.

@ -93,12 +93,6 @@ Non-performance tests only:
supported formats are \"png\" (default) and
\"yuv\".
--output_limit limit the number of images saved to disk.
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).
## Source code
See the video encoder tests [source code](https://cs.chromium.org/chromium/src/media/gpu/video_encode_accelerator_tests.cc).

@ -36,7 +36,6 @@ constexpr const char* usage_msg =
[-v=<level>] [--vmodule=<config>] [--output_folder]
([--use-legacy]|[--use_vd_vda]) [--linear_output]
[--use-gl=<backend>] [--ozone-platform=<platform>]
[--disable_vaapi_lock]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
)";
@ -75,13 +74,7 @@ The following arguments are supported:
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).)""") +
x11, drm, wayland, and headless.)""") +
#if defined(ARCH_CPU_ARM_FAMILY)
R"""(
--disable-libyuv use hw format conversion instead of libYUV.
@ -496,8 +489,6 @@ int main(int argc, char** argv) {
implementation = media::test::DecoderImplementation::kVDVDA;
} else if (it->first == "linear_output") {
linear_output = true;
} else if (it->first == "disable_vaapi_lock") {
disabled_features.push_back(media::kGlobalVaapiLock);
#if defined(ARCH_CPU_ARM_FAMILY)
} else if (it->first == "disable-libyuv") {
enabled_features.clear();
@ -509,6 +500,8 @@ int main(int argc, char** argv) {
}
}
disabled_features.push_back(media::kGlobalVaapiLock);
if (use_legacy && use_vd_vda) {
std::cout << "--use-legacy and --use_vd_vda cannot be enabled together.\n"
<< media::test::usage_msg;

@ -55,7 +55,6 @@ constexpr const char* usage_msg =
[--output_limit=<number>] [--output_folder=<folder>]
[--linear_output] ([--use-legacy]|[--use_vd_vda])
[--use-gl=<backend>] [--ozone-platform=<platform>]
[--disable_vaapi_lock]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
)";
@ -102,13 +101,7 @@ The following arguments are supported:
swiftshader (software rendering)
--ozone-platform specify which Ozone platform to use, possible values
depend on build configuration but normally include
x11, drm, wayland, and headless
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).)""") +
x11, drm, wayland, and headless.)""") +
#if defined(ARCH_CPU_ARM_FAMILY)
R"""(
--disable-libyuv use hw format conversion instead of libYUV.
@ -816,8 +809,6 @@ int main(int argc, char** argv) {
implementation = media::test::DecoderImplementation::kVDVDA;
} else if (it->first == "linear_output") {
linear_output = true;
} else if (it->first == "disable_vaapi_lock") {
disabled_features.push_back(media::kGlobalVaapiLock);
#if defined(ARCH_CPU_ARM_FAMILY)
} else if (it->first == "disable-libyuv") {
enabled_features.clear();
@ -829,6 +820,8 @@ int main(int argc, char** argv) {
}
}
disabled_features.push_back(media::kGlobalVaapiLock);
if (use_legacy && use_vd_vda) {
std::cout << "--use-legacy and --use_vd_vda cannot be enabled together.\n"
<< media::test::usage_msg;

@ -48,7 +48,6 @@ constexpr const char* usage_msg =
[--bitrate_mode=(cbr|vbr)] [--reverse] [--bitrate=<bitrate>]
[-v=<level>] [--vmodule=<config>] [--output_folder]
[--output_bitstream]
[--disable_vaapi_lock]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
)";
@ -95,12 +94,6 @@ The following arguments are supported:
--output_bitstream save the output bitstream in either H264 AnnexB
format (for H264) or IVF format (for vp8 and
vp9) to <output_folder>/<testname>.
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).
--gtest_help display the gtest help and exit.
--help display this help and exit.
@ -1027,8 +1020,6 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
encode_bitrate = base::checked_cast<uint32_t>(value);
} else if (it->first == "disable_vaapi_lock") {
disabled_features.push_back(media::kGlobalVaapiLock);
} else if (it->first == "speed") {
test_type =
media::test::VideoEncoderTestEnvironment::TestType::kSpeedPerformance;
@ -1042,6 +1033,8 @@ int main(int argc, char** argv) {
}
}
disabled_features.push_back(media::kGlobalVaapiLock);
if (test_type ==
media::test::VideoEncoderTestEnvironment::TestType::kValidation) {
std::cout << "--speed or --quality must be specified\n"

@ -47,7 +47,7 @@ constexpr const char* usage_msg =
[--disable_validator] [--psnr_threshold=<number>]
[--output_bitstream] [--output_images=(all|corrupt)]
[--output_format=(png|yuv)] [--output_folder=<filepath>]
[--output_limit=<number>] [--disable_vaapi_lock]
[--output_limit=<number>]
[-v=<level>] [--vmodule=<config>]
[--gtest_help] [--help]
[<video path>] [<video metadata path>]
@ -103,12 +103,6 @@ The following arguments are supported:
--output_limit limit the number of images saved to disk.
--output_folder set the basic folder used to store test
artifacts. The default is the current directory.
--disable_vaapi_lock disable the global VA-API lock if applicable,
i.e., only on devices that use the VA-API with a libva
backend that's known to be thread-safe and only in
portions of the Chrome stack that should be able to
deal with the absence of the lock
(not the VaapiVideoDecodeAccelerator).
--gtest_help display the gtest help and exit.
--help display this help and exit.
@ -910,8 +904,6 @@ int main(int argc, char** argv) {
}
} else if (it->first == "output_folder") {
output_folder = base::FilePath(it->second);
} else if (it->first == "disable_vaapi_lock") {
disabled_features.push_back(media::kGlobalVaapiLock);
} else {
std::cout << "unknown option: --" << it->first << "\n"
<< media::test::usage_msg;
@ -919,6 +911,8 @@ int main(int argc, char** argv) {
}
}
disabled_features.push_back(media::kGlobalVaapiLock);
testing::InitGoogleTest(&argc, argv);
// Set up our test environment.

@ -65,7 +65,8 @@ VideoTestEnvironment::VideoTestEnvironment(
#endif
#if BUILDFLAG(USE_VAAPI)
media::VaapiWrapper::PreSandboxInitialization();
media::VaapiWrapper::PreSandboxInitialization(
/*allow_disabling_global_lock=*/true);
#endif
}