no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / media / libdav1d / config.h
blob218c8ae7f407c6712a8b4fd0fc40cd36c34c1178
1 #pragma once
3 // Set platform
4 #if defined(__aarch64__) || defined(_M_ARM64)
5 # define ARCH_AARCH64 1
6 #else
7 # define ARCH_AARCH64 0
8 #endif
10 #if defined(__arm__) || defined(_M_ARM)
11 # define ARCH_ARM 1
12 #else
13 # define ARCH_ARM 0
14 #endif
16 #if defined(__i386__) || defined(_M_IX86)
17 # define ARCH_X86_32 1
18 #else
19 # define ARCH_X86_32 0
20 #endif
22 #if defined(__x86_64__) || defined(_M_X64)
23 # define ARCH_X86_64 1
24 #else
25 # define ARCH_X86_64 0
26 #endif
28 #if ARCH_X86_32 == 1 || ARCH_X86_64 == 1
29 # define ARCH_X86 1
30 #else
31 # define ARCH_X86 0
32 #endif
34 // Set both bitdepeth in every case
35 #define CONFIG_16BPC 1
36 #define CONFIG_8BPC 1
38 // Enable asm
39 #if defined(MOZ_DAV1D_ASM)
40 # define HAVE_ASM 1
41 #else
42 # define HAVE_ASM 0
43 #endif
45 #if ARCH_AARCH64 == 1
46 // Those values are copied from the auto generated
47 // config file produced by stand alone dav1d build.
48 # define HAVE_AS_FUNC 0
49 # define HAVE_GETAUXVAL 1
50 # define PIC 3
51 #endif
53 // The following macros are defined from autoconf
54 // according to the system configuration.
55 // (HAVE_MEMALIGN | HAVE_ALIGNED_MALLOC | HAVE_POSIX_MEMALIGN)
56 // HAVE_UNISTD_H
58 // Important when asm is enabled
59 #if defined(__APPLE__) || (ARCH_x86_32 == 1 && defined(_WIN32))
60 # define PREFIX 1
61 #endif
63 #if defined(_WIN32) || defined(__CYGWIN__)
64 // _WIN32_WINNT 0x0601 is set in global macros
65 # define UNICODE 1
66 # define _UNICODE 1
67 # define __USE_MINGW_ANSI_STDIO 1
68 #endif