forked from colin121/x264-dsp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
120 lines (116 loc) · 2.61 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
project('x264-dsp')
languages = ['c']
add_languages(languages, required: true)
if add_languages(['linearasm'], native: false, required: false)
languages += ['linearasm']
endif
conf_data = configuration_data()
conf_data.set(
'HAVE_TIC6X',
get_option('have_tic6x'),
description: 'enable TI C6X asm',
)
if get_option('downsample').to_int() > 0
conf_data.set(
'DOWNSAMPLE',
get_option('downsample'),
description: 'downsample from 720p to 360p, 1, 2 means bilinear, bicubic',
)
endif
conf_data.set(
'PADDING',
get_option('padding'),
description: 'padding method, 1..3 means edge, reflect, symmetric',
)
conf_data.set(
'SCALE',
get_option('scale'),
description: 'SCALE scale, a positive number',
)
conf_data.set(
'X264_BIT_DEPTH',
get_option('x264_bit_depth'),
description: 'bit depth, can be 8 or 10',
)
conf_data.set(
'X264_CHROMA_FORMAT',
get_option('x264_chroma_format'),
description: 'chroma format, 0..3 means 400, 420, 422, 444',
)
conf_data.set(
'X264_LOG_LEVEL',
get_option('x264_log_level'),
description: 'log level, 0..3 means error, warning, info, debug',
)
has_header = 0
cc = meson.get_compiler('c')
if cc.has_header('string.h')
has_header = 1
endif
conf_data.set(
'HAVE_STRING_H',
has_header,
description: 'have <string.h>',
)
configure_file(output: 'config.h', configuration: conf_data)
add_project_arguments('-DHAVE_CONFIG_H=1', language: languages)
files = [
'downsample.c',
'input.c',
'output.c',
'x264.c',
'encoder/analyse.c',
'encoder/cabac.c',
'encoder/cavlc.c',
'encoder/encoder.c',
'encoder/lookahead.c',
'encoder/macroblock.c',
'encoder/me.c',
'encoder/ratecontrol.c',
'encoder/set.c',
'encoder/slicetype.c',
'extras/getopt.c',
'common/bitstream.c',
'common/cabac.c',
'common/common.c',
'common/dct.c',
'common/deblock.c',
'common/frame.c',
'common/macroblock.c',
'common/mc.c',
'common/mvpred.c',
'common/pixel.c',
'common/predict.c',
'common/quant.c',
'common/set.c',
'common/vlc.c',
]
objs = []
deps = []
if cc.get_id() == 'c6000'
cmd_file = join_paths(meson.current_source_dir(), get_option('cmd_file'))
add_project_arguments(
'--cmd_file=' + cmd_file,
language: languages,
)
objs += [join_paths(meson.current_source_dir(), get_option('lnk_file'))]
files += [
'common/bitstream-a.sa',
'common/dct-a.sa',
'common/deblock-a.sa',
'common/mc-a.sa',
'common/pixel-a.sa',
'common/predict-a.sa',
'common/quant-a.sa',
]
else
deps += [cc.find_library('m', required: false)]
endif
executable(
'x264',
files,
install: true,
dependencies: deps,
objects: objs,
)
subdir('tests')