1 cc_library_static { 2 name: "libhevcdec", 3 vendor_available: true, 4 5 cflags: [ 6 "-D_LIB", 7 "-DMULTICORE", 8 "-fPIC", 9 10 "-O3", 11 "-DANDROID", 12 ], 13 14 export_include_dirs: [ 15 "decoder", 16 "common", 17 ], 18 19 srcs: [ 20 "common/ihevc_quant_tables.c", 21 "common/ihevc_inter_pred_filters.c", 22 "common/ihevc_weighted_pred.c", 23 "common/ihevc_padding.c", 24 "common/ihevc_deblk_edge_filter.c", 25 "common/ihevc_deblk_tables.c", 26 "common/ihevc_cabac_tables.c", 27 "common/ihevc_common_tables.c", 28 "common/ihevc_intra_pred_filters.c", 29 "common/ihevc_chroma_intra_pred_filters.c", 30 "common/ihevc_mem_fns.c", 31 "common/ihevc_sao.c", 32 "common/ihevc_trans_tables.c", 33 "common/ihevc_recon.c", 34 "common/ihevc_itrans.c", 35 "common/ihevc_itrans_recon.c", 36 "common/ihevc_iquant_recon.c", 37 "common/ihevc_iquant_itrans_recon.c", 38 "common/ihevc_itrans_recon_32x32.c", 39 "common/ihevc_itrans_recon_16x16.c", 40 "common/ihevc_itrans_recon_8x8.c", 41 "common/ihevc_chroma_itrans_recon.c", 42 "common/ihevc_chroma_iquant_recon.c", 43 "common/ihevc_chroma_iquant_itrans_recon.c", 44 "common/ihevc_chroma_recon.c", 45 "common/ihevc_chroma_itrans_recon_16x16.c", 46 "common/ihevc_chroma_itrans_recon_8x8.c", 47 "common/ihevc_buf_mgr.c", 48 "common/ihevc_disp_mgr.c", 49 "common/ihevc_dpb_mgr.c", 50 "common/ithread.c", 51 "decoder/ihevcd_version.c", 52 "decoder/ihevcd_api.c", 53 "decoder/ihevcd_decode.c", 54 "decoder/ihevcd_nal.c", 55 "decoder/ihevcd_bitstream.c", 56 "decoder/ihevcd_parse_headers.c", 57 "decoder/ihevcd_parse_slice_header.c", 58 "decoder/ihevcd_parse_slice.c", 59 "decoder/ihevcd_parse_residual.c", 60 "decoder/ihevcd_cabac.c", 61 "decoder/ihevcd_intra_pred_mode_prediction.c", 62 "decoder/ihevcd_process_slice.c", 63 "decoder/ihevcd_utils.c", 64 "decoder/ihevcd_job_queue.c", 65 "decoder/ihevcd_ref_list.c", 66 "decoder/ihevcd_get_mv.c", 67 "decoder/ihevcd_mv_pred.c", 68 "decoder/ihevcd_mv_merge.c", 69 "decoder/ihevcd_iquant_itrans_recon_ctb.c", 70 "decoder/ihevcd_itrans_recon_dc.c", 71 "decoder/ihevcd_common_tables.c", 72 "decoder/ihevcd_boundary_strength.c", 73 "decoder/ihevcd_deblk.c", 74 "decoder/ihevcd_inter_pred.c", 75 "decoder/ihevcd_sao.c", 76 "decoder/ihevcd_ilf_padding.c", 77 "decoder/ihevcd_fmt_conv.c", 78 ], 79 80 arch: { 81 arm64: { 82 cflags: [ 83 "-DARMV8", 84 "-DDISABLE_NEONINTR", 85 "-DARM", 86 "-DARMGCC", 87 88 "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC", 89 ], 90 local_include_dirs: [ 91 "decoder/arm", 92 "common/arm", 93 "decoder/arm64", 94 "common/arm64", 95 ], 96 97 srcs: [ 98 "decoder/arm/ihevcd_function_selector.c", 99 "decoder/arm/ihevcd_function_selector_noneon.c", 100 "decoder/arm64/ihevcd_function_selector_av8.c", 101 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 102 "common/arm/ihevc_weighted_pred_neon_intr.c", 103 "common/arm64/ihevc_mem_fns.s", 104 "common/arm64/ihevc_itrans_recon_32x32.s", 105 "common/arm64/ihevc_weighted_pred_bi_default.s", 106 "common/arm64/ihevc_weighted_pred_bi.s", 107 "common/arm64/ihevc_weighted_pred_uni.s", 108 "common/arm64/ihevc_deblk_luma_horz.s", 109 "common/arm64/ihevc_deblk_luma_vert.s", 110 "common/arm64/ihevc_deblk_chroma_vert.s", 111 "common/arm64/ihevc_deblk_chroma_horz.s", 112 "common/arm64/ihevc_sao_band_offset_luma.s", 113 "common/arm64/ihevc_sao_band_offset_chroma.s", 114 "common/arm64/ihevc_sao_edge_offset_class0.s", 115 "common/arm64/ihevc_sao_edge_offset_class0_chroma.s", 116 "common/arm64/ihevc_sao_edge_offset_class1.s", 117 "common/arm64/ihevc_sao_edge_offset_class1_chroma.s", 118 "common/arm64/ihevc_sao_edge_offset_class2.s", 119 "common/arm64/ihevc_sao_edge_offset_class2_chroma.s", 120 "common/arm64/ihevc_sao_edge_offset_class3.s", 121 "common/arm64/ihevc_sao_edge_offset_class3_chroma.s", 122 "common/arm64/ihevc_inter_pred_luma_horz_w16out.s", 123 "common/arm64/ihevc_inter_pred_filters_luma_horz.s", 124 "common/arm64/ihevc_inter_pred_filters_luma_vert.s", 125 "common/arm64/ihevc_inter_pred_chroma_horz.s", 126 "common/arm64/ihevc_inter_pred_chroma_horz_w16out.s", 127 "common/arm64/ihevc_inter_pred_chroma_vert.s", 128 "common/arm64/ihevc_inter_pred_chroma_vert_w16out.s", 129 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s", 130 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 131 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s", 132 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s", 133 "common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 134 "common/arm64/ihevc_inter_pred_luma_copy_w16out.s", 135 "common/arm64/ihevc_inter_pred_luma_copy.s", 136 "common/arm64/ihevc_inter_pred_chroma_copy.s", 137 "common/arm64/ihevc_inter_pred_chroma_copy_w16out.s", 138 "common/arm64/ihevc_itrans_recon_4x4_ttype1.s", 139 "common/arm64/ihevc_itrans_recon_4x4.s", 140 "common/arm64/ihevc_itrans_recon_8x8.s", 141 "common/arm64/ihevc_itrans_recon_16x16.s", 142 "common/arm64/ihevc_intra_pred_chroma_planar.s", 143 "common/arm64/ihevc_intra_pred_chroma_dc.s", 144 "common/arm64/ihevc_intra_pred_chroma_horz.s", 145 "common/arm64/ihevc_intra_pred_chroma_ver.s", 146 "common/arm64/ihevc_intra_pred_chroma_mode2.s", 147 "common/arm64/ihevc_intra_pred_chroma_mode_18_34.s", 148 "common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 149 "common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 150 "common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s", 151 "common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s", 152 "common/arm64/ihevc_intra_pred_luma_planar.s", 153 "common/arm64/ihevc_intra_pred_luma_horz.s", 154 "common/arm64/ihevc_intra_pred_luma_mode2.s", 155 "common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s", 156 "common/arm64/ihevc_intra_pred_luma_mode_18_34.s", 157 "common/arm64/ihevc_intra_pred_luma_vert.s", 158 "common/arm64/ihevc_intra_pred_luma_dc.s", 159 "common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 160 "common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 161 "common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s", 162 "common/arm64/ihevc_padding.s", 163 "decoder/arm64/ihevcd_itrans_recon_dc_luma.s", 164 "decoder/arm64/ihevcd_itrans_recon_dc_chroma.s", 165 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420p.s", 166 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420sp.s", 167 "decoder/arm64/ihevcd_fmt_conv_420sp_to_rgba8888.s", 168 ], 169 }, 170 171 arm: { 172 local_include_dirs: [ 173 "decoder/arm", 174 "common/arm", 175 ], 176 177 srcs: [ 178 "decoder/arm/ihevcd_function_selector.c", 179 "decoder/arm/ihevcd_function_selector_noneon.c", 180 ], 181 182 cflags: [ 183 "-DDISABLE_NEONINTR", 184 "-DARM", 185 "-DARMGCC", 186 "-fno-tree-vectorize", 187 188 // These will be overriden by armv7_a_neon 189 "-DDISABLE_NEON", 190 "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON", 191 ], 192 193 instruction_set: "arm", 194 195 armv7_a_neon: { 196 srcs: [ 197 "decoder/arm/ihevcd_function_selector_a9q.c", 198 "common/arm/ihevc_intra_ref_substitution_a9q.c", 199 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 200 "common/arm/ihevc_weighted_pred_neon_intr.c", 201 "common/arm/ihevc_mem_fns.s", 202 "common/arm/ihevc_itrans_recon_32x32.s", 203 "common/arm/ihevc_weighted_pred_bi_default.s", 204 "common/arm/ihevc_weighted_pred_bi.s", 205 "common/arm/ihevc_weighted_pred_uni.s", 206 "common/arm/ihevc_deblk_luma_horz.s", 207 "common/arm/ihevc_deblk_luma_vert.s", 208 "common/arm/ihevc_deblk_chroma_vert.s", 209 "common/arm/ihevc_deblk_chroma_horz.s", 210 "common/arm/ihevc_sao_band_offset_luma.s", 211 "common/arm/ihevc_sao_band_offset_chroma.s", 212 "common/arm/ihevc_sao_edge_offset_class0.s", 213 "common/arm/ihevc_sao_edge_offset_class0_chroma.s", 214 "common/arm/ihevc_sao_edge_offset_class1.s", 215 "common/arm/ihevc_sao_edge_offset_class1_chroma.s", 216 "common/arm/ihevc_sao_edge_offset_class2.s", 217 "common/arm/ihevc_sao_edge_offset_class2_chroma.s", 218 "common/arm/ihevc_sao_edge_offset_class3.s", 219 "common/arm/ihevc_sao_edge_offset_class3_chroma.s", 220 "common/arm/ihevc_inter_pred_luma_horz_w16out.s", 221 "common/arm/ihevc_inter_pred_filters_luma_horz.s", 222 "common/arm/ihevc_inter_pred_filters_luma_vert.s", 223 "common/arm/ihevc_inter_pred_chroma_horz.s", 224 "common/arm/ihevc_inter_pred_chroma_horz_w16out.s", 225 "common/arm/ihevc_inter_pred_chroma_vert.s", 226 "common/arm/ihevc_inter_pred_chroma_vert_w16out.s", 227 "common/arm/ihevc_inter_pred_chroma_vert_w16inp.s", 228 "common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 229 "common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s", 230 "common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 231 "common/arm/ihevc_inter_pred_luma_copy_w16out.s", 232 "common/arm/ihevc_inter_pred_luma_copy.s", 233 "common/arm/ihevc_inter_pred_chroma_copy.s", 234 "common/arm/ihevc_inter_pred_chroma_copy_w16out.s", 235 "common/arm/ihevc_itrans_recon_4x4_ttype1.s", 236 "common/arm/ihevc_itrans_recon_4x4.s", 237 "common/arm/ihevc_itrans_recon_8x8.s", 238 "common/arm/ihevc_itrans_recon_16x16.s", 239 "common/arm/ihevc_intra_pred_chroma_planar.s", 240 "common/arm/ihevc_intra_pred_chroma_dc.s", 241 "common/arm/ihevc_intra_pred_chroma_horz.s", 242 "common/arm/ihevc_intra_pred_chroma_ver.s", 243 "common/arm/ihevc_intra_pred_chroma_mode2.s", 244 "common/arm/ihevc_intra_pred_chroma_mode_18_34.s", 245 "common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 246 "common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 247 "common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s", 248 "common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s", 249 "common/arm/ihevc_intra_pred_luma_planar.s", 250 "common/arm/ihevc_intra_pred_luma_horz.s", 251 "common/arm/ihevc_intra_pred_luma_mode2.s", 252 "common/arm/ihevc_intra_pred_luma_mode_27_to_33.s", 253 "common/arm/ihevc_intra_pred_luma_mode_18_34.s", 254 "common/arm/ihevc_intra_pred_luma_vert.s", 255 "common/arm/ihevc_intra_pred_luma_dc.s", 256 "common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 257 "common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 258 "common/arm/ihevc_intra_pred_luma_mode_3_to_9.s", 259 "common/arm/ihevc_padding.s", 260 "decoder/arm/ihevcd_itrans_recon_dc_luma.s", 261 "decoder/arm/ihevcd_itrans_recon_dc_chroma.s", 262 "decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s", 263 "decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s", 264 "decoder/arm/ihevcd_fmt_conv_420sp_to_rgba8888.s", 265 ], 266 cflags: [ 267 "-UDISABLE_NEON", 268 "-UDEFAULT_ARCH", 269 "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q", 270 ], 271 }, 272 }, 273 274 mips64: { 275 local_include_dirs: [ 276 "decoder/mips", 277 "common/mips", 278 ], 279 280 srcs: [ 281 "decoder/mips/ihevcd_function_selector.c", 282 "decoder/mips/ihevcd_function_selector_mips_generic.c", 283 ], 284 }, 285 286 mips: { 287 local_include_dirs: [ 288 "decoder/mips", 289 "common/mips", 290 ], 291 292 srcs: [ 293 "decoder/mips/ihevcd_function_selector.c", 294 "decoder/mips/ihevcd_function_selector_mips_generic.c", 295 ], 296 }, 297 298 x86_64: { 299 cflags: [ 300 "-DX86", 301 "-DDISABLE_AVX2", 302 "-msse4.2", 303 "-mno-avx", 304 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 305 ], 306 307 local_include_dirs: [ 308 "decoder/x86", 309 "common/x86", 310 ], 311 312 srcs: [ 313 "decoder/x86/ihevcd_function_selector.c", 314 "decoder/x86/ihevcd_function_selector_generic.c", 315 "decoder/x86/ihevcd_function_selector_ssse3.c", 316 "decoder/x86/ihevcd_function_selector_sse42.c", 317 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c", 318 "common/x86/ihevc_weighted_pred_ssse3_intr.c", 319 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c", 320 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c", 321 "common/x86/ihevc_itrans_recon_ssse3_intr.c", 322 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c", 323 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c", 324 "common/x86/ihevc_sao_ssse3_intr.c", 325 "common/x86/ihevc_deblk_ssse3_intr.c", 326 "common/x86/ihevc_padding_ssse3_intr.c", 327 "common/x86/ihevc_mem_fns_ssse3_intr.c", 328 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c", 329 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c", 330 "common/x86/ihevc_inter_pred_filters_sse42_intr.c", 331 "common/x86/ihevc_weighted_pred_sse42_intr.c", 332 "common/x86/ihevc_intra_pred_filters_sse42_intr.c", 333 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c", 334 "common/x86/ihevc_itrans_recon_sse42_intr.c", 335 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c", 336 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c", 337 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c", 338 "common/x86/ihevc_tables_x86_intr.c", 339 ], 340 }, 341 342 x86: { 343 cflags: [ 344 "-DX86", 345 "-DDISABLE_AVX2", 346 "-msse4.2", 347 "-mno-avx", 348 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 349 ], 350 351 local_include_dirs: [ 352 "decoder/x86", 353 "common/x86", 354 ], 355 356 srcs: [ 357 "decoder/x86/ihevcd_function_selector.c", 358 "decoder/x86/ihevcd_function_selector_generic.c", 359 "decoder/x86/ihevcd_function_selector_ssse3.c", 360 "decoder/x86/ihevcd_function_selector_sse42.c", 361 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c", 362 "common/x86/ihevc_weighted_pred_ssse3_intr.c", 363 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c", 364 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c", 365 "common/x86/ihevc_itrans_recon_ssse3_intr.c", 366 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c", 367 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c", 368 "common/x86/ihevc_sao_ssse3_intr.c", 369 "common/x86/ihevc_deblk_ssse3_intr.c", 370 "common/x86/ihevc_padding_ssse3_intr.c", 371 "common/x86/ihevc_mem_fns_ssse3_intr.c", 372 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c", 373 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c", 374 "common/x86/ihevc_inter_pred_filters_sse42_intr.c", 375 "common/x86/ihevc_weighted_pred_sse42_intr.c", 376 "common/x86/ihevc_intra_pred_filters_sse42_intr.c", 377 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c", 378 "common/x86/ihevc_itrans_recon_sse42_intr.c", 379 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c", 380 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c", 381 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c", 382 "common/x86/ihevc_tables_x86_intr.c", 383 ], 384 }, 385 }, 386 } 387