Bob Badour | 56786ac | 2021-02-25 15:24:36 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["frameworks_av_media_codecs_mp3dec_license"], |
| 3 | } |
| 4 | |
| 5 | // Added automatically by a large-scale-change that took the approach of |
| 6 | // 'apply every license found to every target'. While this makes sure we respect |
| 7 | // every license restriction, it may not be entirely correct. |
| 8 | // |
| 9 | // e.g. GPL in an MIT project might only apply to the contrib/ directory. |
| 10 | // |
| 11 | // Please consider splitting the single license below into multiple licenses, |
| 12 | // taking care not to lose any license_kind information, and overriding the |
| 13 | // default license using the 'licenses: [...]' property on targets as needed. |
| 14 | // |
| 15 | // For unused files, consider creating a 'fileGroup' with "//visibility:private" |
| 16 | // to attach the license to, and including a comment whether the files may be |
| 17 | // used in the current project. |
| 18 | // See: http://go/android-license-faq |
| 19 | license { |
| 20 | name: "frameworks_av_media_codecs_mp3dec_license", |
| 21 | visibility: [":__subpackages__"], |
| 22 | license_kinds: [ |
| 23 | "SPDX-license-identifier-Apache-2.0", |
| 24 | "SPDX-license-identifier-BSD", |
| 25 | ], |
| 26 | license_text: [ |
| 27 | "NOTICE", |
| 28 | ], |
| 29 | } |
| 30 | |
Colin Cross | 8e99d5e | 2020-12-10 15:34:17 -0800 | [diff] [blame] | 31 | cc_library_headers { |
| 32 | name: "libstagefright_mp3dec_headers", |
| 33 | vendor_available: true, |
| 34 | min_sdk_version: "29", |
| 35 | host_supported:true, |
| 36 | export_include_dirs: [ |
| 37 | "include", |
| 38 | "src", |
| 39 | ], |
| 40 | apex_available: [ |
| 41 | "//apex_available:platform", |
| 42 | "com.android.media.swcodec", |
| 43 | ], |
| 44 | } |
| 45 | |
Ray Essick | 7a9b004 | 2020-11-29 11:20:26 -0800 | [diff] [blame] | 46 | cc_library_static { |
| 47 | name: "libstagefright_mp3dec", |
| 48 | vendor_available: true, |
| 49 | min_sdk_version: "29", |
| 50 | |
| 51 | host_supported:true, |
| 52 | srcs: [ |
| 53 | "src/pvmp3_normalize.cpp", |
| 54 | "src/pvmp3_alias_reduction.cpp", |
| 55 | "src/pvmp3_crc.cpp", |
| 56 | "src/pvmp3_decode_header.cpp", |
| 57 | "src/pvmp3_decode_huff_cw.cpp", |
| 58 | "src/pvmp3_getbits.cpp", |
| 59 | "src/pvmp3_dequantize_sample.cpp", |
| 60 | "src/pvmp3_framedecoder.cpp", |
| 61 | "src/pvmp3_get_main_data_size.cpp", |
| 62 | "src/pvmp3_get_side_info.cpp", |
| 63 | "src/pvmp3_get_scale_factors.cpp", |
| 64 | "src/pvmp3_mpeg2_get_scale_data.cpp", |
| 65 | "src/pvmp3_mpeg2_get_scale_factors.cpp", |
| 66 | "src/pvmp3_mpeg2_stereo_proc.cpp", |
| 67 | "src/pvmp3_huffman_decoding.cpp", |
| 68 | "src/pvmp3_huffman_parsing.cpp", |
| 69 | "src/pvmp3_tables.cpp", |
| 70 | "src/pvmp3_imdct_synth.cpp", |
| 71 | "src/pvmp3_mdct_6.cpp", |
| 72 | "src/pvmp3_dct_6.cpp", |
| 73 | "src/pvmp3_poly_phase_synthesis.cpp", |
| 74 | "src/pvmp3_equalizer.cpp", |
| 75 | "src/pvmp3_seek_synch.cpp", |
| 76 | "src/pvmp3_stereo_proc.cpp", |
| 77 | "src/pvmp3_reorder.cpp", |
| 78 | |
| 79 | "src/pvmp3_polyphase_filter_window.cpp", |
| 80 | "src/pvmp3_mdct_18.cpp", |
| 81 | "src/pvmp3_dct_9.cpp", |
| 82 | "src/pvmp3_dct_16.cpp", |
| 83 | ], |
| 84 | |
| 85 | arch: { |
| 86 | arm: { |
| 87 | exclude_srcs: [ |
| 88 | "src/pvmp3_polyphase_filter_window.cpp", |
| 89 | "src/pvmp3_mdct_18.cpp", |
| 90 | "src/pvmp3_dct_9.cpp", |
| 91 | "src/pvmp3_dct_16.cpp", |
| 92 | ], |
| 93 | srcs: [ |
| 94 | "src/asm/pvmp3_polyphase_filter_window_gcc.s", |
| 95 | "src/asm/pvmp3_mdct_18_gcc.s", |
| 96 | "src/asm/pvmp3_dct_9_gcc.s", |
| 97 | "src/asm/pvmp3_dct_16_gcc.s", |
| 98 | ], |
| 99 | |
| 100 | instruction_set: "arm", |
| 101 | }, |
| 102 | }, |
| 103 | |
| 104 | sanitize: { |
| 105 | misc_undefined: [ |
| 106 | "signed-integer-overflow", |
| 107 | ], |
| 108 | cfi: true, |
| 109 | }, |
| 110 | |
| 111 | include_dirs: ["frameworks/av/media/libstagefright/include"], |
| 112 | |
Colin Cross | 8e99d5e | 2020-12-10 15:34:17 -0800 | [diff] [blame] | 113 | header_libs: ["libstagefright_mp3dec_headers"], |
| 114 | export_header_lib_headers: ["libstagefright_mp3dec_headers"], |
Ray Essick | 7a9b004 | 2020-11-29 11:20:26 -0800 | [diff] [blame] | 115 | |
| 116 | cflags: [ |
| 117 | "-DOSCL_UNUSED_ARG(x)=(void)(x)", |
| 118 | "-Werror", |
| 119 | ], |
| 120 | |
| 121 | target: { |
| 122 | darwin: { |
| 123 | enabled: false, |
| 124 | }, |
| 125 | }, |
| 126 | } |
| 127 | |
| 128 | //############################################################################### |
| 129 | cc_test { |
| 130 | name: "libstagefright_mp3dec_test", |
| 131 | gtest: false, |
| 132 | |
| 133 | srcs: [ |
| 134 | "test/mp3dec_test.cpp", |
| 135 | "test/mp3reader.cpp", |
| 136 | ], |
| 137 | |
| 138 | cflags: ["-Wall", "-Werror"], |
| 139 | |
| 140 | local_include_dirs: [ |
| 141 | "src", |
| 142 | "include", |
| 143 | ], |
| 144 | |
| 145 | sanitize: { |
| 146 | misc_undefined: [ |
| 147 | "signed-integer-overflow", |
| 148 | ], |
| 149 | cfi: true, |
| 150 | }, |
| 151 | |
| 152 | static_libs: [ |
| 153 | "libstagefright_mp3dec", |
| 154 | "libsndfile", |
| 155 | ], |
| 156 | |
| 157 | shared_libs: ["libaudioutils"], |
| 158 | } |