Commit 6bb83a1d authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

Reland "[libvpx] Use HighBD config for ARM64 Mac" with fix

This reverts commit 87c8ae14.

Reason for revert: Reland with fix

Change-Id: I2778e8a68ba0c804b7795cade0ca9f8ed69838cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435781Reviewed-by: default avatarJames Zern <jzern@google.com>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811501}
parent 55138770
...@@ -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
......
...@@ -28,12 +28,14 @@ if (current_cpu == "x86") { ...@@ -28,12 +28,14 @@ if (current_cpu == "x86") {
} else { } else {
cpu_arch_full = "arm" cpu_arch_full = "arm"
} }
} else { } else if (current_cpu == "arm64") {
if (is_chromeos) { if (is_chromeos || is_win || is_mac) {
cpu_arch_full = "arm64-highbd" cpu_arch_full = "arm64-highbd"
} else { } else {
cpu_arch_full = current_cpu cpu_arch_full = current_cpu
} }
} else {
cpu_arch_full = current_cpu
} }
if (is_nacl) { if (is_nacl) {
...@@ -331,7 +333,7 @@ static_library("libvpx") { ...@@ -331,7 +333,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