Mercurial > hg > forks > libbpg
comparison x265/source/common/version.cpp @ 0:772086c29cc7
Initial import.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 16 Nov 2016 11:16:33 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:772086c29cc7 |
---|---|
1 /***************************************************************************** | |
2 * Copyright (C) 2013 x265 project | |
3 * | |
4 * Authors: Steve Borho <steve@borho.org> | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. | |
19 * | |
20 * This program is also available under a commercial proprietary license. | |
21 * For more information, contact us at license @ x265.com. | |
22 *****************************************************************************/ | |
23 | |
24 #include "x265.h" | |
25 #include "common.h" | |
26 #include "primitives.h" | |
27 | |
28 #define XSTR(x) STR(x) | |
29 #define STR(x) #x | |
30 | |
31 #if defined(__clang__) | |
32 #define COMPILEDBY "[clang " XSTR(__clang_major__) "." XSTR(__clang_minor__) "." XSTR(__clang_patchlevel__) "]" | |
33 #ifdef __IA64__ | |
34 #define ONARCH "[on 64-bit] " | |
35 #else | |
36 #define ONARCH "[on 32-bit] " | |
37 #endif | |
38 #endif | |
39 | |
40 #if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__) | |
41 #define COMPILEDBY "[GCC " XSTR(__GNUC__) "." XSTR(__GNUC_MINOR__) "." XSTR(__GNUC_PATCHLEVEL__) "]" | |
42 #ifdef __IA64__ | |
43 #define ONARCH "[on 64-bit] " | |
44 #else | |
45 #define ONARCH "[on 32-bit] " | |
46 #endif | |
47 #endif | |
48 | |
49 #ifdef __INTEL_COMPILER | |
50 #define COMPILEDBY "[ICC " XSTR(__INTEL_COMPILER) "]" | |
51 #elif _MSC_VER | |
52 #define COMPILEDBY "[MSVC " XSTR(_MSC_VER) "]" | |
53 #endif | |
54 | |
55 #ifndef COMPILEDBY | |
56 #define COMPILEDBY "[Unk-CXX]" | |
57 #endif | |
58 | |
59 #ifdef _WIN32 | |
60 #define ONOS "[Windows]" | |
61 #elif __linux | |
62 #define ONOS "[Linux]" | |
63 #elif __OpenBSD__ | |
64 #define ONOS "[OpenBSD]" | |
65 #elif __CYGWIN__ | |
66 #define ONOS "[Cygwin]" | |
67 #elif __APPLE__ | |
68 #define ONOS "[Mac OS X]" | |
69 #else | |
70 #define ONOS "[Unk-OS]" | |
71 #endif | |
72 | |
73 #if X86_64 | |
74 #define BITS "[64 bit]" | |
75 #else | |
76 #define BITS "[32 bit]" | |
77 #endif | |
78 | |
79 #if defined(ENABLE_ASSEMBLY) | |
80 #define ASM "" | |
81 #else | |
82 #define ASM "[noasm]" | |
83 #endif | |
84 | |
85 #if NO_ATOMICS | |
86 #define ATOMICS "[no-atomics]" | |
87 #else | |
88 #define ATOMICS "" | |
89 #endif | |
90 | |
91 #if CHECKED_BUILD | |
92 #define CHECKED "[CHECKED] " | |
93 #else | |
94 #define CHECKED " " | |
95 #endif | |
96 | |
97 #if X265_DEPTH == 12 | |
98 | |
99 #define BITDEPTH "12bit" | |
100 const int PFX(max_bit_depth) = 12; | |
101 | |
102 #elif X265_DEPTH == 10 | |
103 | |
104 #define BITDEPTH "10bit" | |
105 const int PFX(max_bit_depth) = 10; | |
106 | |
107 #elif X265_DEPTH == 8 | |
108 | |
109 #define BITDEPTH "8bit" | |
110 const int PFX(max_bit_depth) = 8; | |
111 | |
112 #endif | |
113 | |
114 #if LINKED_8BIT | |
115 #define ADD8 "+8bit" | |
116 #else | |
117 #define ADD8 "" | |
118 #endif | |
119 #if LINKED_10BIT | |
120 #define ADD10 "+10bit" | |
121 #else | |
122 #define ADD10 "" | |
123 #endif | |
124 #if LINKED_12BIT | |
125 #define ADD12 "+12bit" | |
126 #else | |
127 #define ADD12 "" | |
128 #endif | |
129 | |
130 const char* PFX(version_str) = XSTR(X265_VERSION); | |
131 const char* PFX(build_info_str) = ONOS COMPILEDBY BITS ASM ATOMICS CHECKED BITDEPTH ADD8 ADD10 ADD12; |