• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["external_libyuv_files_license"],
3}
4
5// Added automatically by a large-scale-change
6//
7// large-scale-change included anything that looked like it might be a license
8// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
9//
10// Please consider removing redundant or irrelevant files from 'license_text:'.
11// See: http://go/android-license-faq
12license {
13    name: "external_libyuv_files_license",
14    visibility: [":__subpackages__"],
15    license_kinds: [
16        "SPDX-license-identifier-BSD",
17    ],
18    license_text: [
19        "LICENSE",
20        "LICENSE_THIRD_PARTY",
21        "PATENTS",
22    ],
23}
24
25cc_library {
26    name: "libyuv",
27    vendor_available: true,
28    product_available: true,
29    host_supported: true,
30    vndk: {
31        enabled: true,
32    },
33
34    srcs: [
35        "source/compare.cc",
36        "source/compare_common.cc",
37        "source/compare_gcc.cc",
38        "source/compare_neon.cc",
39        "source/compare_neon64.cc",
40        "source/compare_mmi.cc",
41        "source/compare_msa.cc",
42        "source/convert.cc",
43        "source/convert_argb.cc",
44        "source/convert_from.cc",
45        "source/convert_from_argb.cc",
46        "source/convert_to_argb.cc",
47        "source/convert_to_i420.cc",
48        "source/cpu_id.cc",
49        "source/planar_functions.cc",
50        "source/rotate.cc",
51        "source/rotate_any.cc",
52        "source/rotate_argb.cc",
53        "source/rotate_common.cc",
54        "source/rotate_gcc.cc",
55        "source/rotate_mmi.cc",
56        "source/rotate_msa.cc",
57        "source/rotate_neon.cc",
58        "source/rotate_neon64.cc",
59        "source/row_any.cc",
60        "source/row_common.cc",
61        "source/row_gcc.cc",
62        "source/row_mmi.cc",
63        "source/row_msa.cc",
64        "source/row_neon.cc",
65        "source/row_neon64.cc",
66        "source/scale.cc",
67        "source/scale_any.cc",
68        "source/scale_argb.cc",
69        "source/scale_common.cc",
70        "source/scale_gcc.cc",
71        "source/scale_mmi.cc",
72        "source/scale_msa.cc",
73        "source/scale_neon.cc",
74        "source/scale_neon64.cc",
75        "source/video_common.cc",
76        "source/convert_jpeg.cc",
77        "source/mjpeg_decoder.cc",
78        "source/mjpeg_validate.cc",
79    ],
80
81    cflags: [
82        "-Wall",
83        "-Werror",
84        "-Wno-unused-parameter",
85        "-fexceptions",
86        "-DHAVE_JPEG",
87    ],
88
89    shared_libs: ["libjpeg"],
90
91    export_include_dirs: ["include"],
92
93    apex_available: [
94        "//apex_available:platform",
95        "com.android.media.swcodec",
96    ],
97    min_sdk_version: "29",
98}
99
100// compatibilty static library until all uses of libyuv_static are replaced
101// with libyuv (b/37646797)
102cc_library_static {
103    name: "libyuv_static",
104    vendor_available: true,
105    whole_static_libs: ["libyuv"],
106    apex_available: [
107        "//apex_available:platform",
108        "com.android.media.swcodec",
109    ],
110    min_sdk_version: "29",
111}
112
113cc_test {
114    name: "libyuv_unittest",
115    static_libs: ["libyuv"],
116    shared_libs: ["libjpeg"],
117    cflags: ["-Wall", "-Werror"],
118    srcs: [
119        "unit_test/unit_test.cc",
120        "unit_test/basictypes_test.cc",
121        "unit_test/color_test.cc",
122        "unit_test/compare_test.cc",
123        "unit_test/convert_test.cc",
124        "unit_test/cpu_test.cc",
125        "unit_test/cpu_thread_test.cc",
126        "unit_test/math_test.cc",
127        "unit_test/planar_test.cc",
128        "unit_test/rotate_argb_test.cc",
129        "unit_test/rotate_test.cc",
130        "unit_test/scale_argb_test.cc",
131        "unit_test/scale_test.cc",
132        "unit_test/video_common_test.cc",
133    ],
134}
135
136cc_test {
137    name: "compare",
138    gtest: false,
139    srcs: [
140        "util/compare.cc",
141    ],
142    static_libs: ["libyuv"],
143}
144
145cc_test {
146    name: "cpuid",
147    gtest: false,
148    srcs: [
149        "util/cpuid.c",
150    ],
151    static_libs: ["libyuv"],
152}
153
154cc_test {
155    name: "psnr",
156    gtest: false,
157    srcs: [
158        "util/psnr_main.cc",
159        "util/psnr.cc",
160        "util/ssim.cc",
161    ],
162    static_libs: ["libyuv"],
163}
164
165cc_test {
166    name: "yuvconvert",
167    gtest: false,
168    srcs: [
169        "util/yuvconvert.cc",
170    ],
171    static_libs: ["libyuv"],
172    shared_libs: ["libjpeg"],
173}
174