Commit 80062e8f authored by Jon Kunkee's avatar Jon Kunkee Committed by Commit Bot

[libvpx] Rename ChromeOS configs as HighBD configs

ChromeOS used to be the only ARM target to get a high-bit-depth-capable
VP9 codec. With the introduction of ARM64 Windows, there is a second
such target. This change renames the config files and source lists
for their contents rather than their purpose so they can be easily
reused.

This change also includes a mkdir invocation that makes adding
configurations easier.

Bug: 893460
Change-Id: I0cc7faa0c9330046e63ea7dc412c9c6e6a8a2ff5
Reviewed-on: https://chromium-review.googlesource.com/c/1429520
Commit-Queue: Johann Koenig <johannkoenig@google.com>
Reviewed-by: default avatarJohann Koenig <johannkoenig@google.com>
Cr-Commit-Position: refs/heads/master@{#625811}
parent 81bdcc56
...@@ -20,7 +20,7 @@ if (current_cpu == "x86") { ...@@ -20,7 +20,7 @@ if (current_cpu == "x86") {
} else if (current_cpu == "arm") { } else if (current_cpu == "arm") {
if (is_chromeos) { if (is_chromeos) {
# ChromeOS gets highbd vp9 but other arm targets do not. # ChromeOS gets highbd vp9 but other arm targets do not.
cpu_arch_full = "chromeos-arm-neon" cpu_arch_full = "arm-neon-highbd"
} else if (arm_use_neon) { } else if (arm_use_neon) {
cpu_arch_full = "arm-neon" cpu_arch_full = "arm-neon"
} else if (is_android) { } else if (is_android) {
...@@ -30,8 +30,7 @@ if (current_cpu == "x86") { ...@@ -30,8 +30,7 @@ if (current_cpu == "x86") {
} }
} else { } else {
if (is_chromeos) { if (is_chromeos) {
# ChromeOS on arm64 has an extra switch in generate_gni.sh cpu_arch_full = "arm64-highbd"
cpu_arch_full = "chromeos-arm64"
} else { } else {
cpu_arch_full = current_cpu cpu_arch_full = current_cpu
} }
...@@ -251,8 +250,8 @@ if (cpu_arch_full == "arm-neon-cpu-detect") { ...@@ -251,8 +250,8 @@ if (cpu_arch_full == "arm-neon-cpu-detect") {
if (current_cpu == "arm") { if (current_cpu == "arm") {
if (cpu_arch_full == "arm-neon") { if (cpu_arch_full == "arm-neon") {
arm_assembly_sources = libvpx_srcs_arm_neon_assembly arm_assembly_sources = libvpx_srcs_arm_neon_assembly
} else if (cpu_arch_full == "chromeos-arm-neon") { } else if (cpu_arch_full == "arm-neon-highbd") {
arm_assembly_sources = libvpx_srcs_chromeos_arm_neon_assembly arm_assembly_sources = libvpx_srcs_arm_neon_highbd_assembly
} else if (cpu_arch_full == "arm-neon-cpu-detect") { } else if (cpu_arch_full == "arm-neon-cpu-detect") {
arm_assembly_sources = libvpx_srcs_arm_neon_cpu_detect_assembly arm_assembly_sources = libvpx_srcs_arm_neon_cpu_detect_assembly
} else { } else {
...@@ -293,7 +292,7 @@ if (current_cpu == "arm" && arm_assembly_sources != []) { ...@@ -293,7 +292,7 @@ if (current_cpu == "arm" && arm_assembly_sources != []) {
configs -= [ "//build/config/compiler:compiler_arm_fpu" ] configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
configs += [ ":libvpx_config" ] configs += [ ":libvpx_config" ]
if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect" || if (cpu_arch_full == "arm-neon" || cpu_arch_full == "arm-neon-cpu-detect" ||
cpu_arch_full == "chromeos-arm-neon") { cpu_arch_full == "arm-neon-highbd") {
asmflags = [ "-mfpu=neon" ] asmflags = [ "-mfpu=neon" ]
# allow asm files to include generated sources which match the source # allow asm files to include generated sources which match the source
...@@ -327,7 +326,7 @@ static_library("libvpx") { ...@@ -327,7 +326,7 @@ static_library("libvpx") {
sources = libvpx_srcs_mips sources = libvpx_srcs_mips
} else if (current_cpu == "arm") { } else if (current_cpu == "arm") {
if (is_chromeos) { if (is_chromeos) {
sources = libvpx_srcs_chromeos_arm_neon sources = libvpx_srcs_arm_neon_highbd
} else if (arm_use_neon) { } else if (arm_use_neon) {
sources = libvpx_srcs_arm_neon sources = libvpx_srcs_arm_neon
} else if (is_android) { } else if (is_android) {
...@@ -337,7 +336,7 @@ static_library("libvpx") { ...@@ -337,7 +336,7 @@ static_library("libvpx") {
} }
} else if (current_cpu == "arm64") { } else if (current_cpu == "arm64") {
if (is_chromeos) { if (is_chromeos) {
sources = libvpx_srcs_chromeos_arm64 sources = libvpx_srcs_arm64_highbd
} else { } else {
sources = libvpx_srcs_arm64 sources = libvpx_srcs_arm64
} }
......
...@@ -305,6 +305,7 @@ function gen_config_files { ...@@ -305,6 +305,7 @@ function gen_config_files {
fi fi
fi fi
mkdir -p $BASE_DIR/$LIBVPX_CONFIG_DIR/$1
cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1 cp vpx_config.* $BASE_DIR/$LIBVPX_CONFIG_DIR/$1
make_clean make_clean
rm -rf vpx_config.* rm -rf vpx_config.*
...@@ -348,8 +349,8 @@ gen_config_files linux/arm "--target=armv7-linux-gcc --disable-neon ${all_platfo ...@@ -348,8 +349,8 @@ gen_config_files linux/arm "--target=armv7-linux-gcc --disable-neon ${all_platfo
gen_config_files linux/arm-neon "--target=armv7-linux-gcc ${all_platforms}" gen_config_files linux/arm-neon "--target=armv7-linux-gcc ${all_platforms}"
gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-runtime-cpu-detect ${all_platforms}" gen_config_files linux/arm-neon-cpu-detect "--target=armv7-linux-gcc --enable-runtime-cpu-detect ${all_platforms}"
gen_config_files linux/arm64 "--target=armv8-linux-gcc ${all_platforms}" gen_config_files linux/arm64 "--target=armv8-linux-gcc ${all_platforms}"
gen_config_files linux/chromeos-arm-neon "--target=armv7-linux-gcc ${all_platforms} ${HIGHBD}" gen_config_files linux/arm-neon-highbd "--target=armv7-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/chromeos-arm64 "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}" gen_config_files linux/arm64-highbd "--target=armv8-linux-gcc ${all_platforms} ${HIGHBD}"
gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}" gen_config_files linux/mipsel "--target=mips32-linux-gcc ${all_platforms}"
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}" gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}" gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
...@@ -373,8 +374,8 @@ lint_config linux/arm ...@@ -373,8 +374,8 @@ lint_config linux/arm
lint_config linux/arm-neon lint_config linux/arm-neon
lint_config linux/arm-neon-cpu-detect lint_config linux/arm-neon-cpu-detect
lint_config linux/arm64 lint_config linux/arm64
lint_config linux/chromeos-arm-neon lint_config linux/arm-neon-highbd
lint_config linux/chromeos-arm64 lint_config linux/arm64-highbd
lint_config linux/mipsel lint_config linux/mipsel
lint_config linux/mips64el lint_config linux/mips64el
lint_config linux/generic lint_config linux/generic
...@@ -402,8 +403,8 @@ gen_rtcd_header linux/arm armv7 "--disable-neon --disable-neon_asm" ...@@ -402,8 +403,8 @@ gen_rtcd_header linux/arm armv7 "--disable-neon --disable-neon_asm"
gen_rtcd_header linux/arm-neon armv7 gen_rtcd_header linux/arm-neon armv7
gen_rtcd_header linux/arm-neon-cpu-detect armv7 gen_rtcd_header linux/arm-neon-cpu-detect armv7
gen_rtcd_header linux/arm64 armv8 gen_rtcd_header linux/arm64 armv8
gen_rtcd_header linux/chromeos-arm-neon armv7 gen_rtcd_header linux/arm-neon-highbd armv7
gen_rtcd_header linux/chromeos-arm64 armv8 gen_rtcd_header linux/arm64-highbd armv8
gen_rtcd_header linux/mipsel mipsel gen_rtcd_header linux/mipsel mipsel
gen_rtcd_header linux/mips64el mips64el gen_rtcd_header linux/mips64el mips64el
gen_rtcd_header linux/generic generic gen_rtcd_header linux/generic generic
...@@ -468,17 +469,17 @@ if [ -z $ONLY_CONFIGS ]; then ...@@ -468,17 +469,17 @@ 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 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64
echo "Generate ChromeOS ARM NEON source list." echo "Generate ARM NEON HighBD source list."
config=$(print_config linux/chromeos-arm-neon) config=$(print_config linux/arm-neon-highbd)
make_clean make_clean
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_chromeos_arm_neon convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm_neon_highbd
echo "Generate ChromeOS ARM64 source list." echo "Generate ARM64 HighBD source list."
config=$(print_config linux/chromeos-arm64) config=$(print_config linux/arm64-highbd)
make_clean make_clean
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_chromeos_arm64 convert_srcs_to_project_files libvpx_srcs.txt libvpx_srcs_arm64_highbd
echo "Generate MIPS source list." echo "Generate MIPS source list."
config=$(print_config_basic linux/mipsel) config=$(print_config_basic linux/mipsel)
......
...@@ -2553,7 +2553,7 @@ libvpx_srcs_arm64 = [ ...@@ -2553,7 +2553,7 @@ libvpx_srcs_arm64 = [
"//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h", "//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h",
] ]
libvpx_srcs_arm64_assembly = [] libvpx_srcs_arm64_assembly = []
libvpx_srcs_chromeos_arm_neon = [ libvpx_srcs_arm_neon_highbd = [
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c",
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h",
"//third_party/libvpx/source/libvpx/vp8/common/arm/loopfilter_arm.c", "//third_party/libvpx/source/libvpx/vp8/common/arm/loopfilter_arm.c",
...@@ -2971,7 +2971,7 @@ libvpx_srcs_chromeos_arm_neon = [ ...@@ -2971,7 +2971,7 @@ libvpx_srcs_chromeos_arm_neon = [
"//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.c", "//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.c",
"//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h", "//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h",
] ]
libvpx_srcs_chromeos_arm_neon_assembly = [ libvpx_srcs_arm_neon_highbd_assembly = [
"//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct4x4_1_add_neon.asm", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct4x4_1_add_neon.asm",
"//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct4x4_add_neon.asm", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct4x4_add_neon.asm",
"//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct_neon.asm", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/idct_neon.asm",
...@@ -2991,7 +2991,7 @@ libvpx_srcs_chromeos_arm_neon_assembly = [ ...@@ -2991,7 +2991,7 @@ libvpx_srcs_chromeos_arm_neon_assembly = [
"//third_party/libvpx/source/libvpx/vpx_dsp/arm/vpx_convolve_avg_neon_asm.asm", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/vpx_convolve_avg_neon_asm.asm",
"//third_party/libvpx/source/libvpx/vpx_dsp/arm/vpx_convolve_copy_neon_asm.asm", "//third_party/libvpx/source/libvpx/vpx_dsp/arm/vpx_convolve_copy_neon_asm.asm",
] ]
libvpx_srcs_chromeos_arm64 = [ libvpx_srcs_arm64_highbd = [
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c",
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h",
"//third_party/libvpx/source/libvpx/vp8/common/arm/loopfilter_arm.c", "//third_party/libvpx/source/libvpx/vp8/common/arm/loopfilter_arm.c",
...@@ -3413,7 +3413,7 @@ libvpx_srcs_chromeos_arm64 = [ ...@@ -3413,7 +3413,7 @@ libvpx_srcs_chromeos_arm64 = [
"//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.c", "//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.c",
"//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h", "//third_party/libvpx/source/libvpx/vpx_util/vpx_write_yuv_frame.h",
] ]
libvpx_srcs_chromeos_arm64_assembly = [] libvpx_srcs_arm64_highbd_assembly = []
libvpx_srcs_mips = [ libvpx_srcs_mips = [
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.c",
"//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h", "//third_party/libvpx/source/libvpx/vp8/common/alloccommon.h",
......
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