• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
2
3import("//build/ohos.gni")
4
5wels_src_dir = "//third_party/openh264/codec/api/svc"
6action("copy_wel_head") {
7  visibility = [ ":*" ]
8  script = "copy_to_wels_head.py"
9  inputs = []
10  outputs = [ "${target_gen_dir}/test.txt" ]
11  args = [
12    "--src-dir",
13    rebase_path(wels_src_dir),
14    "--dst-dir",
15    rebase_path("//third_party/openh264/include/wels"),
16  ]
17}
18
19config("gst_openh264_config") {
20  cflags = [ "-w" ]
21}
22
23ohos_shared_library("openh264") {
24  deps = [
25    ":common",
26    ":console_common",
27    ":copy_wel_head",
28    ":decoder",
29    ":encoder",
30    ":processing",
31    "//third_party/glib:glib",
32    "//third_party/glib:gmodule",
33    "//third_party/glib:gobject",
34    "//third_party/gstreamer/gstreamer:gstbase",
35    "//third_party/gstreamer/gstreamer:gstreamer",
36  ]
37  part_name = "openh264"
38  subsystem_name = "thirdparty"
39}
40
41ohos_static_library("encoder") {
42  sources = [
43    "//third_party/openh264/codec/encoder/core/src/au_set.cpp",
44    "//third_party/openh264/codec/encoder/core/src/deblocking.cpp",
45    "//third_party/openh264/codec/encoder/core/src/decode_mb_aux.cpp",
46    "//third_party/openh264/codec/encoder/core/src/encode_mb_aux.cpp",
47    "//third_party/openh264/codec/encoder/core/src/encoder.cpp",
48    "//third_party/openh264/codec/encoder/core/src/encoder_data_tables.cpp",
49    "//third_party/openh264/codec/encoder/core/src/encoder_ext.cpp",
50    "//third_party/openh264/codec/encoder/core/src/get_intra_predictor.cpp",
51    "//third_party/openh264/codec/encoder/core/src/md.cpp",
52    "//third_party/openh264/codec/encoder/core/src/mv_pred.cpp",
53    "//third_party/openh264/codec/encoder/core/src/nal_encap.cpp",
54    "//third_party/openh264/codec/encoder/core/src/paraset_strategy.cpp",
55    "//third_party/openh264/codec/encoder/core/src/picture_handle.cpp",
56    "//third_party/openh264/codec/encoder/core/src/ratectl.cpp",
57    "//third_party/openh264/codec/encoder/core/src/ref_list_mgr_svc.cpp",
58    "//third_party/openh264/codec/encoder/core/src/sample.cpp",
59    "//third_party/openh264/codec/encoder/core/src/set_mb_syn_cabac.cpp",
60    "//third_party/openh264/codec/encoder/core/src/set_mb_syn_cavlc.cpp",
61    "//third_party/openh264/codec/encoder/core/src/slice_multi_threading.cpp",
62    "//third_party/openh264/codec/encoder/core/src/svc_base_layer_md.cpp",
63    "//third_party/openh264/codec/encoder/core/src/svc_enc_slice_segment.cpp",
64    "//third_party/openh264/codec/encoder/core/src/svc_encode_mb.cpp",
65    "//third_party/openh264/codec/encoder/core/src/svc_encode_slice.cpp",
66    "//third_party/openh264/codec/encoder/core/src/svc_mode_decision.cpp",
67    "//third_party/openh264/codec/encoder/core/src/svc_motion_estimate.cpp",
68    "//third_party/openh264/codec/encoder/core/src/svc_set_mb_syn_cabac.cpp",
69    "//third_party/openh264/codec/encoder/core/src/svc_set_mb_syn_cavlc.cpp",
70    "//third_party/openh264/codec/encoder/core/src/wels_preprocess.cpp",
71    "//third_party/openh264/codec/encoder/core/src/wels_task_base.cpp",
72    "//third_party/openh264/codec/encoder/core/src/wels_task_encoder.cpp",
73    "//third_party/openh264/codec/encoder/core/src/wels_task_management.cpp",
74    "//third_party/openh264/codec/encoder/plus/src/welsEncoderExt.cpp",
75  ]
76
77  configs = [ ":gst_openh264_config" ]
78
79  include_dirs = [
80    "//third_party/openh264/codec/common/inc",
81    "//third_party/openh264/codec/encoder/core/inc",
82    "//third_party/openh264/codec/api/svc",
83    "//third_party/openh264/codec/processing/interface",
84    "//third_party/openh264/codec/encoder/plus/inc",
85    "//third_party/openh264/include",
86    "//third_party/openh264/codec/processing/src/common",
87    "//third_party/openh264/codec/processing/src/adaptivequantization",
88    "//third_party/openh264/codec/processing/src/downsample",
89    "//third_party/openh264/codec/processing/src/scrolldetection",
90    "//third_party/openh264/codec/processing/src/vaacalc",
91    "//third_party/openh264/codec/console/common/inc",
92    "//third_party/openh264/codec/console/dec/inc",
93    "//third_party/openh264/codec/console/enc/inc",
94    "//third_party/gstreamer/gstreamer",
95    "//third_party/gstreamer/gstreamer/libs",
96    "//third_party/gstreamer/gstplugins_base",
97    "//third_party/gstreamer/gstplugins_base/gst-libs",
98    "//third_party/glib/glib",
99    "//third_party/glib",
100    "//third_party/glib/gmodule",
101  ]
102
103  deps = [
104    "//third_party/glib:glib",
105    "//third_party/glib:gmodule",
106    "//third_party/glib:gobject",
107    "//third_party/gstreamer/gstreamer:gstbase",
108    "//third_party/gstreamer/gstreamer:gstreamer",
109  ]
110
111  part_name = "openh264"
112  subsystem_name = "thirdparty"
113}
114
115ohos_static_library("decoder") {
116  sources = [
117    "//third_party/openh264/codec/decoder/core/src/au_parser.cpp",
118    "//third_party/openh264/codec/decoder/core/src/bit_stream.cpp",
119    "//third_party/openh264/codec/decoder/core/src/cabac_decoder.cpp",
120    "//third_party/openh264/codec/decoder/core/src/deblocking.cpp",
121    "//third_party/openh264/codec/decoder/core/src/decode_mb_aux.cpp",
122    "//third_party/openh264/codec/decoder/core/src/decode_slice.cpp",
123    "//third_party/openh264/codec/decoder/core/src/decoder.cpp",
124    "//third_party/openh264/codec/decoder/core/src/decoder_core.cpp",
125    "//third_party/openh264/codec/decoder/core/src/decoder_data_tables.cpp",
126    "//third_party/openh264/codec/decoder/core/src/error_concealment.cpp",
127    "//third_party/openh264/codec/decoder/core/src/fmo.cpp",
128    "//third_party/openh264/codec/decoder/core/src/get_intra_predictor.cpp",
129    "//third_party/openh264/codec/decoder/core/src/manage_dec_ref.cpp",
130    "//third_party/openh264/codec/decoder/core/src/memmgr_nal_unit.cpp",
131    "//third_party/openh264/codec/decoder/core/src/mv_pred.cpp",
132    "//third_party/openh264/codec/decoder/core/src/parse_mb_syn_cabac.cpp",
133    "//third_party/openh264/codec/decoder/core/src/parse_mb_syn_cavlc.cpp",
134    "//third_party/openh264/codec/decoder/core/src/pic_queue.cpp",
135    "//third_party/openh264/codec/decoder/core/src/rec_mb.cpp",
136    "//third_party/openh264/codec/decoder/plus/src/welsDecoderExt.cpp",
137  ]
138
139  configs = [ ":gst_openh264_config" ]
140
141  include_dirs = [
142    "//third_party/openh264/codec/common/inc",
143    "//third_party/openh264/codec/decoder/core/inc",
144    "//third_party/openh264/codec/api/svc",
145    "//third_party/openh264/codec/processing/interface",
146    "//third_party/openh264/codec/decoder/plus/inc",
147    "//third_party/openh264/include",
148    "//third_party/openh264/codec/processing/src/common",
149    "//third_party/openh264/codec/processing/src/adaptivequantization",
150    "//third_party/openh264/codec/processing/src/downsample",
151    "//third_party/openh264/codec/processing/src/scrolldetection",
152    "//third_party/openh264/codec/processing/src/vaacalc",
153    "//third_party/openh264/codec/console/common/inc",
154    "//third_party/openh264/codec/console/dec/inc",
155    "//third_party/openh264/codec/console/enc/inc",
156    "//third_party/gstreamer/gstreamer",
157    "//third_party/gstreamer/gstreamer/libs",
158    "//third_party/gstreamer/gstplugins_base",
159    "//third_party/gstreamer/gstplugins_base/gst-libs",
160    "//third_party/glib/glib",
161    "//third_party/glib",
162    "//third_party/glib/gmodule",
163  ]
164
165  deps = [
166    "//third_party/glib:glib",
167    "//third_party/glib:gmodule",
168    "//third_party/glib:gobject",
169    "//third_party/gstreamer/gstreamer:gstbase",
170    "//third_party/gstreamer/gstreamer:gstreamer",
171  ]
172
173  part_name = "openh264"
174  subsystem_name = "thirdparty"
175}
176
177ohos_static_library("console_common") {
178  sources =
179      [ "//third_party/openh264/codec/console/common/src/read_config.cpp" ]
180
181  configs = [ ":gst_openh264_config" ]
182
183  include_dirs = [
184    "//third_party/openh264/codec/api/svc",
185    "//third_party/openh264/codec/common/inc",
186    "//third_party/openh264/codec/console/common/inc",
187    "//third_party/gstreamer/gstreamer",
188    "//third_party/gstreamer/gstreamer/libs",
189    "//third_party/gstreamer/gstplugins_base",
190    "//third_party/gstreamer/gstplugins_base/gst-libs",
191    "//third_party/glib/glib",
192    "//third_party/glib",
193    "//third_party/glib/gmodule",
194  ]
195
196  deps = [
197    "//third_party/glib:glib",
198    "//third_party/glib:gmodule",
199    "//third_party/glib:gobject",
200    "//third_party/gstreamer/gstreamer:gstbase",
201    "//third_party/gstreamer/gstreamer:gstreamer",
202  ]
203
204  part_name = "openh264"
205  subsystem_name = "thirdparty"
206}
207
208ohos_static_library("processing") {
209  sources = [
210    "//third_party/openh264/codec/processing/src/adaptivequantization/AdaptiveQuantization.cpp",
211    "//third_party/openh264/codec/processing/src/backgrounddetection/BackgroundDetection.cpp",
212    "//third_party/openh264/codec/processing/src/common/WelsFrameWork.cpp",
213    "//third_party/openh264/codec/processing/src/common/WelsFrameWorkEx.cpp",
214    "//third_party/openh264/codec/processing/src/common/memory.cpp",
215    "//third_party/openh264/codec/processing/src/complexityanalysis/ComplexityAnalysis.cpp",
216    "//third_party/openh264/codec/processing/src/denoise/denoise.cpp",
217    "//third_party/openh264/codec/processing/src/denoise/denoise_filter.cpp",
218    "//third_party/openh264/codec/processing/src/downsample/downsample.cpp",
219    "//third_party/openh264/codec/processing/src/downsample/downsamplefuncs.cpp",
220    "//third_party/openh264/codec/processing/src/imagerotate/imagerotate.cpp",
221    "//third_party/openh264/codec/processing/src/imagerotate/imagerotatefuncs.cpp",
222    "//third_party/openh264/codec/processing/src/scenechangedetection/SceneChangeDetection.cpp",
223    "//third_party/openh264/codec/processing/src/scrolldetection/ScrollDetection.cpp",
224    "//third_party/openh264/codec/processing/src/scrolldetection/ScrollDetectionFuncs.cpp",
225    "//third_party/openh264/codec/processing/src/vaacalc/vaacalcfuncs.cpp",
226    "//third_party/openh264/codec/processing/src/vaacalc/vaacalculation.cpp",
227  ]
228
229  configs = [ ":gst_openh264_config" ]
230
231  include_dirs = [
232    "//third_party/openh264/codec/api/svc",
233    "//third_party/openh264/codec/common/inc",
234    "//third_party/openh264/codec/processing/interface",
235    "//third_party/openh264/codec/processing/src/common",
236    "//third_party/openh264/codec/processing/src/adaptivequantization",
237    "//third_party/openh264/codec/processing/src/downsample",
238    "//third_party/openh264/codec/processing/src/scrolldetection",
239    "//third_party/openh264/codec/processing/src/vaacalc",
240    "//third_party/gstreamer/gstreamer",
241    "//third_party/gstreamer/gstreamer/libs",
242    "//third_party/gstreamer/gstplugins_base",
243    "//third_party/gstreamer/gstplugins_base/gst-libs",
244    "//third_party/glib/glib",
245    "//third_party/glib",
246    "//third_party/glib/gmodule",
247  ]
248
249  deps = [
250    "//third_party/glib:glib",
251    "//third_party/glib:gmodule",
252    "//third_party/glib:gobject",
253    "//third_party/gstreamer/gstreamer:gstbase",
254    "//third_party/gstreamer/gstreamer:gstreamer",
255  ]
256
257  part_name = "openh264"
258  subsystem_name = "thirdparty"
259}
260
261ohos_static_library("common") {
262  sources = [
263    "//third_party/openh264/codec/common/src/WelsTaskThread.cpp",
264    "//third_party/openh264/codec/common/src/WelsThread.cpp",
265    "//third_party/openh264/codec/common/src/WelsThreadLib.cpp",
266    "//third_party/openh264/codec/common/src/WelsThreadPool.cpp",
267    "//third_party/openh264/codec/common/src/common_tables.cpp",
268    "//third_party/openh264/codec/common/src/copy_mb.cpp",
269    "//third_party/openh264/codec/common/src/cpu.cpp",
270    "//third_party/openh264/codec/common/src/crt_util_safe_x.cpp",
271    "//third_party/openh264/codec/common/src/deblocking_common.cpp",
272    "//third_party/openh264/codec/common/src/expand_pic.cpp",
273    "//third_party/openh264/codec/common/src/intra_pred_common.cpp",
274    "//third_party/openh264/codec/common/src/mc.cpp",
275    "//third_party/openh264/codec/common/src/memory_align.cpp",
276    "//third_party/openh264/codec/common/src/sad_common.cpp",
277    "//third_party/openh264/codec/common/src/utils.cpp",
278    "//third_party/openh264/codec/common/src/welsCodecTrace.cpp",
279  ]
280
281  configs = [ ":gst_openh264_config" ]
282
283  include_dirs = [
284    "//third_party/openh264/codec/api/svc",
285    "//third_party/openh264/codec/common/inc",
286    "//third_party/gstreamer/gstreamer",
287    "//third_party/gstreamer/gstreamer/libs",
288    "//third_party/gstreamer/gstplugins_base",
289    "//third_party/gstreamer/gstplugins_base/gst-libs",
290    "//third_party/glib/glib",
291    "//third_party/glib",
292    "//third_party/glib/gmodule",
293  ]
294
295  deps = [
296    "//third_party/glib:glib",
297    "//third_party/glib:gmodule",
298    "//third_party/glib:gobject",
299    "//third_party/gstreamer/gstreamer:gstbase",
300    "//third_party/gstreamer/gstreamer:gstreamer",
301  ]
302
303  part_name = "openh264"
304  subsystem_name = "thirdparty"
305}
306