diff options
Diffstat (limited to '7002_system_av1_support.patch')
-rw-r--r-- | 7002_system_av1_support.patch | 67 |
1 files changed, 20 insertions, 47 deletions
diff --git a/7002_system_av1_support.patch b/7002_system_av1_support.patch index 9954b3f0f8b5..2812a003e815 100644 --- a/7002_system_av1_support.patch +++ b/7002_system_av1_support.patch @@ -8,37 +8,24 @@ Add ability to use system-av1 (media-libs/libaom and media-libs/dav1d) instead o diff --git a/config/external/moz.build b/config/external/moz.build --- a/config/external/moz.build +++ b/config/external/moz.build -@@ -34,18 +34,19 @@ if CONFIG['MOZ_TREMOR']: +@@ -39,9 +39,10 @@ + if not CONFIG["MOZ_SYSTEM_LIBVPX"]: + external_dirs += ["media/libvpx"] - if CONFIG['MOZ_WEBM_ENCODER']: - external_dirs += ['media/libmkv'] - - if not CONFIG['MOZ_SYSTEM_LIBVPX']: - external_dirs += ['media/libvpx'] - - if CONFIG['MOZ_AV1']: -- external_dirs += ['media/libaom'] -- external_dirs += ['media/libdav1d'] +-if CONFIG["MOZ_AV1"]: +- external_dirs += ["media/libaom"] +- external_dirs += ["media/libdav1d"] ++if CONFIG['MOZ_AV1']: + if not CONFIG['MOZ_SYSTEM_AV1']: + external_dirs += ['media/libaom'] + external_dirs += ['media/libdav1d'] - if not CONFIG['MOZ_SYSTEM_PNG']: - external_dirs += ['media/libpng'] - - if not CONFIG['MOZ_SYSTEM_WEBP']: - external_dirs += ['media/libwebp'] - - if CONFIG['CPU_ARCH'] == 'arm': + if not CONFIG["MOZ_SYSTEM_PNG"]: + external_dirs += ["media/libpng"] diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild --- a/config/system-headers.mozbuild +++ b/config/system-headers.mozbuild -@@ -1291,16 +1291,24 @@ else: - 'sys/event.h', - ] - - if CONFIG['MOZ_ENABLE_LIBPROXY']: - system_headers += [ +@@ -1301,6 +1301,14 @@ 'proxy.h', ] @@ -53,43 +40,29 @@ diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild if CONFIG['MOZ_SYSTEM_LIBVPX']: system_headers += [ 'vpx_mem/vpx_mem.h', - 'vpx/svc_context.h', - 'vpx/vp8cx.h', - 'vpx/vp8dx.h', - 'vpx/vpx_codec.h', - 'vpx/vpx_decoder.h', diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build -@@ -76,16 +76,21 @@ if CONFIG['MOZ_AV1']: - EXPORTS += [ - 'agnostic/AOMDecoder.h', - 'agnostic/DAV1DDecoder.h', - ] - UNIFIED_SOURCES += [ - 'agnostic/AOMDecoder.cpp', - 'agnostic/DAV1DDecoder.cpp', +@@ -78,6 +78,12 @@ + "agnostic/AOMDecoder.cpp", + "agnostic/DAV1DDecoder.cpp", ] + if CONFIG['MOZ_SYSTEM_AV1']: + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS'] -+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS'] + CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS'] -+ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] ++ OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS'] ++ - if CONFIG['MOZ_OMX']: + if CONFIG["MOZ_OMX"]: EXPORTS += [ - 'omx/OmxCoreLibLinker.h', - ] - UNIFIED_SOURCES += [ - 'omx/OmxCoreLibLinker.cpp', - ] diff --git a/toolkit/moz.configure b/toolkit/moz.configure --- a/toolkit/moz.configure +++ b/toolkit/moz.configure -@@ -491,7 +491,24 @@ - if value: +@@ -563,7 +563,24 @@ return True + -@depends(target, nasm_version, when=av1 & compile_environment) +option('--with-system-av1', + help="Use system av1 (located with pkgconfig)") @@ -110,5 +83,5 @@ diff --git a/toolkit/moz.configure b/toolkit/moz.configure + +@depends(target, nasm_version, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) def dav1d_asm(target, nasm_version): - if target.cpu == 'aarch64': + if target.cpu == "aarch64": return True |