Commit 22e4c40d authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

[libvpx] Use HighBD config for ARM64 Mac

Also adds unit tests to cover HighBD support on various platforms.

Bug: 1128445
Change-Id: I9951a49f0fca311f48ff55c1618f3d18343dfca8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427556
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarJames Zern <jzern@google.com>
Cr-Commit-Position: refs/heads/master@{#810904}
parent 7f5054b4
...@@ -156,6 +156,28 @@ TEST(SupportedTypesTest, IsSupportedVideoType_VP9Matrix) { ...@@ -156,6 +156,28 @@ TEST(SupportedTypesTest, IsSupportedVideoType_VP9Matrix) {
EXPECT_EQ(kSupportedMatrix.size(), num_found); EXPECT_EQ(kSupportedMatrix.size(), num_found);
} }
TEST(SupportedTypesTest, IsSupportedVideoType_VP9Profiles) {
// Default to common 709.
const VideoColorSpace kColorSpace = VideoColorSpace::REC709();
// Some codecs do not have a notion of level.
const int kUnspecifiedLevel = 0;
EXPECT_TRUE(IsSupportedVideoType(
{kCodecVP9, VP9PROFILE_PROFILE0, kUnspecifiedLevel, kColorSpace}));
EXPECT_TRUE(IsSupportedVideoType(
{kCodecVP9, VP9PROFILE_PROFILE1, kUnspecifiedLevel, kColorSpace}));
// VP9 Profile2 are supported on x86, ChromeOS on ARM and Mac/Win on ARM64.
// See third_party/libvpx/BUILD.gn.
#if defined(ARCH_CPU_X86_FAMILY) || \
(defined(ARCH_CPU_ARM_FAMILY) && defined(OS_CHROMEOS)) || \
(defined(ARCH_CPU_ARM64) && (defined(OS_MAC) || defined(OS_WIN)))
EXPECT_TRUE(IsSupportedVideoType(
{kCodecVP9, VP9PROFILE_PROFILE2, kUnspecifiedLevel, kColorSpace}));
#endif
}
TEST(SupportedTypesTest, IsSupportedAudioTypeWithSpatialRenderingBasics) { TEST(SupportedTypesTest, IsSupportedAudioTypeWithSpatialRenderingBasics) {
const bool is_spatial_rendering = true; const bool is_spatial_rendering = true;
// Dolby Atmos = E-AC3 (Dolby Digital Plus) + spatialRendering. Currently not // Dolby Atmos = E-AC3 (Dolby Digital Plus) + spatialRendering. Currently not
......
...@@ -331,7 +331,7 @@ static_library("libvpx") { ...@@ -331,7 +331,7 @@ static_library("libvpx") {
sources = libvpx_srcs_arm sources = libvpx_srcs_arm
} }
} else if (current_cpu == "arm64") { } else if (current_cpu == "arm64") {
if (is_chromeos || is_win) { if (is_chromeos || is_win || is_mac) {
sources = libvpx_srcs_arm64_highbd sources = libvpx_srcs_arm64_highbd
} else { } else {
sources = libvpx_srcs_arm64 sources = libvpx_srcs_arm64
......
...@@ -490,7 +490,7 @@ if [ -z $ONLY_CONFIGS ]; then ...@@ -490,7 +490,7 @@ if [ -z $ONLY_CONFIGS ]; then
make libvpx_srcs.txt target=libs $config > /dev/null make libvpx_srcs.txt target=libs $config > /dev/null
convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64_highbd convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64_highbd
echo "ARM64 Windows uses the ARM64 Linux HighBD source list. No need to generate it." echo "ARM64 Windows and Mac use the ARM64 Linux HighBD source list. No need to generate it."
echo "Generate MIPS source list." echo "Generate MIPS source list."
config=$(print_config_basic linux/mipsel) config=$(print_config_basic linux/mipsel)
......
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