• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1aom_av1_common_sources +=
2["common/av1_config.c"]
3
4package {
5    default_applicable_licenses: ["external_libaom_license"],
6}
7
8// Added automatically by a large-scale-change that took the approach of
9// 'apply every license found to every target'. While this makes sure we respect
10// every license restriction, it may not be entirely correct.
11//
12// e.g. GPL in an MIT project might only apply to the contrib/ directory.
13//
14// Please consider splitting the single license below into multiple licenses,
15// taking care not to lose any license_kind information, and overriding the
16// default license using the 'licenses: [...]' property on targets as needed.
17//
18// For unused files, consider creating a 'fileGroup' with "//visibility:private"
19// to attach the license to, and including a comment whether the files may be
20// used in the current project.
21// See: http://go/android-license-faq
22license {
23    name: "external_libaom_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-BSD",
27        "SPDX-license-identifier-ISC",
28        "SPDX-license-identifier-MIT",
29        "legacy_by_exception_only", // by exception only
30        "legacy_unencumbered",
31    ],
32    license_text: [
33        "LICENSE",
34        "PATENTS",
35    ],
36}
37
38cc_defaults {
39    name: "libaom_defaults",
40
41    cflags: [
42        "-O3",
43    ],
44
45    min_sdk_version: "29",
46    apex_available: [
47        "//apex_available:platform",
48        "com.android.media.swcodec",
49    ],
50
51    target: {
52        android: {
53            sanitize: {
54                cfi: true,
55                config: {
56                    cfi_assembly_support: true,
57                },
58            },
59        },
60    },
61
62    arch: {
63        arm64: {
64            local_include_dirs: [
65                "config/",
66                "config/arm64/",
67            ],
68        },
69
70        // configured to require the neon unit
71        arm: {
72            local_include_dirs: [
73                "config/",
74                "config/arm/",
75            ],
76        },
77
78        x86_64: {
79            local_include_dirs: [
80                "config/",
81                "config/x86_64/",
82            ],
83        },
84
85        x86: {
86            local_include_dirs: [
87                "config/",
88                "config/x86/",
89            ],
90        },
91
92        riscv64: {
93            local_include_dirs: [
94                "config/",
95                "config/riscv64/",
96            ],
97        },
98    },
99}
100
101cc_library_static {
102    name: "libaom_arm_crc32",
103    defaults: [ "libaom_defaults" ],
104    host_supported: true,
105    vendor_available: true,
106    visibility: ["//visibility:private"],
107
108    cflags: [
109        "-Xclang -target-feature",
110        // This comment prevents bpfmt from sorting the flags incorrectly.
111        "-Xclang +crc",
112    ],
113
114    arch: {
115        arm64: {
116            srcs: aom_av1_encoder_intrin_arm_crc32,
117        },
118    },
119}
120
121cc_library_static {
122    name: "libaom_avx",
123    defaults: ["libaom_defaults"],
124    host_supported: true,
125    vendor_available: true,
126    visibility: ["//visibility:private"],
127
128    cflags: [
129        "-Xclang -target-feature",
130        // This comment prevents bpfmt from sorting the flags incorrectly.
131        "-Xclang +avx",
132    ],
133
134    arch: {
135        x86: {
136            srcs: aom_dsp_encoder_intrin_avx,
137        },
138
139        x86_64: {
140            srcs: aom_dsp_encoder_intrin_avx,
141        },
142    },
143}
144
145cc_library_static {
146    name: "libaom_avx2",
147    defaults: ["libaom_defaults"],
148    host_supported: true,
149    vendor_available: true,
150    visibility: ["//visibility:private"],
151
152    cflags: [
153        "-Xclang -target-feature",
154        // This comment prevents bpfmt from sorting the flags incorrectly.
155        "-Xclang +avx2",
156    ],
157
158    arch: {
159        x86: {
160            srcs: aom_av1_common_intrin_avx2 +
161                aom_av1_encoder_intrin_avx2 +
162                aom_dsp_common_intrin_avx2 +
163                aom_dsp_encoder_intrin_avx2,
164        },
165
166        x86_64: {
167            srcs: aom_av1_common_intrin_avx2 +
168                aom_av1_encoder_intrin_avx2 +
169                aom_dsp_common_intrin_avx2 +
170                aom_dsp_encoder_intrin_avx2,
171        },
172    },
173}
174
175cc_library_static {
176    name: "libaom_neon_dotprod",
177    defaults: [ "libaom_defaults" ],
178    host_supported: true,
179    vendor_available: true,
180    visibility: ["//visibility:private"],
181
182    cflags: [
183        "-Xclang -target-feature",
184        // This comment prevents bpfmt from sorting the flags incorrectly.
185        "-Xclang +dotprod",
186    ],
187
188    arch: {
189        arm64: {
190            srcs: aom_av1_common_intrin_neon_dotprod +
191                aom_av1_encoder_intrin_neon_dotprod +
192                aom_dsp_common_intrin_neon_dotprod +
193                aom_dsp_encoder_intrin_neon_dotprod
194        },
195    },
196}
197
198cc_library_static {
199    name: "libaom_neon_i8mm",
200    defaults: [ "libaom_defaults" ],
201    host_supported: true,
202    vendor_available: true,
203    visibility: ["//visibility:private"],
204
205    cflags: [
206        "-Xclang -target-feature",
207        // This comment prevents bpfmt from sorting the flags incorrectly.
208        "-Xclang +dotprod",
209        // This comment prevents bpfmt from sorting the flags incorrectly.
210        "-Xclang -target-feature",
211        // This comment prevents bpfmt from sorting the flags incorrectly.
212        "-Xclang +i8mm",
213    ],
214
215    arch: {
216        arm64: {
217            srcs: aom_av1_common_intrin_neon_i8mm +
218                aom_dsp_common_intrin_neon_i8mm
219        },
220    },
221}
222
223cc_library_static {
224    name: "libaom_sse4_1",
225    defaults: ["libaom_defaults"],
226    host_supported: true,
227    vendor_available: true,
228    visibility: ["//visibility:private"],
229
230    cflags: [
231        "-Xclang -target-feature",
232        // This comment prevents bpfmt from sorting the flags incorrectly.
233        "-Xclang +sse4.1",
234    ],
235
236    arch: {
237        x86: {
238            srcs: aom_av1_common_intrin_sse4_1 +
239                aom_av1_encoder_intrin_sse4_1 +
240                aom_dsp_common_intrin_sse4_1 +
241                aom_dsp_encoder_intrin_sse4_1,
242        },
243
244        x86_64: {
245            srcs: aom_av1_common_intrin_sse4_1 +
246                aom_av1_encoder_intrin_sse4_1 +
247                aom_dsp_common_intrin_sse4_1 +
248                aom_dsp_encoder_intrin_sse4_1,
249        },
250    },
251}
252
253cc_library_static {
254    name: "libaom_sse4_2",
255    defaults: ["libaom_defaults"],
256    host_supported: true,
257    vendor_available: true,
258    visibility: ["//visibility:private"],
259
260    cflags: [
261        "-Xclang -target-feature",
262        // This comment prevents bpfmt from sorting the flags incorrectly.
263        "-Xclang +sse4.2",
264    ],
265
266    arch: {
267        x86: {
268            srcs: aom_av1_encoder_intrin_sse4_2,
269        },
270
271        x86_64: {
272            srcs: aom_av1_encoder_intrin_sse4_2,
273        },
274    },
275}
276
277cc_library_static {
278    name: "libaom_sve",
279    defaults: [ "libaom_defaults" ],
280    host_supported: true,
281    vendor_available: true,
282    visibility: ["//visibility:private"],
283
284    cflags: [
285        "-Xclang -target-feature",
286        // This comment prevents bpfmt from sorting the flags incorrectly.
287        "-Xclang +dotprod",
288        // This comment prevents bpfmt from sorting the flags incorrectly.
289        "-Xclang -target-feature",
290        // This comment prevents bpfmt from sorting the flags incorrectly.
291        "-Xclang +i8mm",
292        // This comment prevents bpfmt from sorting the flags incorrectly.
293        "-Xclang -target-feature",
294        // This comment prevents bpfmt from sorting the flags incorrectly.
295        "-Xclang +sve",
296    ],
297
298    arch: {
299        arm64: {
300            srcs: aom_av1_common_intrin_sve +
301                aom_av1_encoder_intrin_sve +
302                aom_dsp_common_intrin_sve +
303                aom_dsp_encoder_intrin_sve
304        },
305    },
306}
307
308cc_library_static {
309    name: "libaom_sve2",
310    defaults: [ "libaom_defaults" ],
311    host_supported: true,
312    vendor_available: true,
313    visibility: ["//visibility:private"],
314
315    cflags: [
316        "-Xclang -target-feature",
317        // This comment prevents bpfmt from sorting the flags incorrectly.
318        "-Xclang +dotprod",
319        // This comment prevents bpfmt from sorting the flags incorrectly.
320        "-Xclang -target-feature",
321        // This comment prevents bpfmt from sorting the flags incorrectly.
322        "-Xclang +i8mm",
323        // This comment prevents bpfmt from sorting the flags incorrectly.
324        "-Xclang -target-feature",
325        // This comment prevents bpfmt from sorting the flags incorrectly.
326        "-Xclang +sve",
327        // This comment prevents bpfmt from sorting the flags incorrectly.
328        "-Xclang -target-feature",
329        // This comment prevents bpfmt from sorting the flags incorrectly.
330        "-Xclang +sve2",
331    ],
332
333    arch: {
334        arm64: {
335            srcs: aom_av1_common_intrin_sve2
336        },
337    },
338}
339
340cc_library_static {
341    name: "libaom",
342    defaults: [ "libaom_defaults" ],
343    host_supported: true,
344    vendor_available: true,
345
346    export_include_dirs: [
347        ".",
348    ],
349
350    min_sdk_version: "29",
351    apex_available: [
352        "//apex_available:platform",
353        "com.android.media.swcodec",
354    ],
355
356    arch: {
357        arm64: {
358            srcs: aom_av1_common_sources +
359                aom_av1_decoder_sources +
360                aom_dsp_common_sources +
361                aom_dsp_decoder_sources +
362                aom_mem_sources +
363                ["aom_ports/aarch64_cpudetect.c"] +
364                aom_rtcd_sources +
365                aom_scale_sources +
366                aom_sources +
367                aom_util_sources +
368                aom_av1_common_intrin_neon +
369                aom_dsp_common_intrin_neon +
370                aom_av1_encoder_intrin_neon +
371                aom_av1_encoder_sources +
372                aom_dsp_encoder_intrin_neon +
373                aom_dsp_encoder_sources,
374            whole_static_libs: [
375                "libaom_arm_crc32",
376                "libaom_neon_dotprod",
377                "libaom_neon_i8mm",
378                "libaom_sve",
379                "libaom_sve2",
380            ],
381        },
382
383        // configured to require the neon unit
384        arm: {
385            srcs: aom_av1_common_sources +
386                aom_av1_decoder_sources +
387                aom_dsp_common_sources +
388                aom_dsp_decoder_sources +
389                aom_mem_sources +
390                aom_rtcd_sources +
391                ["aom_ports/aarch32_cpudetect.c"] +
392                aom_scale_sources +
393                aom_sources +
394                aom_util_sources +
395                aom_av1_common_intrin_neon +
396                aom_dsp_common_intrin_neon +
397                aom_av1_encoder_intrin_neon +
398                aom_av1_encoder_sources +
399                aom_dsp_encoder_intrin_neon +
400                aom_dsp_encoder_sources,
401        },
402
403        x86_64: {
404            cflags: [
405                "-mssse3",
406            ],
407            srcs: aom_av1_common_sources +
408                aom_av1_decoder_sources +
409                aom_dsp_common_sources +
410                aom_dsp_decoder_sources +
411                aom_mem_sources +
412                aom_rtcd_sources +
413                aom_scale_sources +
414                aom_sources +
415                aom_util_sources +
416                aom_dsp_common_asm_sse2 +
417                aom_dsp_common_asm_ssse3 +
418                aom_ports_asm_x86 +
419                aom_av1_common_intrin_sse2 +
420                aom_dsp_common_intrin_sse2 +
421                aom_av1_common_intrin_ssse3 +
422                aom_dsp_common_intrin_ssse3 +
423                aom_av1_encoder_asm_sse2 +
424                aom_av1_encoder_asm_ssse3_x86_64 +
425                aom_av1_encoder_intrin_sse2 +
426                aom_av1_encoder_intrin_sse3 +
427                aom_av1_encoder_sources +
428                aom_dsp_encoder_asm_sse2 +
429                aom_dsp_encoder_asm_sse2_x86_64 +
430                aom_dsp_encoder_asm_ssse3 +
431                aom_dsp_encoder_asm_ssse3_x86_64 +
432                aom_dsp_encoder_intrin_sse2 +
433                aom_dsp_encoder_intrin_ssse3 +
434                aom_dsp_encoder_sources,
435            whole_static_libs: [
436                "libaom_avx",
437                "libaom_avx2",
438                "libaom_sse4_1",
439                "libaom_sse4_2",
440            ],
441        },
442
443        x86: {
444            local_include_dirs: [
445                "config/",
446                "config/x86/",
447            ],
448            cflags: [
449                "-mssse3",
450            ],
451            srcs: aom_av1_common_sources +
452                aom_av1_decoder_sources +
453                aom_dsp_common_sources +
454                aom_dsp_decoder_sources +
455                aom_mem_sources +
456                aom_rtcd_sources +
457                aom_scale_sources +
458                aom_sources +
459                aom_util_sources +
460                aom_dsp_common_asm_sse2 +
461                aom_dsp_common_asm_ssse3 +
462                aom_ports_asm_x86 +
463                aom_av1_common_intrin_sse2 +
464                aom_dsp_common_intrin_sse2 +
465                aom_av1_common_intrin_ssse3 +
466                aom_dsp_common_intrin_ssse3 +
467                aom_av1_common_intrin_ssse3_x86 +
468                aom_av1_encoder_asm_sse2 +
469                aom_av1_encoder_intrin_sse2 +
470                aom_av1_encoder_intrin_sse3 +
471                aom_av1_encoder_sources +
472                aom_dsp_encoder_asm_sse2 +
473                aom_dsp_encoder_asm_ssse3 +
474                aom_dsp_encoder_intrin_sse2 +
475                aom_dsp_encoder_intrin_ssse3 +
476                aom_dsp_encoder_sources,
477            whole_static_libs: [
478                "libaom_avx",
479                "libaom_avx2",
480                "libaom_sse4_1",
481                "libaom_sse4_2",
482            ],
483        },
484
485        riscv64: {
486            local_include_dirs: [
487                "config/",
488                "config/riscv64/",
489            ],
490            cflags: [
491            ],
492            srcs: aom_av1_common_intrin_rvv +
493                aom_av1_common_sources +
494                aom_av1_decoder_sources +
495                aom_dsp_common_sources +
496                aom_dsp_decoder_sources +
497                aom_mem_sources +
498                ["aom_ports/riscv_cpudetect.c"] +
499                aom_rtcd_sources +
500                aom_scale_sources +
501                aom_sources +
502                aom_util_sources +
503                aom_av1_encoder_sources +
504                aom_dsp_encoder_sources,
505        },
506    },
507
508    sanitize: {
509        blocklist: "libaom_blocklist.txt",
510    },
511
512}
513
514cc_fuzz {
515    name: "av1_dec_fuzzer",
516    defaults: [ "libaom_defaults" ],
517    host_supported: true,
518    srcs: [
519        "examples/av1_dec_fuzzer.cc",
520    ],
521    static_libs: [
522        "libaom",
523    ],
524}
525