xref: /aosp_15_r20/frameworks/av/media/module/codecs/amrnb/enc/Android.bp (revision ec779b8e0859a360c3d303172224686826e6e0e1)
1package {
2    default_team: "trendy_team_media_codec_framework",
3    default_applicable_licenses: [
4        "frameworks_av_media_codecs_amrnb_enc_license",
5    ],
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: "frameworks_av_media_codecs_amrnb_enc_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-Apache-2.0",
27        "SPDX-license-identifier-BSD",
28    ],
29    license_text: [
30        "NOTICE",
31    ],
32}
33
34cc_library_static {
35    name: "libstagefright_amrnbenc",
36    vendor_available: true,
37    min_sdk_version: "29",
38    apex_available: [
39        "//apex_available:platform",
40        "com.android.media.swcodec",
41    ],
42
43    srcs: [
44        "src/amrencode.cpp",
45        "src/autocorr.cpp",
46        "src/c2_9pf.cpp",
47        "src/c2_11pf.cpp",
48        "src/c3_14pf.cpp",
49        "src/c4_17pf.cpp",
50        "src/c8_31pf.cpp",
51        "src/c1035pf.cpp",
52        "src/calc_cor.cpp",
53        "src/calc_en.cpp",
54        "src/cbsearch.cpp",
55        "src/cl_ltp.cpp",
56        "src/cod_amr.cpp",
57        "src/convolve.cpp",
58        "src/cor_h.cpp",
59        "src/cor_h_x.cpp",
60        "src/cor_h_x2.cpp",
61        "src/corrwght_tab.cpp",
62        "src/dtx_enc.cpp",
63        "src/enc_lag3.cpp",
64        "src/enc_lag6.cpp",
65        "src/enc_output_format_tab.cpp",
66        "src/ets_to_if2.cpp",
67        "src/ets_to_wmf.cpp",
68        "src/g_adapt.cpp",
69        "src/g_code.cpp",
70        "src/g_pitch.cpp",
71        "src/gain_q.cpp",
72        "src/hp_max.cpp",
73        "src/inter_36.cpp",
74        "src/inter_36_tab.cpp",
75        "src/l_comp.cpp",
76        "src/l_extract.cpp",
77        "src/l_negate.cpp",
78        "src/lag_wind.cpp",
79        "src/lag_wind_tab.cpp",
80        "src/levinson.cpp",
81        "src/lpc.cpp",
82        "src/ol_ltp.cpp",
83        "src/p_ol_wgh.cpp",
84        "src/pitch_fr.cpp",
85        "src/pitch_ol.cpp",
86        "src/pre_big.cpp",
87        "src/pre_proc.cpp",
88        "src/prm2bits.cpp",
89        "src/q_gain_c.cpp",
90        "src/q_gain_p.cpp",
91        "src/qgain475.cpp",
92        "src/qgain795.cpp",
93        "src/qua_gain.cpp",
94        "src/s10_8pf.cpp",
95        "src/set_sign.cpp",
96        "src/sid_sync.cpp",
97        "src/sp_enc.cpp",
98        "src/spreproc.cpp",
99        "src/spstproc.cpp",
100        "src/ton_stab.cpp",
101    ],
102
103    header_libs: ["libstagefright_headers"],
104    export_include_dirs: ["src"],
105
106    cflags: [
107        "-DOSCL_UNUSED_ARG(x)=(void)(x)",
108        "-Werror",
109    ],
110
111    //addressing b/25409744
112    //sanitize: {
113    //    misc_undefined: [
114    //        "signed-integer-overflow",
115    //    ],
116    //},
117
118    shared_libs: ["libstagefright_amrnb_common"],
119
120    host_supported: true,
121    target: {
122        darwin: {
123            enabled: false,
124        },
125    },
126}
127
128//###############################################################################
129
130cc_test {
131    name: "libstagefright_amrnbenc_test",
132    gtest: false,
133
134    srcs: ["test/amrnb_enc_test.cpp"],
135
136    cflags: [
137        "-Wall",
138        "-Werror",
139    ],
140
141    local_include_dirs: ["src"],
142
143    static_libs: ["libstagefright_amrnbenc"],
144
145    shared_libs: ["libstagefright_amrnb_common"],
146
147    //addressing b/25409744
148    //sanitize: {
149    //    misc_undefined: [
150    //        "signed-integer-overflow",
151    //    ],
152    //},
153}
154