60 lines
2.2 KiB
Diff
60 lines
2.2 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Sun, 16 Dec 2018 15:24:19 +0100
|
|
Subject: AV1 codec support
|
|
|
|
libaom build fixes (requires -fPIC)
|
|
Report AV1 as playable on Android
|
|
|
|
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
|
---
|
|
third_party/libaom/BUILD.gn | 6 ++++--
|
|
third_party/libaom/libaom_srcs.gni | 5 +++++
|
|
2 files changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
|
|
--- a/third_party/libaom/BUILD.gn
|
|
+++ b/third_party/libaom/BUILD.gn
|
|
@@ -85,7 +85,7 @@ if (current_cpu == "x86" || (current_cpu == "x64" && !is_msan)) {
|
|
sources += aom_dsp_encoder_asm_sse2_x86_64
|
|
sources += aom_dsp_encoder_asm_ssse3_x86_64
|
|
}
|
|
- defines = [ "CHROMIUM" ]
|
|
+ defines = [ "CHROMIUM", "PIC" ]
|
|
include_dirs = libaom_include_dirs
|
|
}
|
|
|
|
@@ -197,7 +197,7 @@ if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
if (current_cpu == "arm") {
|
|
configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
|
|
- cflags = [ "-mfpu=neon" ]
|
|
+ cflags = [ "-mfpu=neon", "-fPIC" ]
|
|
}
|
|
configs += [ ":libaom_config" ]
|
|
|
|
@@ -257,6 +257,8 @@ static_library("libaom") {
|
|
if (current_cpu == "arm64" || cpu_arch_full == "arm-neon" ||
|
|
cpu_arch_full == "arm-neon-cpu-detect") {
|
|
deps += [ ":libaom_intrinsics_neon" ]
|
|
+ # will detect CPU
|
|
+ sources += aom_ports_arm_sources
|
|
}
|
|
if (current_cpu == "arm64" || current_cpu == "arm") {
|
|
# This is needed by all arm boards due to aom_arm_cpu_caps()
|
|
diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
|
|
--- a/third_party/libaom/libaom_srcs.gni
|
|
+++ b/third_party/libaom/libaom_srcs.gni
|
|
@@ -635,6 +635,11 @@ aom_rc_interface_sources = [
|
|
"//third_party/libaom/source/libaom/test/yuv_video_source.h",
|
|
]
|
|
|
|
+aom_ports_arm_sources = [
|
|
+ "//third_party/libaom/source/libaom/aom_ports/arm_cpudetect.c",
|
|
+ "//third_party/libaom/source/libaom/aom_ports/arm.h",
|
|
+ ]
|
|
+
|
|
aom_rtcd_sources = [
|
|
"//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c",
|
|
"//third_party/libaom/source/libaom/aom_scale/aom_scale_rtcd.c",
|
|
--
|
|
2.25.1
|