Skip to content

Commit

Permalink
libaom: enable generation of linux/arm-neon config
Browse files Browse the repository at this point in the history
Use run_perl.py from third_party/libvpx.

Document cmake_update.sh requirements, particularly:
* gcc-arm-linux-gnueabihf
* g++-arm-linux-gnueabihf

Bug: 783519
Change-Id: I091a60cd306e1bea63d4a8ab0b0caacb65ade464
Reviewed-on: https://chromium-review.googlesource.com/1062986
Reviewed-by: Johann Koenig <johannkoenig@google.com>
Commit-Queue: Johann Koenig <johannkoenig@google.com>
Cr-Commit-Position: refs/heads/master@{#559781}
  • Loading branch information
barrbrain authored and Commit Bot committed May 18, 2018
1 parent 3fc99c9 commit 8ba7b05
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ David Fox <david@davidjfox.com>
David Futcher <david.mike.futcher@gmail.com>
David Leen <davileen@amazon.com>
David McAllister <mcdavid@amazon.com>
David Michael Barr <david.barr@samsung.com>
David Spellman <dspell@amazon.com>
Dax Kelson <dkelson@gurulabs.com>
Debashish Samantaray <d.samantaray@samsung.com>
Expand Down
16 changes: 13 additions & 3 deletions third_party/libaom/BUILD.gn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ if (enable_av1_decoder) {

if (current_cpu == "arm") {
if (cpu_arch_full == "arm-neon") {
arm_assembly_sources = libaom_srcs_arm_neon_assembly
arm_assembly_sources = aom_dsp_common_asm_neon
} else if (cpu_arch_full == "arm-neon-cpu-detect") {
arm_assembly_sources = libaom_srcs_arm_neon_cpu_detect_assembly
} else {
Expand All @@ -217,7 +217,7 @@ if (enable_av1_decoder) {
# Converts ARM assembly files to GAS style.
if (current_cpu == "arm" && arm_assembly_sources != []) {
action_foreach("convert_arm_assembly") {
script = "//third_party/libaom/run_perl.py"
script = "//third_party/libvpx/run_perl.py"
sources = arm_assembly_sources
gen_file =
get_label_info("//third_party/libaom/source/libaom", "root_gen_dir") +
Expand Down Expand Up @@ -289,7 +289,17 @@ if (enable_av1_decoder) {
sources = libaom_srcs_mips
} else if (current_cpu == "arm") {
if (arm_use_neon) {
sources = libaom_srcs_arm_neon
sources = aom_av1_common_sources
sources += aom_av1_decoder_sources
sources += aom_dsp_common_sources
sources += aom_dsp_decoder_sources
sources += aom_mem_sources
sources += aom_rtcd_sources
sources += aom_scale_sources
sources += aom_sources
sources += aom_util_sources
sources += aom_av1_common_intrin_neon
sources += aom_dsp_common_intrin_neon
} else if (is_android) {
sources = libaom_srcs_arm_neon_cpu_detect
} else {
Expand Down
18 changes: 18 additions & 0 deletions third_party/libaom/cmake_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# Usage:
# $ ./cmake_update.sh
# Requirements:
# - cmake3
# - yasm or nasm
# Toolchain for armv7:
# -gcc-arm-linux-gnueabihf
# -g++-arm-linux-gnueabihf
# 32bit build environment for cmake. Including but potentially not limited to:
# -lib32gcc-7-dev
# -lib32stdc++-7-dev
Expand Down Expand Up @@ -184,4 +189,17 @@ rm "${CFG}/win/x64/aom_config.h.bak"
egrep "#define [A-Z0-9_]+ [01]" "${CFG}/win/x64/aom_config.h" \
| awk '{print "%define " $2 " " $3}' > "${CFG}/win/x64/aom_config.asm"

cd ..
rm -rf "${TMP}"
mkdir "${TMP}"
cd "${TMP}"

echo "Generate linux/arm-neon config files."
gen_config_files linux/arm-neon "${toolchain}/armv7-linux-gcc.cmake ${all_platforms}"
rm -f "${CFG}/linux/arm-neon"/*
# mkdir required only for initial commit
mkdir -p "${CFG}/linux/arm-neon"
cp aom_config.h aom_config.c aom_config.asm "${CFG}/linux/arm-neon/"
gen_rtcd_header linux/arm-neon armv7

clean

0 comments on commit 8ba7b05

Please sign in to comment.