• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1cc_library {
2    name: "libyuv",
3    vendor_available: true,
4    host_supported: true,
5    vndk: {
6        enabled: true,
7    },
8
9    srcs: [
10        "source/compare.cc",
11        "source/compare_common.cc",
12        "source/compare_gcc.cc",
13        "source/compare_neon.cc",
14        "source/compare_neon64.cc",
15        "source/compare_mmi.cc",
16        "source/compare_msa.cc",
17        "source/convert.cc",
18        "source/convert_argb.cc",
19        "source/convert_from.cc",
20        "source/convert_from_argb.cc",
21        "source/convert_to_argb.cc",
22        "source/convert_to_i420.cc",
23        "source/cpu_id.cc",
24        "source/planar_functions.cc",
25        "source/rotate.cc",
26        "source/rotate_any.cc",
27        "source/rotate_argb.cc",
28        "source/rotate_common.cc",
29        "source/rotate_gcc.cc",
30        "source/rotate_mmi.cc",
31        "source/rotate_msa.cc",
32        "source/rotate_neon.cc",
33        "source/rotate_neon64.cc",
34        "source/row_any.cc",
35        "source/row_common.cc",
36        "source/row_gcc.cc",
37        "source/row_mmi.cc",
38        "source/row_msa.cc",
39        "source/row_neon.cc",
40        "source/row_neon64.cc",
41        "source/scale.cc",
42        "source/scale_any.cc",
43        "source/scale_argb.cc",
44        "source/scale_common.cc",
45        "source/scale_gcc.cc",
46        "source/scale_mmi.cc",
47        "source/scale_msa.cc",
48        "source/scale_neon.cc",
49        "source/scale_neon64.cc",
50        "source/video_common.cc",
51        "source/convert_jpeg.cc",
52        "source/mjpeg_decoder.cc",
53        "source/mjpeg_validate.cc",
54    ],
55
56    cflags: [
57        "-Wall",
58        "-Werror",
59        "-Wno-unused-parameter",
60        "-fexceptions",
61        "-DHAVE_JPEG",
62    ],
63
64    shared_libs: ["libjpeg"],
65
66    export_include_dirs: ["include"],
67
68    apex_available: [
69        "//apex_available:platform",
70        "com.android.media.swcodec",
71    ],
72    min_sdk_version: "29",
73}
74
75// compatibilty static library until all uses of libyuv_static are replaced
76// with libyuv (b/37646797)
77cc_library_static {
78    name: "libyuv_static",
79    vendor_available: true,
80    whole_static_libs: ["libyuv"],
81    apex_available: [
82        "//apex_available:platform",
83        "com.android.media.swcodec",
84    ],
85    min_sdk_version: "29",
86}
87
88cc_test {
89    name: "libyuv_unittest",
90    static_libs: ["libyuv"],
91    shared_libs: ["libjpeg"],
92    cflags: ["-Wall", "-Werror"],
93    srcs: [
94        "unit_test/unit_test.cc",
95        "unit_test/basictypes_test.cc",
96        "unit_test/color_test.cc",
97        "unit_test/compare_test.cc",
98        "unit_test/convert_test.cc",
99        "unit_test/cpu_test.cc",
100        "unit_test/cpu_thread_test.cc",
101        "unit_test/math_test.cc",
102        "unit_test/planar_test.cc",
103        "unit_test/rotate_argb_test.cc",
104        "unit_test/rotate_test.cc",
105        "unit_test/scale_argb_test.cc",
106        "unit_test/scale_test.cc",
107        "unit_test/video_common_test.cc",
108    ],
109}
110
111cc_test {
112    name: "compare",
113    gtest: false,
114    srcs: [
115        "util/compare.cc",
116    ],
117    static_libs: ["libyuv"],
118}
119
120cc_test {
121    name: "cpuid",
122    gtest: false,
123    srcs: [
124        "util/cpuid.c",
125    ],
126    static_libs: ["libyuv"],
127}
128
129cc_test {
130    name: "psnr",
131    gtest: false,
132    srcs: [
133        "util/psnr_main.cc",
134        "util/psnr.cc",
135        "util/ssim.cc",
136    ],
137    static_libs: ["libyuv"],
138}
139
140cc_test {
141    name: "yuvconvert",
142    gtest: false,
143    srcs: [
144        "util/yuvconvert.cc",
145    ],
146    static_libs: ["libyuv"],
147    shared_libs: ["libjpeg"],
148}
149