1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
17 */
18
19package {
20    // See: http://go/android-license-faq
21    // A large-scale-change added 'default_applicable_licenses' to import
22    // all of the 'license_kinds' from "frameworks_av_license"
23    // to get the below license kinds:
24    //   SPDX-license-identifier-Apache-2.0
25    default_applicable_licenses: ["frameworks_av_license"],
26}
27
28cc_defaults {
29    name: "C2Fuzzer-defaults",
30
31    srcs: [
32        "C2Fuzzer.cpp",
33    ],
34
35    static_libs: [
36        "liblog",
37        "libion",
38        "libfmq",
39        "libbase",
40        "libutils",
41        "libcutils",
42        "libcodec2",
43        "libhidlbase",
44        "libdmabufheap",
45        "libcodec2_vndk",
46        "libnativewindow",
47        "libcodec2_soft_common",
48        "libsfplugin_ccodec_utils",
49        "libstagefright_foundation",
50        "libstagefright_bufferpool@2.0.1",
51        "android.hardware.graphics.mapper@2.0",
52        "android.hardware.graphics.mapper@3.0",
53        "android.hardware.media.bufferpool@2.0",
54        "android.hardware.graphics.allocator@2.0",
55        "android.hardware.graphics.allocator@3.0",
56        "android.hardware.graphics.bufferqueue@2.0",
57    ],
58
59    shared_libs: [
60        "libui",
61        "libdl",
62        "libbinder",
63        "libhardware",
64        "libvndksupport",
65        "libprocessgroup",
66    ],
67
68    cflags: [
69        "-Wall",
70        "-Werror",
71    ],
72}
73
74cc_fuzz {
75    name: "C2FuzzerAvcDec",
76    defaults: ["C2Fuzzer-defaults"],
77
78    cflags: [
79        "-DC2COMPONENTNAME=\"c2.android.avc.decoder\"",
80    ],
81
82    static_libs: [
83        "libavcdec",
84        "libcodec2_soft_avcdec",
85    ],
86}
87
88cc_fuzz {
89    name: "C2FuzzerHevcDec",
90    defaults: ["C2Fuzzer-defaults"],
91
92    cflags: [
93        "-DC2COMPONENTNAME=\"c2.android.hevc.decoder\"",
94    ],
95
96    static_libs: [
97        "libhevcdec",
98        "libcodec2_soft_hevcdec",
99    ],
100}
101
102cc_fuzz {
103    name: "C2FuzzerMpeg2Dec",
104    defaults: ["C2Fuzzer-defaults"],
105
106    cflags: [
107        "-DC2COMPONENTNAME=\"c2.android.mpeg2.decoder\"",
108    ],
109
110    static_libs: [
111        "libmpeg2dec",
112        "libcodec2_soft_mpeg2dec",
113    ],
114}
115
116cc_fuzz {
117    name: "C2FuzzerMpeg4Dec",
118    defaults: ["C2Fuzzer-defaults"],
119
120    cflags: [
121        "-DC2COMPONENTNAME=\"c2.android.mpeg4.decoder\"",
122    ],
123
124    static_libs: [
125        "libstagefright_m4vh263dec",
126        "libcodec2_soft_mpeg4dec",
127    ],
128}
129
130cc_fuzz {
131    name: "C2FuzzerH263Dec",
132    defaults: ["C2Fuzzer-defaults"],
133
134    cflags: [
135        "-DC2COMPONENTNAME=\"c2.android.h263.decoder\"",
136    ],
137
138    static_libs: [
139        "libstagefright_m4vh263dec",
140        "libcodec2_soft_h263dec",
141    ],
142}
143
144cc_fuzz {
145    name: "C2FuzzerVp8Dec",
146    defaults: ["C2Fuzzer-defaults"],
147
148    cflags: [
149        "-DC2COMPONENTNAME=\"c2.android.vp8.decoder\"",
150    ],
151
152    static_libs: [
153        "libvpx",
154        "libcodec2_soft_vp8dec",
155    ],
156}
157
158cc_fuzz {
159    name: "C2FuzzerVp9Dec",
160    defaults: ["C2Fuzzer-defaults"],
161
162    cflags: [
163        "-DC2COMPONENTNAME=\"c2.android.vp9.decoder\"",
164    ],
165
166    static_libs: [
167        "libvpx",
168        "libcodec2_soft_vp9dec",
169    ],
170}
171
172cc_fuzz {
173    name: "C2FuzzerAacDec",
174    defaults: ["C2Fuzzer-defaults"],
175
176    cflags: [
177        "-DC2COMPONENTNAME=\"c2.android.aac.decoder\"",
178    ],
179
180    static_libs: [
181        "libFraunhoferAAC",
182        "libcodec2_soft_aacdec",
183    ],
184}
185
186cc_fuzz {
187    name: "C2FuzzerAmrnbDec",
188    defaults: ["C2Fuzzer-defaults"],
189
190    cflags: [
191        "-DC2COMPONENTNAME=\"c2.android.amrnb.decoder\"",
192    ],
193
194    static_libs: [
195        "libstagefright_amrnbdec",
196        "libstagefright_amrwbdec",
197        "libstagefright_amrnb_common",
198        "libcodec2_soft_amrnbdec",
199    ],
200}
201
202cc_fuzz {
203    name: "C2FuzzerAmrwbDec",
204    defaults: ["C2Fuzzer-defaults"],
205
206    cflags: [
207        "-DC2COMPONENTNAME=\"c2.android.amrwb.decoder\"",
208    ],
209
210    static_libs: [
211        "libstagefright_amrnbdec",
212        "libstagefright_amrwbdec",
213        "libstagefright_amrnb_common",
214        "libcodec2_soft_amrwbdec",
215    ],
216}
217
218cc_fuzz {
219    name: "C2FuzzerFlacDec",
220    defaults: ["C2Fuzzer-defaults"],
221
222    cflags: [
223        "-DC2COMPONENTNAME=\"c2.android.flac.decoder\"",
224    ],
225
226    static_libs: [
227        "libFLAC",
228        "libstagefright_flacdec",
229        "libcodec2_soft_flacdec",
230    ],
231}
232
233cc_fuzz {
234    name: "C2FuzzerG711AlawDec",
235    defaults: ["C2Fuzzer-defaults"],
236
237    cflags: [
238        "-DC2COMPONENTNAME=\"c2.android.g711.alaw.decoder\"",
239    ],
240
241    static_libs: [
242        "codecs_g711dec",
243        "libcodec2_soft_g711alawdec",
244    ],
245}
246
247cc_fuzz {
248    name: "C2FuzzerG711MlawDec",
249    defaults: ["C2Fuzzer-defaults"],
250
251    cflags: [
252        "-DC2COMPONENTNAME=\"c2.android.g711.mlaw.decoder\"",
253    ],
254
255    static_libs: [
256        "codecs_g711dec",
257        "libcodec2_soft_g711mlawdec",
258    ],
259}
260
261cc_fuzz {
262    name: "C2FuzzerGsmDec",
263    defaults: ["C2Fuzzer-defaults"],
264
265    cflags: [
266        "-DC2COMPONENTNAME=\"c2.android.gsm.decoder\"",
267    ],
268
269    static_libs: [
270        "libgsm",
271        "libcodec2_soft_gsmdec",
272    ],
273}
274
275cc_fuzz {
276    name: "C2FuzzerMp3Dec",
277    defaults: ["C2Fuzzer-defaults"],
278
279    cflags: [
280        "-DC2COMPONENTNAME=\"c2.android.mp3.decoder\"",
281    ],
282
283    static_libs: [
284        "libstagefright_mp3dec",
285        "libcodec2_soft_mp3dec",
286    ],
287}
288
289cc_fuzz {
290    name: "C2FuzzerOpusDec",
291    defaults: ["C2Fuzzer-defaults"],
292
293    cflags: [
294        "-DC2COMPONENTNAME=\"c2.android.opus.decoder\"",
295    ],
296
297    static_libs: [
298        "libopus",
299        "libcodec2_soft_opusdec",
300    ],
301}
302
303cc_fuzz {
304    name: "C2FuzzerRawDec",
305    defaults: ["C2Fuzzer-defaults"],
306
307    cflags: [
308        "-DC2COMPONENTNAME=\"c2.android.raw.decoder\"",
309    ],
310
311    static_libs: [
312        "libcodec2_soft_rawdec",
313    ],
314}
315
316cc_fuzz {
317    name: "C2FuzzerVorbisDec",
318    defaults: ["C2Fuzzer-defaults"],
319
320    cflags: [
321        "-DC2COMPONENTNAME=\"c2.android.vorbis.decoder\"",
322    ],
323
324    static_libs: [
325        "libvorbisidec",
326        "libcodec2_soft_vorbisdec",
327    ],
328}
329
330cc_fuzz {
331    name: "C2FuzzerXaacDec",
332    defaults: ["C2Fuzzer-defaults"],
333
334    cflags: [
335        "-DC2COMPONENTNAME=\"c2.android.xaac.decoder\"",
336    ],
337
338    static_libs: [
339        "libxaacdec",
340        "libcodec2_soft_xaacdec",
341    ],
342}
343