Colin Cross | 39449cf | 2017-04-20 14:12:11 -0700 | [diff] [blame] | 1 | cc_library_static { |
| 2 | name: "libmpeg2dec", |
Jiyong Park | 3a0b1b1 | 2017-08-07 13:15:21 +0900 | [diff] [blame] | 3 | vendor_available: true, |
Harish Mahendrakar | 826b102 | 2019-08-15 18:21:48 -0700 | [diff] [blame] | 4 | host_supported:true, |
Jiyong Park | 3a0b1b1 | 2017-08-07 13:15:21 +0900 | [diff] [blame] | 5 | shared_libs: ["liblog", "libcutils"], |
Colin Cross | 39449cf | 2017-04-20 14:12:11 -0700 | [diff] [blame] | 6 | |
| 7 | cflags: [ |
| 8 | "-D_LIB", |
| 9 | "-DMULTICORE", |
| 10 | "-fPIC", |
| 11 | |
| 12 | "-O3", |
| 13 | "-DANDROID", |
| 14 | "-Werror", |
| 15 | ], |
| 16 | |
| 17 | export_include_dirs: [ |
| 18 | "decoder", |
| 19 | "common", |
| 20 | ], |
| 21 | |
| 22 | srcs: [ |
| 23 | "common/impeg2_buf_mgr.c", |
| 24 | "common/impeg2_disp_mgr.c", |
| 25 | "common/impeg2_format_conv.c", |
| 26 | "common/impeg2_globals.c", |
| 27 | "common/impeg2_idct.c", |
| 28 | "common/impeg2_inter_pred.c", |
| 29 | "common/impeg2_job_queue.c", |
| 30 | "common/impeg2_mem_func.c", |
| 31 | "common/ithread.c", |
| 32 | "decoder/impeg2d_api_main.c", |
| 33 | "decoder/impeg2d_bitstream.c", |
| 34 | "decoder/impeg2d_debug.c", |
| 35 | "decoder/impeg2d_dec_hdr.c", |
| 36 | "decoder/impeg2d_decoder.c", |
| 37 | "decoder/impeg2d_d_pic.c", |
| 38 | "decoder/impeg2d_function_selector_generic.c", |
| 39 | "decoder/impeg2d_globals.c", |
| 40 | "decoder/impeg2d_i_pic.c", |
| 41 | "decoder/impeg2d_mc.c", |
| 42 | "decoder/impeg2d_mv_dec.c", |
| 43 | "decoder/impeg2d_pic_proc.c", |
| 44 | "decoder/impeg2d_pnb_pic.c", |
| 45 | "decoder/impeg2d_vld.c", |
| 46 | "decoder/impeg2d_vld_tables.c", |
| 47 | "decoder/impeg2d_deinterlace.c", |
| 48 | "common/icv_sad.c", |
| 49 | "common/icv_variance.c", |
| 50 | "common/ideint.c", |
| 51 | "common/ideint_cac.c", |
| 52 | "common/ideint_debug.c", |
| 53 | "common/ideint_function_selector_generic.c", |
| 54 | "common/ideint_utils.c", |
| 55 | ], |
| 56 | |
| 57 | arch: { |
| 58 | arm: { |
| 59 | local_include_dirs: [ |
| 60 | "decoder/arm", |
| 61 | "common/arm", |
| 62 | ], |
| 63 | |
| 64 | srcs: [ |
| 65 | "decoder/arm/impeg2d_function_selector.c", |
| 66 | "common/arm/ideint_function_selector.c", |
| 67 | ], |
| 68 | |
Isaac Chen | 46fd806 | 2017-09-12 17:00:24 +0800 | [diff] [blame] | 69 | neon: { |
Colin Cross | 39449cf | 2017-04-20 14:12:11 -0700 | [diff] [blame] | 70 | srcs: [ |
| 71 | "decoder/arm/impeg2d_function_selector_a9q.c", |
| 72 | "common/arm/ideint_function_selector_a9.c", |
| 73 | "common/arm/icv_sad_a9.s", |
| 74 | "common/arm/icv_variance_a9.s", |
| 75 | "common/arm/ideint_spatial_filter_a9.s", |
| 76 | "common/arm/ideint_cac_a9.s", |
| 77 | "common/arm/impeg2_format_conv.s", |
| 78 | "common/arm/impeg2_idct.s", |
| 79 | "common/arm/impeg2_inter_pred.s", |
| 80 | "common/arm/impeg2_mem_func.s", |
| 81 | ], |
| 82 | cflags: [ |
| 83 | "-UDISABLE_NEON", |
| 84 | "-UDEFAULT_ARCH", |
| 85 | "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q", |
| 86 | ], |
| 87 | }, |
| 88 | |
| 89 | cflags: [ |
| 90 | "-DDISABLE_NEONINTR", |
| 91 | "-DARM", |
| 92 | "-DARMGCC", |
| 93 | |
| 94 | // These are overriden by armv7_a_neon |
| 95 | "-DDISABLE_NEON", |
| 96 | "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON", |
| 97 | ], |
| 98 | instruction_set: "arm", |
| 99 | }, |
| 100 | |
| 101 | arm64: { |
| 102 | cflags: [ |
| 103 | "-DARMV8", |
| 104 | "-DDISABLE_NEONINTR", |
| 105 | "-DARM", |
| 106 | "-DARMGCC", |
| 107 | |
| 108 | "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC", |
| 109 | ], |
| 110 | local_include_dirs: [ |
| 111 | "decoder/arm", |
| 112 | "common/armv8", |
| 113 | ], |
| 114 | |
| 115 | srcs: [ |
| 116 | "decoder/arm/impeg2d_function_selector.c", |
| 117 | "decoder/arm/impeg2d_function_selector_av8.c", |
| 118 | "common/arm/ideint_function_selector.c", |
| 119 | "common/arm/ideint_function_selector_av8.c", |
| 120 | "common/armv8/icv_sad_av8.s", |
| 121 | "common/armv8/icv_variance_av8.s", |
| 122 | "common/armv8/ideint_spatial_filter_av8.s", |
| 123 | "common/armv8/ideint_cac_av8.s", |
| 124 | "common/armv8/impeg2_neon_macros.s", |
| 125 | "common/armv8/impeg2_format_conv.s", |
| 126 | "common/armv8/impeg2_idct.s", |
| 127 | "common/armv8/impeg2_inter_pred.s", |
| 128 | "common/armv8/impeg2_mem_func.s", |
| 129 | ], |
| 130 | }, |
| 131 | |
| 132 | mips: { |
| 133 | local_include_dirs: ["common/mips"], |
| 134 | |
| 135 | srcs: [ |
| 136 | "decoder/mips/impeg2d_function_selector.c", |
| 137 | "common/mips/ideint_function_selector.c", |
| 138 | ], |
| 139 | }, |
| 140 | |
| 141 | mips64: { |
| 142 | local_include_dirs: ["common/mips"], |
| 143 | |
| 144 | srcs: [ |
| 145 | "decoder/mips/impeg2d_function_selector.c", |
| 146 | "common/mips/ideint_function_selector.c", |
| 147 | ], |
| 148 | }, |
| 149 | |
| 150 | x86: { |
| 151 | cflags: [ |
| 152 | "-DX86", |
| 153 | "-DDISABLE_AVX2", |
| 154 | "-msse4.2", |
| 155 | "-mno-avx", |
| 156 | "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", |
| 157 | ], |
| 158 | |
| 159 | local_include_dirs: [ |
| 160 | "decoder/x86", |
| 161 | "common/x86", |
| 162 | ], |
| 163 | |
| 164 | srcs: [ |
| 165 | "decoder/x86/impeg2d_function_selector.c", |
| 166 | "decoder/x86/impeg2d_function_selector_avx2.c", |
| 167 | "decoder/x86/impeg2d_function_selector_ssse3.c", |
| 168 | "decoder/x86/impeg2d_function_selector_sse42.c", |
| 169 | "common/x86/ideint_function_selector.c", |
| 170 | "common/x86/ideint_function_selector_ssse3.c", |
| 171 | "common/x86/ideint_function_selector_sse42.c", |
| 172 | "common/x86/icv_variance_ssse3.c", |
| 173 | "common/x86/icv_sad_ssse3.c", |
| 174 | "common/x86/ideint_cac_ssse3.c", |
| 175 | "common/x86/ideint_spatial_filter_ssse3.c", |
| 176 | "common/x86/impeg2_idct_recon_sse42_intr.c", |
| 177 | "common/x86/impeg2_inter_pred_sse42_intr.c", |
| 178 | "common/x86/impeg2_mem_func_sse42_intr.c", |
| 179 | ], |
| 180 | }, |
| 181 | |
| 182 | x86_64: { |
| 183 | cflags: [ |
| 184 | "-DX86", |
| 185 | "-DDISABLE_AVX2", |
| 186 | "-msse4.2", |
| 187 | "-mno-avx", |
| 188 | "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", |
| 189 | ], |
| 190 | |
| 191 | local_include_dirs: [ |
| 192 | "decoder/x86", |
| 193 | "common/x86", |
| 194 | ], |
| 195 | |
| 196 | srcs: [ |
| 197 | "decoder/x86/impeg2d_function_selector.c", |
| 198 | "decoder/x86/impeg2d_function_selector_avx2.c", |
| 199 | "decoder/x86/impeg2d_function_selector_ssse3.c", |
| 200 | "decoder/x86/impeg2d_function_selector_sse42.c", |
| 201 | "common/x86/ideint_function_selector.c", |
| 202 | "common/x86/ideint_function_selector_ssse3.c", |
| 203 | "common/x86/ideint_function_selector_sse42.c", |
| 204 | "common/x86/icv_variance_ssse3.c", |
| 205 | "common/x86/icv_sad_ssse3.c", |
| 206 | "common/x86/ideint_cac_ssse3.c", |
| 207 | "common/x86/ideint_spatial_filter_ssse3.c", |
| 208 | "common/x86/impeg2_idct_recon_sse42_intr.c", |
| 209 | "common/x86/impeg2_inter_pred_sse42_intr.c", |
| 210 | "common/x86/impeg2_mem_func_sse42_intr.c", |
| 211 | ], |
| 212 | }, |
| 213 | }, |
Ivan Lozano | 1f2e389 | 2018-07-10 12:33:42 -0700 | [diff] [blame] | 214 | sanitize: { |
| 215 | integer_overflow: true, |
Ivan Lozano | bce11b4 | 2018-10-04 10:59:27 -0700 | [diff] [blame] | 216 | misc_undefined: ["bounds"], |
Harish Mahendrakar | 1ed503e | 2018-11-06 10:58:14 -0800 | [diff] [blame] | 217 | // Enable CFI if this becomes a shared library. |
| 218 | // cfi: true, |
Ivan Lozano | 1f2e389 | 2018-07-10 12:33:42 -0700 | [diff] [blame] | 219 | blacklist: "libmpeg2dec_blacklist.txt", |
| 220 | }, |
Jooyung Han | ba0e64b | 2020-04-16 18:48:29 +0900 | [diff] [blame] | 221 | apex_available: [ |
| 222 | "//apex_available:platform", |
| 223 | "com.android.media.swcodec", |
| 224 | ], |
| 225 | min_sdk_version: "29", |
Colin Cross | 39449cf | 2017-04-20 14:12:11 -0700 | [diff] [blame] | 226 | } |
| 227 | |
| 228 | subdirs = ["test"] |