зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1493400 - Create build files for dav1d. r=firefox-build-system-reviewers,chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D12163 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8046b715cd
Коммит
e821d283fa
|
@ -38,6 +38,7 @@ if not CONFIG['MOZ_SYSTEM_LIBVPX']:
|
|||
|
||||
if CONFIG['MOZ_AV1']:
|
||||
external_dirs += ['media/libaom']
|
||||
external_dirs += ['media/libdav1d']
|
||||
|
||||
if not CONFIG['MOZ_SYSTEM_PNG']:
|
||||
external_dirs += ['media/libpng']
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 1
|
||||
|
||||
#define ARCH_ARM 0
|
||||
|
||||
#define ARCH_X86 0
|
||||
|
||||
#define ARCH_X86_32 0
|
||||
|
||||
#define ARCH_X86_64 0
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 0
|
||||
|
||||
#define ARCH_ARM 1
|
||||
|
||||
#define ARCH_X86 0
|
||||
|
||||
#define ARCH_X86_32 0
|
||||
|
||||
#define ARCH_X86_64 0
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_MEMALIGN 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 0
|
||||
|
||||
#define ARCH_ARM 0
|
||||
|
||||
#define ARCH_X86 1
|
||||
|
||||
#define ARCH_X86_32 1
|
||||
|
||||
#define ARCH_X86_64 0
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_MEMALIGN 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 0
|
||||
|
||||
#define ARCH_ARM 0
|
||||
|
||||
#define ARCH_X86 1
|
||||
|
||||
#define ARCH_X86_32 1
|
||||
|
||||
#define ARCH_X86_64 0
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 0
|
||||
|
||||
#define ARCH_ARM 0
|
||||
|
||||
#define ARCH_X86 1
|
||||
|
||||
#define ARCH_X86_32 0
|
||||
|
||||
#define ARCH_X86_64 1
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_POSIX_MEMALIGN 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Autogenerated by the Meson build system.
|
||||
* Do not edit, your changes will be lost.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ARCH_AARCH64 0
|
||||
|
||||
#define ARCH_ARM 0
|
||||
|
||||
#define ARCH_X86 1
|
||||
|
||||
#define ARCH_X86_32 0
|
||||
|
||||
#define ARCH_X86_64 1
|
||||
|
||||
#define CONFIG_10BPC 1
|
||||
|
||||
#define CONFIG_8BPC 1
|
||||
|
||||
#define HAVE_ASM 0
|
||||
|
||||
#define HAVE_ALIGNED_MALLOC 1
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#define STACK_ALIGNMENT 32
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
#define VERSION_NUMBER 0,0,1,0
|
||||
#define VERSION_NUMBER_STR "0.0.1.0"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
1 VERSIONINFO
|
||||
FILETYPE VFT_DLL
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
PRODUCTVERSION VERSION_NUMBER
|
||||
FILEVERSION VERSION_NUMBER
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "VideoLAN"
|
||||
VALUE "ProductName", "dav1d"
|
||||
VALUE "ProductVersion", VERSION_NUMBER_STR
|
||||
VALUE "FileVersion", VERSION_NUMBER_STR
|
||||
VALUE "FileDescription", "dav1d AV1 decoder"
|
||||
VALUE "InternalName", "dav1d"
|
||||
VALUE "OriginalFilename", "libdav1d.dll"
|
||||
VALUE "LegalCopyright", "Copyright \251 2018 VideoLAN and dav1d Authors"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
|
@ -0,0 +1,11 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
def add_define(out_file, in_path, expr, num = ''):
|
||||
out_file.write('#define %s %s\n' % (expr, num))
|
||||
with open(in_path, 'r') as fh:
|
||||
out_file.write(fh.read())
|
|
@ -0,0 +1,181 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
Library('dav1d')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/third_party/dav1d',
|
||||
'/third_party/dav1d/include',
|
||||
'/third_party/dav1d/include/dav1d',
|
||||
]
|
||||
|
||||
if CONFIG['CPU_ARCH'] == 'x86':
|
||||
if CONFIG['OS_TARGET'] == 'Android':
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/x86_32/android/']
|
||||
EXPORTS.dav1d += ['config/x86_32/android/config.h']
|
||||
else:
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/x86_32/']
|
||||
EXPORTS.dav1d += ['config/x86_32/config.h']
|
||||
elif CONFIG['CPU_ARCH'] == 'x86_64':
|
||||
if CONFIG['MOZ_ASAN'] and CONFIG['OS_TARGET'] == 'WINNT':
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/x86_64/win_asan/']
|
||||
EXPORTS.dav1d += ['config/x86_64/win_asan/config.h']
|
||||
else:
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/x86_64/']
|
||||
EXPORTS.dav1d += ['config/x86_64/config.h']
|
||||
elif CONFIG['CPU_ARCH'] == 'arm':
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/arm/']
|
||||
EXPORTS.dav1d += ['config/arm/config.h']
|
||||
elif CONFIG['CPU_ARCH'] == 'aarch64':
|
||||
LOCAL_INCLUDES += ['/media/libdav1d/config/aarch64/']
|
||||
EXPORTS.dav1d += ['config/aarch64/config.h']
|
||||
|
||||
EXPORTS.dav1d += [
|
||||
'version.h',
|
||||
]
|
||||
|
||||
# entrypoint source files
|
||||
SOURCES += [
|
||||
'../../third_party/dav1d/src/lib.c',
|
||||
'../../third_party/dav1d/src/thread_task.c',
|
||||
]
|
||||
|
||||
# common sources
|
||||
SOURCES += [
|
||||
'../../third_party/dav1d/src/cdf.c',
|
||||
'../../third_party/dav1d/src/cpu.c',
|
||||
'../../third_party/dav1d/src/data.c',
|
||||
'../../third_party/dav1d/src/decode.c',
|
||||
'../../third_party/dav1d/src/dequant_tables.c',
|
||||
'../../third_party/dav1d/src/getbits.c',
|
||||
'../../third_party/dav1d/src/intra_edge.c',
|
||||
'../../third_party/dav1d/src/lf_mask.c',
|
||||
'../../third_party/dav1d/src/msac.c',
|
||||
'../../third_party/dav1d/src/obu.c',
|
||||
'../../third_party/dav1d/src/picture.c',
|
||||
'../../third_party/dav1d/src/qm.c',
|
||||
'../../third_party/dav1d/src/ref.c',
|
||||
'../../third_party/dav1d/src/ref_mvs.c',
|
||||
'../../third_party/dav1d/src/scan.c',
|
||||
'../../third_party/dav1d/src/tables.c',
|
||||
'../../third_party/dav1d/src/warpmv.c',
|
||||
'../../third_party/dav1d/src/wedge.c',
|
||||
]
|
||||
|
||||
# includes src
|
||||
EXPORTS.dav1d.src += [
|
||||
'../../third_party/dav1d/src/cdf.h',
|
||||
'../../third_party/dav1d/src/cpu.h',
|
||||
'../../third_party/dav1d/src/ctx.h',
|
||||
'../../third_party/dav1d/src/data.h',
|
||||
'../../third_party/dav1d/src/decode.h',
|
||||
'../../third_party/dav1d/src/dequant_tables.h',
|
||||
'../../third_party/dav1d/src/getbits.h',
|
||||
'../../third_party/dav1d/src/intra_edge.h',
|
||||
'../../third_party/dav1d/src/lf_mask.h',
|
||||
'../../third_party/dav1d/src/msac.h',
|
||||
'../../third_party/dav1d/src/obu.h',
|
||||
'../../third_party/dav1d/src/picture.h',
|
||||
'../../third_party/dav1d/src/qm.h',
|
||||
'../../third_party/dav1d/src/ref.h',
|
||||
'../../third_party/dav1d/src/ref_mvs.h',
|
||||
'../../third_party/dav1d/src/scan.h',
|
||||
'../../third_party/dav1d/src/tables.h',
|
||||
'../../third_party/dav1d/src/thread.h',
|
||||
'../../third_party/dav1d/src/warpmv.h',
|
||||
'../../third_party/dav1d/src/wedge.h',
|
||||
]
|
||||
|
||||
# common BITDEPTH 8, 10
|
||||
relative_path = '../../third_party/dav1d/src/'
|
||||
bitdepth_basenames = [
|
||||
'cdef_apply_tmpl.c',
|
||||
'cdef_tmpl.c',
|
||||
'ipred_prepare_tmpl.c',
|
||||
'ipred_tmpl.c',
|
||||
'itx_tmpl.c',
|
||||
'lf_apply_tmpl.c',
|
||||
'loopfilter_tmpl.c',
|
||||
'looprestoration_tmpl.c',
|
||||
'lr_apply_tmpl.c',
|
||||
'mc_tmpl.c',
|
||||
'recon_tmpl.c'
|
||||
]
|
||||
|
||||
GENERATED_FILES += [
|
||||
'10bd_%s' % p for p in bitdepth_basenames
|
||||
]
|
||||
|
||||
for f in bitdepth_basenames:
|
||||
a = GENERATED_FILES['10bd_%s' % f]
|
||||
a.script = 'generate_source.py:add_define'
|
||||
a.inputs = [relative_path + f]
|
||||
a.flags = ['BITDEPTH', '10']
|
||||
|
||||
GENERATED_FILES += [
|
||||
'8bd_%s' % p for p in bitdepth_basenames
|
||||
]
|
||||
|
||||
for f in bitdepth_basenames:
|
||||
a = GENERATED_FILES['8bd_%s' % f]
|
||||
a.script = 'generate_source.py:add_define'
|
||||
a.inputs = [relative_path + f]
|
||||
a.flags = ['BITDEPTH', '8']
|
||||
|
||||
SOURCES += [
|
||||
'!%s' % p for p in GENERATED_FILES if p.endswith('.c')
|
||||
]
|
||||
|
||||
EXPORTS.dav1d.src += [
|
||||
'../../third_party/dav1d/src/cdef.h',
|
||||
'../../third_party/dav1d/src/cdef_apply.h',
|
||||
'../../third_party/dav1d/src/ipred.h',
|
||||
'../../third_party/dav1d/src/ipred_prepare.h',
|
||||
'../../third_party/dav1d/src/itx.h',
|
||||
'../../third_party/dav1d/src/lf_apply.h',
|
||||
'../../third_party/dav1d/src/loopfilter.h',
|
||||
'../../third_party/dav1d/src/looprestoration.h',
|
||||
'../../third_party/dav1d/src/lr_apply.h',
|
||||
'../../third_party/dav1d/src/mc.h',
|
||||
'../../third_party/dav1d/src/recon.h',
|
||||
]
|
||||
|
||||
# include/common
|
||||
EXPORTS.dav1d += [
|
||||
'../../third_party/dav1d/include/common/attributes.h',
|
||||
'../../third_party/dav1d/include/common/bitdepth.h',
|
||||
'../../third_party/dav1d/include/common/dump.h',
|
||||
'../../third_party/dav1d/include/common/intops.h',
|
||||
'../../third_party/dav1d/include/common/mem.h',
|
||||
'../../third_party/dav1d/include/common/validate.h',
|
||||
]
|
||||
|
||||
# include/dav1d
|
||||
EXPORTS.dav1d += [
|
||||
'../../third_party/dav1d/include/dav1d/common.h',
|
||||
'../../third_party/dav1d/include/dav1d/data.h',
|
||||
'../../third_party/dav1d/include/dav1d/dav1d.h',
|
||||
'../../third_party/dav1d/include/dav1d/picture.h',
|
||||
]
|
||||
|
||||
if CONFIG['OS_TARGET'] == 'WINNT':
|
||||
RCFILE = 'dav1d.rc'
|
||||
SOURCES += [
|
||||
'../../third_party/dav1d/src/win32/thread.c'
|
||||
]
|
||||
|
||||
if CONFIG['CC_TYPE'] == 'msvc':
|
||||
LOCAL_INCLUDES += ['../../third_party/dav1d/include/compat/msvc/']
|
||||
EXPORTS.dav1d += ['../../third_party/dav1d/include/compat/msvc/stdatomic.h']
|
||||
|
||||
if CONFIG['CC_TYPE'] == 'gcc':
|
||||
LOCAL_INCLUDES += ['../../third_party/dav1d/include/compat/gcc/']
|
||||
EXPORTS.dav1d += ['../../third_party/dav1d/include/compat/gcc/stdatomic.h']
|
||||
|
||||
FINAL_LIBRARY = 'gkmedias'
|
||||
|
||||
# We allow warnings for third-party code that can be updated from upstream.
|
||||
AllowCompilerWarnings()
|
|
@ -0,0 +1,2 @@
|
|||
/* auto-generated, do not edit */
|
||||
#define DAV1D_VERSION "0.0.1"
|
Загрузка…
Ссылка в новой задаче