xref: /aosp_15_r20/frameworks/av/media/module/codecs/amrnb/dec/Android.bp (revision ec779b8e0859a360c3d303172224686826e6e0e1)
1package {
2    default_team: "trendy_team_media_codec_framework",
3    default_applicable_licenses: [
4        "frameworks_av_media_codecs_amrnb_dec_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_dec_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_amrnbdec",
36    vendor_available: true,
37    host_supported: true,
38    min_sdk_version: "29",
39    apex_available: [
40        "//apex_available:platform",
41        "com.android.media.swcodec",
42    ],
43
44    srcs: [
45        "src/a_refl.cpp",
46        "src/agc.cpp",
47        "src/amrdecode.cpp",
48        "src/b_cn_cod.cpp",
49        "src/bgnscd.cpp",
50        "src/c_g_aver.cpp",
51        "src/d2_9pf.cpp",
52        "src/d2_11pf.cpp",
53        "src/d3_14pf.cpp",
54        "src/d4_17pf.cpp",
55        "src/d8_31pf.cpp",
56        "src/d1035pf.cpp",
57        "src/d_gain_c.cpp",
58        "src/d_gain_p.cpp",
59        "src/d_plsf.cpp",
60        "src/d_plsf_3.cpp",
61        "src/d_plsf_5.cpp",
62        "src/dec_amr.cpp",
63        "src/dec_gain.cpp",
64        "src/dec_input_format_tab.cpp",
65        "src/dec_lag3.cpp",
66        "src/dec_lag6.cpp",
67        "src/dtx_dec.cpp",
68        "src/ec_gains.cpp",
69        "src/ex_ctrl.cpp",
70        "src/if2_to_ets.cpp",
71        "src/int_lsf.cpp",
72        "src/lsp_avg.cpp",
73        "src/ph_disp.cpp",
74        "src/post_pro.cpp",
75        "src/preemph.cpp",
76        "src/pstfilt.cpp",
77        "src/qgain475_tab.cpp",
78        "src/sp_dec.cpp",
79        "src/wmf_to_ets.cpp",
80    ],
81
82    export_include_dirs: ["src"],
83
84    cflags: [
85        "-DOSCL_IMPORT_REF=",
86        "-DOSCL_UNUSED_ARG(x)=(void)(x)",
87
88        "-Werror",
89    ],
90
91    //sanitize: {
92    //    misc_undefined: [
93    //        "signed-integer-overflow",
94    //    ],
95    //},
96
97    shared_libs: [
98        "liblog",
99        "libstagefright_amrnb_common",
100    ],
101
102    target: {
103        darwin: {
104            enabled: false,
105        },
106    },
107}
108
109//###############################################################################
110cc_test {
111    name: "libstagefright_amrnbdec_test",
112    gtest: false,
113    host_supported: true,
114
115    srcs: ["test/amrnbdec_test.cpp"],
116
117    cflags: [
118        "-Wall",
119        "-Werror",
120    ],
121
122    local_include_dirs: ["src"],
123
124    static_libs: [
125        "libsndfile",
126        "libstagefright_amrnbdec",
127    ],
128
129    shared_libs: [
130        "libaudioutils",
131        "liblog",
132        "libstagefright_amrnb_common",
133    ],
134
135    target: {
136        darwin: {
137            enabled: false,
138        },
139    },
140
141    //sanitize: {
142    //    misc_undefined: [
143    //        "signed-integer-overflow",
144    //    ],
145    //},
146}
147