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