blob: d1067a6dd1ca813cbe19e435e1afbe2f7a0b3b5b [file] [log] [blame]
Colin Cross3f774362017-04-20 16:42:47 -07001cc_library_static {
2 name: "libhevcdec",
3
4 cflags: [
5 "-D_LIB",
6 "-DMULTICORE",
7 "-fPIC",
8
9 "-O3",
10 "-DANDROID",
11 ],
12
13 export_include_dirs: [
14 "decoder",
15 "common",
16 ],
17
18 srcs: [
19 "common/ihevc_quant_tables.c",
20 "common/ihevc_inter_pred_filters.c",
21 "common/ihevc_weighted_pred.c",
22 "common/ihevc_padding.c",
23 "common/ihevc_deblk_edge_filter.c",
24 "common/ihevc_deblk_tables.c",
25 "common/ihevc_cabac_tables.c",
26 "common/ihevc_common_tables.c",
27 "common/ihevc_intra_pred_filters.c",
28 "common/ihevc_chroma_intra_pred_filters.c",
29 "common/ihevc_mem_fns.c",
30 "common/ihevc_sao.c",
31 "common/ihevc_trans_tables.c",
32 "common/ihevc_recon.c",
33 "common/ihevc_itrans.c",
34 "common/ihevc_itrans_recon.c",
35 "common/ihevc_iquant_recon.c",
36 "common/ihevc_iquant_itrans_recon.c",
37 "common/ihevc_itrans_recon_32x32.c",
38 "common/ihevc_itrans_recon_16x16.c",
39 "common/ihevc_itrans_recon_8x8.c",
40 "common/ihevc_chroma_itrans_recon.c",
41 "common/ihevc_chroma_iquant_recon.c",
42 "common/ihevc_chroma_iquant_itrans_recon.c",
43 "common/ihevc_chroma_recon.c",
44 "common/ihevc_chroma_itrans_recon_16x16.c",
45 "common/ihevc_chroma_itrans_recon_8x8.c",
46 "common/ihevc_buf_mgr.c",
47 "common/ihevc_disp_mgr.c",
48 "common/ihevc_dpb_mgr.c",
49 "common/ithread.c",
50 "decoder/ihevcd_version.c",
51 "decoder/ihevcd_api.c",
52 "decoder/ihevcd_decode.c",
53 "decoder/ihevcd_nal.c",
54 "decoder/ihevcd_bitstream.c",
55 "decoder/ihevcd_parse_headers.c",
56 "decoder/ihevcd_parse_slice_header.c",
57 "decoder/ihevcd_parse_slice.c",
58 "decoder/ihevcd_parse_residual.c",
59 "decoder/ihevcd_cabac.c",
60 "decoder/ihevcd_intra_pred_mode_prediction.c",
61 "decoder/ihevcd_process_slice.c",
62 "decoder/ihevcd_utils.c",
63 "decoder/ihevcd_job_queue.c",
64 "decoder/ihevcd_ref_list.c",
65 "decoder/ihevcd_get_mv.c",
66 "decoder/ihevcd_mv_pred.c",
67 "decoder/ihevcd_mv_merge.c",
68 "decoder/ihevcd_iquant_itrans_recon_ctb.c",
69 "decoder/ihevcd_itrans_recon_dc.c",
70 "decoder/ihevcd_common_tables.c",
71 "decoder/ihevcd_boundary_strength.c",
72 "decoder/ihevcd_deblk.c",
73 "decoder/ihevcd_inter_pred.c",
74 "decoder/ihevcd_sao.c",
75 "decoder/ihevcd_ilf_padding.c",
76 "decoder/ihevcd_fmt_conv.c",
77 ],
78
79 arch: {
80 arm64: {
81 cflags: [
82 "-DARMV8",
83 "-DDISABLE_NEONINTR",
84 "-DARM",
85 "-DARMGCC",
86
87 "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC",
88 ],
89 local_include_dirs: [
90 "decoder/arm",
91 "common/arm",
92 "decoder/arm64",
93 "common/arm64",
94 ],
95
96 srcs: [
97 "decoder/arm/ihevcd_function_selector.c",
98 "decoder/arm/ihevcd_function_selector_noneon.c",
99 "decoder/arm64/ihevcd_function_selector_av8.c",
100 "common/arm/ihevc_intra_pred_filters_neon_intr.c",
101 "common/arm/ihevc_weighted_pred_neon_intr.c",
102 "common/arm64/ihevc_mem_fns.s",
103 "common/arm64/ihevc_itrans_recon_32x32.s",
104 "common/arm64/ihevc_weighted_pred_bi_default.s",
105 "common/arm64/ihevc_weighted_pred_bi.s",
106 "common/arm64/ihevc_weighted_pred_uni.s",
107 "common/arm64/ihevc_deblk_luma_horz.s",
108 "common/arm64/ihevc_deblk_luma_vert.s",
109 "common/arm64/ihevc_deblk_chroma_vert.s",
110 "common/arm64/ihevc_deblk_chroma_horz.s",
111 "common/arm64/ihevc_sao_band_offset_luma.s",
112 "common/arm64/ihevc_sao_band_offset_chroma.s",
113 "common/arm64/ihevc_sao_edge_offset_class0.s",
114 "common/arm64/ihevc_sao_edge_offset_class0_chroma.s",
115 "common/arm64/ihevc_sao_edge_offset_class1.s",
116 "common/arm64/ihevc_sao_edge_offset_class1_chroma.s",
117 "common/arm64/ihevc_sao_edge_offset_class2.s",
118 "common/arm64/ihevc_sao_edge_offset_class2_chroma.s",
119 "common/arm64/ihevc_sao_edge_offset_class3.s",
120 "common/arm64/ihevc_sao_edge_offset_class3_chroma.s",
121 "common/arm64/ihevc_inter_pred_luma_horz_w16out.s",
122 "common/arm64/ihevc_inter_pred_filters_luma_horz.s",
123 "common/arm64/ihevc_inter_pred_filters_luma_vert.s",
124 "common/arm64/ihevc_inter_pred_chroma_horz.s",
125 "common/arm64/ihevc_inter_pred_chroma_horz_w16out.s",
126 "common/arm64/ihevc_inter_pred_chroma_vert.s",
127 "common/arm64/ihevc_inter_pred_chroma_vert_w16out.s",
128 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s",
129 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
130 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s",
131 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s",
132 "common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
133 "common/arm64/ihevc_inter_pred_luma_copy_w16out.s",
134 "common/arm64/ihevc_inter_pred_luma_copy.s",
135 "common/arm64/ihevc_inter_pred_chroma_copy.s",
136 "common/arm64/ihevc_inter_pred_chroma_copy_w16out.s",
137 "common/arm64/ihevc_itrans_recon_4x4_ttype1.s",
138 "common/arm64/ihevc_itrans_recon_4x4.s",
139 "common/arm64/ihevc_itrans_recon_8x8.s",
140 "common/arm64/ihevc_itrans_recon_16x16.s",
141 "common/arm64/ihevc_intra_pred_chroma_planar.s",
142 "common/arm64/ihevc_intra_pred_chroma_dc.s",
143 "common/arm64/ihevc_intra_pred_chroma_horz.s",
144 "common/arm64/ihevc_intra_pred_chroma_ver.s",
145 "common/arm64/ihevc_intra_pred_chroma_mode2.s",
146 "common/arm64/ihevc_intra_pred_chroma_mode_18_34.s",
147 "common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
148 "common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
149 "common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s",
150 "common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s",
151 "common/arm64/ihevc_intra_pred_luma_planar.s",
152 "common/arm64/ihevc_intra_pred_luma_horz.s",
153 "common/arm64/ihevc_intra_pred_luma_mode2.s",
154 "common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s",
155 "common/arm64/ihevc_intra_pred_luma_mode_18_34.s",
156 "common/arm64/ihevc_intra_pred_luma_vert.s",
157 "common/arm64/ihevc_intra_pred_luma_dc.s",
158 "common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
159 "common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
160 "common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s",
161 "common/arm64/ihevc_padding.s",
162 "decoder/arm64/ihevcd_itrans_recon_dc_luma.s",
163 "decoder/arm64/ihevcd_itrans_recon_dc_chroma.s",
164 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420p.s",
165 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420sp.s",
166 "decoder/arm64/ihevcd_fmt_conv_420sp_to_rgba8888.s",
167 ],
168 },
169
170 arm: {
171 local_include_dirs: [
172 "decoder/arm",
173 "common/arm",
174 ],
175
176 srcs: [
177 "decoder/arm/ihevcd_function_selector.c",
178 "decoder/arm/ihevcd_function_selector_noneon.c",
179 ],
180
181 cflags: [
182 "-DDISABLE_NEONINTR",
183 "-DARM",
184 "-DARMGCC",
185 "-fno-tree-vectorize",
186
187 // These will be overriden by armv7_a_neon
188 "-DDISABLE_NEON",
189 "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON",
190 ],
191
192 instruction_set: "arm",
193
Isaac Chen36ff7b62017-09-12 16:58:19 +0800194 neon: {
Colin Cross3f774362017-04-20 16:42:47 -0700195 srcs: [
196 "decoder/arm/ihevcd_function_selector_a9q.c",
197 "common/arm/ihevc_intra_ref_substitution_a9q.c",
198 "common/arm/ihevc_intra_pred_filters_neon_intr.c",
199 "common/arm/ihevc_weighted_pred_neon_intr.c",
200 "common/arm/ihevc_mem_fns.s",
201 "common/arm/ihevc_itrans_recon_32x32.s",
202 "common/arm/ihevc_weighted_pred_bi_default.s",
203 "common/arm/ihevc_weighted_pred_bi.s",
204 "common/arm/ihevc_weighted_pred_uni.s",
205 "common/arm/ihevc_deblk_luma_horz.s",
206 "common/arm/ihevc_deblk_luma_vert.s",
207 "common/arm/ihevc_deblk_chroma_vert.s",
208 "common/arm/ihevc_deblk_chroma_horz.s",
209 "common/arm/ihevc_sao_band_offset_luma.s",
210 "common/arm/ihevc_sao_band_offset_chroma.s",
211 "common/arm/ihevc_sao_edge_offset_class0.s",
212 "common/arm/ihevc_sao_edge_offset_class0_chroma.s",
213 "common/arm/ihevc_sao_edge_offset_class1.s",
214 "common/arm/ihevc_sao_edge_offset_class1_chroma.s",
215 "common/arm/ihevc_sao_edge_offset_class2.s",
216 "common/arm/ihevc_sao_edge_offset_class2_chroma.s",
217 "common/arm/ihevc_sao_edge_offset_class3.s",
218 "common/arm/ihevc_sao_edge_offset_class3_chroma.s",
219 "common/arm/ihevc_inter_pred_luma_horz_w16out.s",
220 "common/arm/ihevc_inter_pred_filters_luma_horz.s",
221 "common/arm/ihevc_inter_pred_filters_luma_vert.s",
222 "common/arm/ihevc_inter_pred_chroma_horz.s",
223 "common/arm/ihevc_inter_pred_chroma_horz_w16out.s",
224 "common/arm/ihevc_inter_pred_chroma_vert.s",
225 "common/arm/ihevc_inter_pred_chroma_vert_w16out.s",
226 "common/arm/ihevc_inter_pred_chroma_vert_w16inp.s",
227 "common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
228 "common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s",
229 "common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
230 "common/arm/ihevc_inter_pred_luma_copy_w16out.s",
231 "common/arm/ihevc_inter_pred_luma_copy.s",
232 "common/arm/ihevc_inter_pred_chroma_copy.s",
233 "common/arm/ihevc_inter_pred_chroma_copy_w16out.s",
234 "common/arm/ihevc_itrans_recon_4x4_ttype1.s",
235 "common/arm/ihevc_itrans_recon_4x4.s",
236 "common/arm/ihevc_itrans_recon_8x8.s",
237 "common/arm/ihevc_itrans_recon_16x16.s",
238 "common/arm/ihevc_intra_pred_chroma_planar.s",
239 "common/arm/ihevc_intra_pred_chroma_dc.s",
240 "common/arm/ihevc_intra_pred_chroma_horz.s",
241 "common/arm/ihevc_intra_pred_chroma_ver.s",
242 "common/arm/ihevc_intra_pred_chroma_mode2.s",
243 "common/arm/ihevc_intra_pred_chroma_mode_18_34.s",
244 "common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
245 "common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
246 "common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s",
247 "common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s",
248 "common/arm/ihevc_intra_pred_luma_planar.s",
249 "common/arm/ihevc_intra_pred_luma_horz.s",
250 "common/arm/ihevc_intra_pred_luma_mode2.s",
251 "common/arm/ihevc_intra_pred_luma_mode_27_to_33.s",
252 "common/arm/ihevc_intra_pred_luma_mode_18_34.s",
253 "common/arm/ihevc_intra_pred_luma_vert.s",
254 "common/arm/ihevc_intra_pred_luma_dc.s",
255 "common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
256 "common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
257 "common/arm/ihevc_intra_pred_luma_mode_3_to_9.s",
258 "common/arm/ihevc_padding.s",
259 "decoder/arm/ihevcd_itrans_recon_dc_luma.s",
260 "decoder/arm/ihevcd_itrans_recon_dc_chroma.s",
261 "decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s",
262 "decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s",
263 "decoder/arm/ihevcd_fmt_conv_420sp_to_rgba8888.s",
264 ],
265 cflags: [
266 "-UDISABLE_NEON",
267 "-UDEFAULT_ARCH",
268 "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q",
269 ],
270 },
271 },
272
273 mips64: {
274 local_include_dirs: [
275 "decoder/mips",
276 "common/mips",
277 ],
278
279 srcs: [
280 "decoder/mips/ihevcd_function_selector.c",
281 "decoder/mips/ihevcd_function_selector_mips_generic.c",
282 ],
283 },
284
285 mips: {
286 local_include_dirs: [
287 "decoder/mips",
288 "common/mips",
289 ],
290
291 srcs: [
292 "decoder/mips/ihevcd_function_selector.c",
293 "decoder/mips/ihevcd_function_selector_mips_generic.c",
294 ],
295 },
296
297 x86_64: {
298 cflags: [
299 "-DX86",
300 "-DDISABLE_AVX2",
301 "-msse4.2",
302 "-mno-avx",
303 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
304 ],
305
306 local_include_dirs: [
307 "decoder/x86",
308 "common/x86",
309 ],
310
311 srcs: [
312 "decoder/x86/ihevcd_function_selector.c",
313 "decoder/x86/ihevcd_function_selector_generic.c",
314 "decoder/x86/ihevcd_function_selector_ssse3.c",
315 "decoder/x86/ihevcd_function_selector_sse42.c",
316 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
317 "common/x86/ihevc_weighted_pred_ssse3_intr.c",
318 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
319 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
320 "common/x86/ihevc_itrans_recon_ssse3_intr.c",
321 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
322 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
323 "common/x86/ihevc_sao_ssse3_intr.c",
324 "common/x86/ihevc_deblk_ssse3_intr.c",
325 "common/x86/ihevc_padding_ssse3_intr.c",
326 "common/x86/ihevc_mem_fns_ssse3_intr.c",
327 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
328 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
329 "common/x86/ihevc_inter_pred_filters_sse42_intr.c",
330 "common/x86/ihevc_weighted_pred_sse42_intr.c",
331 "common/x86/ihevc_intra_pred_filters_sse42_intr.c",
332 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
333 "common/x86/ihevc_itrans_recon_sse42_intr.c",
334 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c",
335 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c",
336 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
337 "common/x86/ihevc_tables_x86_intr.c",
338 ],
339 },
340
341 x86: {
342 cflags: [
343 "-DX86",
344 "-DDISABLE_AVX2",
345 "-msse4.2",
346 "-mno-avx",
347 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
348 ],
349
350 local_include_dirs: [
351 "decoder/x86",
352 "common/x86",
353 ],
354
355 srcs: [
356 "decoder/x86/ihevcd_function_selector.c",
357 "decoder/x86/ihevcd_function_selector_generic.c",
358 "decoder/x86/ihevcd_function_selector_ssse3.c",
359 "decoder/x86/ihevcd_function_selector_sse42.c",
360 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
361 "common/x86/ihevc_weighted_pred_ssse3_intr.c",
362 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
363 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
364 "common/x86/ihevc_itrans_recon_ssse3_intr.c",
365 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
366 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
367 "common/x86/ihevc_sao_ssse3_intr.c",
368 "common/x86/ihevc_deblk_ssse3_intr.c",
369 "common/x86/ihevc_padding_ssse3_intr.c",
370 "common/x86/ihevc_mem_fns_ssse3_intr.c",
371 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
372 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
373 "common/x86/ihevc_inter_pred_filters_sse42_intr.c",
374 "common/x86/ihevc_weighted_pred_sse42_intr.c",
375 "common/x86/ihevc_intra_pred_filters_sse42_intr.c",
376 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
377 "common/x86/ihevc_itrans_recon_sse42_intr.c",
378 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c",
379 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c",
380 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
381 "common/x86/ihevc_tables_x86_intr.c",
382 ],
383 },
384 },
385}