Explorar o código

AV1-codec-support.patch

none %!s(int64=4) %!d(string=hai) anos
pai
achega
ea79fdccf8

+ 28 - 51
build/patches/AV1-codec-support.patch

@@ -4,43 +4,10 @@ Subject: AV1 codec support
 
 libaom build fixes (requires -fPIC)
 Report AV1 as playable on Android
+FILE:AV1-codec-support.patch
 ---
- media/base/mime_util_internal.cc                            | 6 +++++-
- third_party/libaom/BUILD.gn                                 | 6 ++++--
- third_party/libaom/libaom_srcs.gni                          | 5 +++++
- .../config/linux/arm-neon-cpu-detect/config/aom_config.asm  | 2 +-
- .../config/linux/arm-neon-cpu-detect/config/aom_config.h    | 2 +-
- .../source/config/linux/arm-neon/config/aom_config.asm      | 2 +-
- .../libaom/source/config/linux/arm-neon/config/aom_config.h | 2 +-
- .../libaom/source/config/linux/arm/config/aom_config.asm    | 2 +-
- .../libaom/source/config/linux/arm/config/aom_config.h      | 2 +-
- .../libaom/source/config/linux/arm64/config/aom_config.asm  | 2 +-
- .../libaom/source/config/linux/arm64/config/aom_config.h    | 2 +-
- .../source/config/linux/generic/config/aom_config.asm       | 2 +-
- .../libaom/source/config/linux/generic/config/aom_config.h  | 2 +-
- .../libaom/source/config/linux/x64/config/aom_config.asm    | 2 +-
- .../libaom/source/config/linux/x64/config/aom_config.h      | 2 +-
- 15 files changed, 26 insertions(+), 15 deletions(-)
-
-diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc
---- a/media/base/mime_util_internal.cc
-+++ b/media/base/mime_util_internal.cc
-@@ -565,9 +565,13 @@ bool MimeUtil::IsCodecSupportedOnAndroid(
-     case THEORA:
-       return false;
- 
--    // AV1 is not supported on Android yet.
-+    // AV1 is supported on Android.
-     case AV1:
-+#if BUILDFLAG(ENABLE_AV1_DECODER)
-+      return true;
-+#else
-       return false;
-+#endif
- 
-     // ----------------------------------------------------------------------
-     // The remaining codecs may be supported depending on platform abilities.
 diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
+index 0f80365e15..2607c0a4f6 100644
 --- a/third_party/libaom/BUILD.gn
 +++ b/third_party/libaom/BUILD.gn
 @@ -81,7 +81,7 @@ if (enable_libaom) {
@@ -71,9 +38,10 @@ diff --git a/third_party/libaom/BUILD.gn b/third_party/libaom/BUILD.gn
      if (is_android) {
        deps += [ "//third_party/android_ndk:cpu_features" ]
 diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
+index eb6fce5a02..d6b55aff13 100644
 --- a/third_party/libaom/libaom_srcs.gni
 +++ b/third_party/libaom/libaom_srcs.gni
-@@ -672,6 +672,11 @@ aom_mem_sources = [
+@@ -616,6 +616,11 @@ aom_mem_sources = [
  
  aom_ports_asm_x86 = [ "//third_party/libaom/source/libaom/aom_ports/emms.asm" ]
  
@@ -86,6 +54,7 @@ diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs
    "//third_party/libaom/source/libaom/aom_dsp/aom_dsp_rtcd.c",
    "//third_party/libaom/source/libaom/aom_scale/aom_scale_rtcd.c",
 diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
+index c49e1dd9b0..b0e18e4f09 100644
 --- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.asm
 @@ -45,7 +45,7 @@ CONFIG_NN_V2 equ 0
@@ -95,9 +64,10 @@ diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/a
 -CONFIG_PIC equ 0
 +CONFIG_PIC equ 1
  CONFIG_RD_DEBUG equ 0
- CONFIG_REALTIME_ONLY equ 0
+ CONFIG_REALTIME_ONLY equ 1
  CONFIG_RUNTIME_CPU_DETECT equ 1
 diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
+index 8b5fb4a8d1..c3f85738c7 100644
 --- a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -107,9 +77,10 @@ diff --git a/third_party/libaom/source/config/linux/arm-neon-cpu-detect/config/a
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 1
 diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
+index 8fbd732de8..ce94f92545 100644
 --- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.asm
 @@ -45,7 +45,7 @@ CONFIG_NN_V2 equ 0
@@ -119,9 +90,10 @@ diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.a
 -CONFIG_PIC equ 0
 +CONFIG_PIC equ 1
  CONFIG_RD_DEBUG equ 0
- CONFIG_REALTIME_ONLY equ 0
+ CONFIG_REALTIME_ONLY equ 1
  CONFIG_RUNTIME_CPU_DETECT equ 0
 diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
+index fa9522d112..b38feccbfc 100644
 --- a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -131,9 +103,10 @@ diff --git a/third_party/libaom/source/config/linux/arm-neon/config/aom_config.h
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 0
 diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.asm b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
+index 27aeefe967..d30cc99333 100644
 --- a/third_party/libaom/source/config/linux/arm/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/arm/config/aom_config.asm
 @@ -45,7 +45,7 @@ CONFIG_NN_V2 equ 0
@@ -143,9 +116,10 @@ diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.asm b/
 -CONFIG_PIC equ 0
 +CONFIG_PIC equ 1
  CONFIG_RD_DEBUG equ 0
- CONFIG_REALTIME_ONLY equ 0
+ CONFIG_REALTIME_ONLY equ 1
  CONFIG_RUNTIME_CPU_DETECT equ 0
 diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.h b/third_party/libaom/source/config/linux/arm/config/aom_config.h
+index 95d58ab7c0..3993f581fb 100644
 --- a/third_party/libaom/source/config/linux/arm/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/arm/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -155,9 +129,10 @@ diff --git a/third_party/libaom/source/config/linux/arm/config/aom_config.h b/th
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 0
 diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
+index 8fbd732de8..ce94f92545 100644
 --- a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
 @@ -45,7 +45,7 @@ CONFIG_NN_V2 equ 0
@@ -167,9 +142,10 @@ diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.asm
 -CONFIG_PIC equ 0
 +CONFIG_PIC equ 1
  CONFIG_RD_DEBUG equ 0
- CONFIG_REALTIME_ONLY equ 0
+ CONFIG_REALTIME_ONLY equ 1
  CONFIG_RUNTIME_CPU_DETECT equ 0
 diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.h b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
+index fa9522d112..b38feccbfc 100644
 --- a/third_party/libaom/source/config/linux/arm64/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/arm64/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -179,9 +155,10 @@ diff --git a/third_party/libaom/source/config/linux/arm64/config/aom_config.h b/
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 0
 diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.asm b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
+index a7bc0cbac0..89d5d4e981 100644
 --- a/third_party/libaom/source/config/linux/generic/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/generic/config/aom_config.asm
 @@ -45,7 +45,7 @@ CONFIG_NN_V2 equ 0
@@ -191,9 +168,10 @@ diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.as
 -CONFIG_PIC equ 0
 +CONFIG_PIC equ 1
  CONFIG_RD_DEBUG equ 0
- CONFIG_REALTIME_ONLY equ 0
+ CONFIG_REALTIME_ONLY equ 1
  CONFIG_RUNTIME_CPU_DETECT equ 1
 diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.h b/third_party/libaom/source/config/linux/generic/config/aom_config.h
+index fe497f6fc3..0218addbf3 100644
 --- a/third_party/libaom/source/config/linux/generic/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/generic/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -203,9 +181,10 @@ diff --git a/third_party/libaom/source/config/linux/generic/config/aom_config.h
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 1
 diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.asm b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
+index 212b2826b9..105da6604e 100644
 --- a/third_party/libaom/source/config/linux/x64/config/aom_config.asm
 +++ b/third_party/libaom/source/config/linux/x64/config/aom_config.asm
 @@ -35,7 +35,7 @@
@@ -215,9 +194,10 @@ diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.asm b/
 -%define CONFIG_PIC 0
 +%define CONFIG_PIC 1
  %define CONFIG_RD_DEBUG 0
- %define CONFIG_REALTIME_ONLY 0
+ %define CONFIG_REALTIME_ONLY 1
  %define CONFIG_RUNTIME_CPU_DETECT 1
 diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.h b/third_party/libaom/source/config/linux/x64/config/aom_config.h
+index 592d1f7e93..5d523a8222 100644
 --- a/third_party/libaom/source/config/linux/x64/config/aom_config.h
 +++ b/third_party/libaom/source/config/linux/x64/config/aom_config.h
 @@ -47,7 +47,7 @@
@@ -227,8 +207,5 @@ diff --git a/third_party/libaom/source/config/linux/x64/config/aom_config.h b/th
 -#define CONFIG_PIC 0
 +#define CONFIG_PIC 1
  #define CONFIG_RD_DEBUG 0
- #define CONFIG_REALTIME_ONLY 0
+ #define CONFIG_REALTIME_ONLY 1
  #define CONFIG_RUNTIME_CPU_DETECT 1
--- 
-2.17.1
-

+ 1 - 1
build/patches/Enable-fwrapv-in-Clang-for-non-UBSan-builds.patch

@@ -42,7 +42,7 @@ Excerpt from https://github.com/bromite/bromite/issues/226
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
-@@ -286,6 +286,10 @@ config("compiler") {
+@@ -311,6 +311,10 @@ config("compiler") {
        }
      }
  

+ 2 - 2
build/patches/Switch-to-fstack-protector-strong.patch

@@ -16,10 +16,10 @@ higher memory/cache usage but not by the full 2-3%.
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
-@@ -277,16 +277,12 @@ config("compiler") {
+@@ -294,16 +294,12 @@ config("compiler") {
          cflags += [ "-fstack-protector" ]
        }
-     } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+     } else if ((is_posix && !is_chromeos_ash && !is_nacl) || is_fuchsia) {
 -      # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
 -      # See also https://crbug.com/533294
 -      cflags += [ "--param=ssp-buffer-size=4" ]

+ 4 - 4
build/patches/build-remove-calling-untrusted-hooks.patch

@@ -20,7 +20,7 @@ diff --git a/DEPS b/DEPS
  
    # By default, do not check out src-internal. This can be overridden e.g. with
    # custom_vars.
-@@ -128,8 +128,8 @@ vars = {
+@@ -124,8 +124,8 @@ vars = {
    # support for other platforms may be added in the future.
    'checkout_openxr' : 'checkout_win',
  
@@ -31,7 +31,7 @@ diff --git a/DEPS b/DEPS
  
    # By default bot checkouts the WPR archive files only when this
    # flag is set True.
-@@ -4192,49 +4192,6 @@ hooks = [
+@@ -4204,49 +4204,6 @@ hooks = [
          'sync', '--extract',
      ],
    },
@@ -81,7 +81,7 @@ diff --git a/DEPS b/DEPS
    {
      # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
      'name': 'ciopfs_linux',
-@@ -4357,18 +4314,6 @@ hooks = [
+@@ -4377,18 +4334,6 @@ hooks = [
                  '-s', 'src/buildtools/mac/clang-format.sha1',
      ],
    },
@@ -100,7 +100,7 @@ diff --git a/DEPS b/DEPS
    # Pull rc binaries using checked-in hashes.
    {
      'name': 'rc_win',
-@@ -4394,29 +4339,6 @@ hooks = [
+@@ -4414,29 +4359,6 @@ hooks = [
                  '-s', 'src/build/toolchain/win/rc/mac/rc.sha1',
      ],
    },