1cc_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 "-Wall", 13 "-Werror", 14 // common/x86/ihevc_sao_ssse3_intr.c: implicit conversion from 15 // 'int' to 'char' changes value from 128 to -128 16 "-Wno-error=constant-conversion", 17 ], 18 19 export_include_dirs: [ 20 "decoder", 21 "common", 22 ], 23 24 srcs: [ 25 "common/ihevc_quant_tables.c", 26 "common/ihevc_inter_pred_filters.c", 27 "common/ihevc_weighted_pred.c", 28 "common/ihevc_padding.c", 29 "common/ihevc_deblk_edge_filter.c", 30 "common/ihevc_deblk_tables.c", 31 "common/ihevc_cabac_tables.c", 32 "common/ihevc_common_tables.c", 33 "common/ihevc_intra_pred_filters.c", 34 "common/ihevc_chroma_intra_pred_filters.c", 35 "common/ihevc_mem_fns.c", 36 "common/ihevc_sao.c", 37 "common/ihevc_trans_tables.c", 38 "common/ihevc_recon.c", 39 "common/ihevc_itrans.c", 40 "common/ihevc_itrans_recon.c", 41 "common/ihevc_iquant_recon.c", 42 "common/ihevc_iquant_itrans_recon.c", 43 "common/ihevc_itrans_recon_32x32.c", 44 "common/ihevc_itrans_recon_16x16.c", 45 "common/ihevc_itrans_recon_8x8.c", 46 "common/ihevc_chroma_itrans_recon.c", 47 "common/ihevc_chroma_iquant_recon.c", 48 "common/ihevc_chroma_iquant_itrans_recon.c", 49 "common/ihevc_chroma_recon.c", 50 "common/ihevc_chroma_itrans_recon_16x16.c", 51 "common/ihevc_chroma_itrans_recon_8x8.c", 52 "common/ihevc_buf_mgr.c", 53 "common/ihevc_disp_mgr.c", 54 "common/ihevc_dpb_mgr.c", 55 "common/ithread.c", 56 "decoder/ihevcd_version.c", 57 "decoder/ihevcd_api.c", 58 "decoder/ihevcd_decode.c", 59 "decoder/ihevcd_nal.c", 60 "decoder/ihevcd_bitstream.c", 61 "decoder/ihevcd_parse_headers.c", 62 "decoder/ihevcd_parse_slice_header.c", 63 "decoder/ihevcd_parse_slice.c", 64 "decoder/ihevcd_parse_residual.c", 65 "decoder/ihevcd_cabac.c", 66 "decoder/ihevcd_intra_pred_mode_prediction.c", 67 "decoder/ihevcd_process_slice.c", 68 "decoder/ihevcd_utils.c", 69 "decoder/ihevcd_job_queue.c", 70 "decoder/ihevcd_ref_list.c", 71 "decoder/ihevcd_get_mv.c", 72 "decoder/ihevcd_mv_pred.c", 73 "decoder/ihevcd_mv_merge.c", 74 "decoder/ihevcd_iquant_itrans_recon_ctb.c", 75 "decoder/ihevcd_itrans_recon_dc.c", 76 "decoder/ihevcd_common_tables.c", 77 "decoder/ihevcd_boundary_strength.c", 78 "decoder/ihevcd_deblk.c", 79 "decoder/ihevcd_inter_pred.c", 80 "decoder/ihevcd_sao.c", 81 "decoder/ihevcd_ilf_padding.c", 82 "decoder/ihevcd_fmt_conv.c", 83 ], 84 85 arch: { 86 arm64: { 87 cflags: [ 88 "-DARMV8", 89 "-DDISABLE_NEONINTR", 90 "-DARM", 91 "-DARMGCC", 92 93 "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC", 94 ], 95 local_include_dirs: [ 96 "decoder/arm", 97 "common/arm", 98 "decoder/arm64", 99 "common/arm64", 100 ], 101 102 srcs: [ 103 "decoder/arm/ihevcd_function_selector.c", 104 "decoder/arm/ihevcd_function_selector_noneon.c", 105 "decoder/arm64/ihevcd_function_selector_av8.c", 106 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 107 "common/arm/ihevc_weighted_pred_neon_intr.c", 108 "common/arm64/ihevc_mem_fns.s", 109 "common/arm64/ihevc_itrans_recon_32x32.s", 110 "common/arm64/ihevc_weighted_pred_bi_default.s", 111 "common/arm64/ihevc_weighted_pred_bi.s", 112 "common/arm64/ihevc_weighted_pred_uni.s", 113 "common/arm64/ihevc_deblk_luma_horz.s", 114 "common/arm64/ihevc_deblk_luma_vert.s", 115 "common/arm64/ihevc_deblk_chroma_vert.s", 116 "common/arm64/ihevc_deblk_chroma_horz.s", 117 "common/arm64/ihevc_sao_band_offset_luma.s", 118 "common/arm64/ihevc_sao_band_offset_chroma.s", 119 "common/arm64/ihevc_sao_edge_offset_class0.s", 120 "common/arm64/ihevc_sao_edge_offset_class0_chroma.s", 121 "common/arm64/ihevc_sao_edge_offset_class1.s", 122 "common/arm64/ihevc_sao_edge_offset_class1_chroma.s", 123 "common/arm64/ihevc_sao_edge_offset_class2.s", 124 "common/arm64/ihevc_sao_edge_offset_class2_chroma.s", 125 "common/arm64/ihevc_sao_edge_offset_class3.s", 126 "common/arm64/ihevc_sao_edge_offset_class3_chroma.s", 127 "common/arm64/ihevc_inter_pred_luma_horz_w16out.s", 128 "common/arm64/ihevc_inter_pred_filters_luma_horz.s", 129 "common/arm64/ihevc_inter_pred_filters_luma_vert.s", 130 "common/arm64/ihevc_inter_pred_chroma_horz.s", 131 "common/arm64/ihevc_inter_pred_chroma_horz_w16out.s", 132 "common/arm64/ihevc_inter_pred_chroma_vert.s", 133 "common/arm64/ihevc_inter_pred_chroma_vert_w16out.s", 134 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s", 135 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 136 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s", 137 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s", 138 "common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 139 "common/arm64/ihevc_inter_pred_luma_copy_w16out.s", 140 "common/arm64/ihevc_inter_pred_luma_copy.s", 141 "common/arm64/ihevc_inter_pred_chroma_copy.s", 142 "common/arm64/ihevc_inter_pred_chroma_copy_w16out.s", 143 "common/arm64/ihevc_itrans_recon_4x4_ttype1.s", 144 "common/arm64/ihevc_itrans_recon_4x4.s", 145 "common/arm64/ihevc_itrans_recon_8x8.s", 146 "common/arm64/ihevc_itrans_recon_16x16.s", 147 "common/arm64/ihevc_intra_pred_chroma_planar.s", 148 "common/arm64/ihevc_intra_pred_chroma_dc.s", 149 "common/arm64/ihevc_intra_pred_chroma_horz.s", 150 "common/arm64/ihevc_intra_pred_chroma_ver.s", 151 "common/arm64/ihevc_intra_pred_chroma_mode2.s", 152 "common/arm64/ihevc_intra_pred_chroma_mode_18_34.s", 153 "common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 154 "common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 155 "common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s", 156 "common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s", 157 "common/arm64/ihevc_intra_pred_luma_planar.s", 158 "common/arm64/ihevc_intra_pred_luma_horz.s", 159 "common/arm64/ihevc_intra_pred_luma_mode2.s", 160 "common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s", 161 "common/arm64/ihevc_intra_pred_luma_mode_18_34.s", 162 "common/arm64/ihevc_intra_pred_luma_vert.s", 163 "common/arm64/ihevc_intra_pred_luma_dc.s", 164 "common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 165 "common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 166 "common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s", 167 "common/arm64/ihevc_padding.s", 168 "decoder/arm64/ihevcd_itrans_recon_dc_luma.s", 169 "decoder/arm64/ihevcd_itrans_recon_dc_chroma.s", 170 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420p.s", 171 "decoder/arm64/ihevcd_fmt_conv_420sp_to_420sp.s", 172 "decoder/arm64/ihevcd_fmt_conv_420sp_to_rgba8888.s", 173 ], 174 }, 175 176 arm: { 177 local_include_dirs: [ 178 "decoder/arm", 179 "common/arm", 180 ], 181 182 srcs: [ 183 "decoder/arm/ihevcd_function_selector.c", 184 "decoder/arm/ihevcd_function_selector_noneon.c", 185 ], 186 187 cflags: [ 188 "-DDISABLE_NEONINTR", 189 "-DARM", 190 "-DARMGCC", 191 "-fno-tree-vectorize", 192 193 // These will be overriden by armv7_a_neon 194 "-DDISABLE_NEON", 195 "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON", 196 ], 197 198 instruction_set: "arm", 199 200 neon: { 201 srcs: [ 202 "decoder/arm/ihevcd_function_selector_a9q.c", 203 "common/arm/ihevc_intra_ref_substitution_a9q.c", 204 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 205 "common/arm/ihevc_weighted_pred_neon_intr.c", 206 "common/arm/ihevc_mem_fns.s", 207 "common/arm/ihevc_itrans_recon_32x32.s", 208 "common/arm/ihevc_weighted_pred_bi_default.s", 209 "common/arm/ihevc_weighted_pred_bi.s", 210 "common/arm/ihevc_weighted_pred_uni.s", 211 "common/arm/ihevc_deblk_luma_horz.s", 212 "common/arm/ihevc_deblk_luma_vert.s", 213 "common/arm/ihevc_deblk_chroma_vert.s", 214 "common/arm/ihevc_deblk_chroma_horz.s", 215 "common/arm/ihevc_sao_band_offset_luma.s", 216 "common/arm/ihevc_sao_band_offset_chroma.s", 217 "common/arm/ihevc_sao_edge_offset_class0.s", 218 "common/arm/ihevc_sao_edge_offset_class0_chroma.s", 219 "common/arm/ihevc_sao_edge_offset_class1.s", 220 "common/arm/ihevc_sao_edge_offset_class1_chroma.s", 221 "common/arm/ihevc_sao_edge_offset_class2.s", 222 "common/arm/ihevc_sao_edge_offset_class2_chroma.s", 223 "common/arm/ihevc_sao_edge_offset_class3.s", 224 "common/arm/ihevc_sao_edge_offset_class3_chroma.s", 225 "common/arm/ihevc_inter_pred_luma_horz_w16out.s", 226 "common/arm/ihevc_inter_pred_filters_luma_horz.s", 227 "common/arm/ihevc_inter_pred_filters_luma_vert.s", 228 "common/arm/ihevc_inter_pred_chroma_horz.s", 229 "common/arm/ihevc_inter_pred_chroma_horz_w16out.s", 230 "common/arm/ihevc_inter_pred_chroma_vert.s", 231 "common/arm/ihevc_inter_pred_chroma_vert_w16out.s", 232 "common/arm/ihevc_inter_pred_chroma_vert_w16inp.s", 233 "common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 234 "common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s", 235 "common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 236 "common/arm/ihevc_inter_pred_luma_copy_w16out.s", 237 "common/arm/ihevc_inter_pred_luma_copy.s", 238 "common/arm/ihevc_inter_pred_chroma_copy.s", 239 "common/arm/ihevc_inter_pred_chroma_copy_w16out.s", 240 "common/arm/ihevc_itrans_recon_4x4_ttype1.s", 241 "common/arm/ihevc_itrans_recon_4x4.s", 242 "common/arm/ihevc_itrans_recon_8x8.s", 243 "common/arm/ihevc_itrans_recon_16x16.s", 244 "common/arm/ihevc_intra_pred_chroma_planar.s", 245 "common/arm/ihevc_intra_pred_chroma_dc.s", 246 "common/arm/ihevc_intra_pred_chroma_horz.s", 247 "common/arm/ihevc_intra_pred_chroma_ver.s", 248 "common/arm/ihevc_intra_pred_chroma_mode2.s", 249 "common/arm/ihevc_intra_pred_chroma_mode_18_34.s", 250 "common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 251 "common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 252 "common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s", 253 "common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s", 254 "common/arm/ihevc_intra_pred_luma_planar.s", 255 "common/arm/ihevc_intra_pred_luma_horz.s", 256 "common/arm/ihevc_intra_pred_luma_mode2.s", 257 "common/arm/ihevc_intra_pred_luma_mode_27_to_33.s", 258 "common/arm/ihevc_intra_pred_luma_mode_18_34.s", 259 "common/arm/ihevc_intra_pred_luma_vert.s", 260 "common/arm/ihevc_intra_pred_luma_dc.s", 261 "common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 262 "common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 263 "common/arm/ihevc_intra_pred_luma_mode_3_to_9.s", 264 "common/arm/ihevc_padding.s", 265 "decoder/arm/ihevcd_itrans_recon_dc_luma.s", 266 "decoder/arm/ihevcd_itrans_recon_dc_chroma.s", 267 "decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s", 268 "decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s", 269 "decoder/arm/ihevcd_fmt_conv_420sp_to_rgba8888.s", 270 ], 271 cflags: [ 272 "-UDISABLE_NEON", 273 "-UDEFAULT_ARCH", 274 "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q", 275 ], 276 }, 277 }, 278 279 mips64: { 280 local_include_dirs: [ 281 "decoder/mips", 282 "common/mips", 283 ], 284 285 srcs: [ 286 "decoder/mips/ihevcd_function_selector.c", 287 "decoder/mips/ihevcd_function_selector_mips_generic.c", 288 ], 289 }, 290 291 mips: { 292 local_include_dirs: [ 293 "decoder/mips", 294 "common/mips", 295 ], 296 297 srcs: [ 298 "decoder/mips/ihevcd_function_selector.c", 299 "decoder/mips/ihevcd_function_selector_mips_generic.c", 300 ], 301 }, 302 303 x86_64: { 304 cflags: [ 305 "-DX86", 306 "-DDISABLE_AVX2", 307 "-msse4.2", 308 "-mno-avx", 309 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 310 ], 311 312 local_include_dirs: [ 313 "decoder/x86", 314 "common/x86", 315 ], 316 317 srcs: [ 318 "decoder/x86/ihevcd_function_selector.c", 319 "decoder/x86/ihevcd_function_selector_generic.c", 320 "decoder/x86/ihevcd_function_selector_ssse3.c", 321 "decoder/x86/ihevcd_function_selector_sse42.c", 322 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c", 323 "common/x86/ihevc_weighted_pred_ssse3_intr.c", 324 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c", 325 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c", 326 "common/x86/ihevc_itrans_recon_ssse3_intr.c", 327 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c", 328 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c", 329 "common/x86/ihevc_sao_ssse3_intr.c", 330 "common/x86/ihevc_deblk_ssse3_intr.c", 331 "common/x86/ihevc_padding_ssse3_intr.c", 332 "common/x86/ihevc_mem_fns_ssse3_intr.c", 333 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c", 334 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c", 335 "common/x86/ihevc_inter_pred_filters_sse42_intr.c", 336 "common/x86/ihevc_weighted_pred_sse42_intr.c", 337 "common/x86/ihevc_intra_pred_filters_sse42_intr.c", 338 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c", 339 "common/x86/ihevc_itrans_recon_sse42_intr.c", 340 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c", 341 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c", 342 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c", 343 "common/x86/ihevc_tables_x86_intr.c", 344 ], 345 }, 346 347 x86: { 348 cflags: [ 349 "-DX86", 350 "-DDISABLE_AVX2", 351 "-msse4.2", 352 "-mno-avx", 353 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 354 ], 355 356 local_include_dirs: [ 357 "decoder/x86", 358 "common/x86", 359 ], 360 361 srcs: [ 362 "decoder/x86/ihevcd_function_selector.c", 363 "decoder/x86/ihevcd_function_selector_generic.c", 364 "decoder/x86/ihevcd_function_selector_ssse3.c", 365 "decoder/x86/ihevcd_function_selector_sse42.c", 366 "common/x86/ihevc_inter_pred_filters_ssse3_intr.c", 367 "common/x86/ihevc_weighted_pred_ssse3_intr.c", 368 "common/x86/ihevc_intra_pred_filters_ssse3_intr.c", 369 "common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c", 370 "common/x86/ihevc_itrans_recon_ssse3_intr.c", 371 "common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c", 372 "common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c", 373 "common/x86/ihevc_sao_ssse3_intr.c", 374 "common/x86/ihevc_deblk_ssse3_intr.c", 375 "common/x86/ihevc_padding_ssse3_intr.c", 376 "common/x86/ihevc_mem_fns_ssse3_intr.c", 377 "decoder/x86/ihevcd_fmt_conv_ssse3_intr.c", 378 "decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c", 379 "common/x86/ihevc_inter_pred_filters_sse42_intr.c", 380 "common/x86/ihevc_weighted_pred_sse42_intr.c", 381 "common/x86/ihevc_intra_pred_filters_sse42_intr.c", 382 "common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c", 383 "common/x86/ihevc_itrans_recon_sse42_intr.c", 384 "common/x86/ihevc_16x16_itrans_recon_sse42_intr.c", 385 "common/x86/ihevc_32x32_itrans_recon_sse42_intr.c", 386 "decoder/x86/ihevcd_it_rec_dc_sse42_intr.c", 387 "common/x86/ihevc_tables_x86_intr.c", 388 ], 389 }, 390 }, 391 392 sanitize: { 393 integer_overflow: true, 394 misc_undefined: ["bounds"], 395 // Enable CFI if this becomes a shared library. 396 // cfi: true, 397 blacklist: "libhevc_blacklist.txt", 398 }, 399} 400 401cc_test { 402 name: "hevcdec", 403 cflags: [ 404 "-DPROFILE_ENABLE", 405 "-DARM", 406 "-fPIC", 407 "-DMD5_DISABLE", 408 "-Wall", 409 "-Werror", 410 ], 411 srcs: ["test/decoder/main.c"], 412 static_libs: ["libhevcdec"], 413} 414 415cc_library_static { 416 name: "libhevcenc", 417 vendor_available: true, 418 419 cflags: [ 420 "-DENABLE_MAIN_REXT_PROFILE", 421 "-fPIC", 422 "-O3", 423 "-Wall", 424 "-Wno-unused-variable", 425 "-Wno-unused-parameter", 426 "-Wno-switch", 427 ], 428 429 export_include_dirs: [ 430 "encoder", 431 "common", 432 ], 433 434 srcs: [ 435 "common/ihevc_cabac_tables.c", 436 "common/ihevc_chroma_intra_pred_filters.c", 437 "common/ihevc_chroma_itrans_recon.c", 438 "common/ihevc_chroma_itrans_recon_16x16.c", 439 "common/ihevc_chroma_itrans_recon_8x8.c", 440 "common/ihevc_common_tables.c", 441 "common/ihevc_deblk_edge_filter.c", 442 "common/ihevc_deblk_tables.c", 443 "common/ihevc_hbd_deblk_edge_filter.c", 444 "common/ihevc_inter_pred_filters.c", 445 "common/ihevc_intra_pred_filters.c", 446 "common/ihevc_iquant_recon.c", 447 "common/ihevc_itrans_recon.c", 448 "common/ihevc_itrans_recon_16x16.c", 449 "common/ihevc_itrans_recon_32x32.c", 450 "common/ihevc_itrans_recon_8x8.c", 451 "common/ihevc_mem_fns.c", 452 "common/ihevc_padding.c", 453 "common/ihevc_quant_iquant_ssd.c", 454 "common/ihevc_quant_tables.c", 455 "common/ihevc_resi_trans.c", 456 "common/ihevc_sao.c", 457 "common/ihevc_trans_tables.c", 458 "common/ihevc_weighted_pred.c", 459 "encoder/bit_allocation.c", 460 "encoder/cbr_buffer_control.c", 461 "encoder/common_rom.c", 462 "encoder/convert_float_to_fix.c", 463 "encoder/est_sad.c", 464 "encoder/fixed_point_error_bits.c", 465 "encoder/frame_info_collector.c", 466 "encoder/hme_coarse.c", 467 "encoder/hme_common_utils.c", 468 "encoder/hme_err_compute.c", 469 "encoder/hme_fullpel.c", 470 "encoder/hme_function_selector.c", 471 "encoder/hme_globals.c", 472 "encoder/hme_interface.c", 473 "encoder/hme_refine.c", 474 "encoder/hme_search_algo.c", 475 "encoder/hme_subpel.c", 476 "encoder/hme_utils.c", 477 "encoder/ihevce_bitstream.c", 478 "encoder/ihevce_bs_compute_ctb.c", 479 "encoder/ihevce_buffer_que.c", 480 "encoder/ihevce_cabac.c", 481 "encoder/ihevce_cabac_cu_pu.c", 482 "encoder/ihevce_cabac_rdo.c", 483 "encoder/ihevce_cabac_tu.c", 484 "encoder/ihevce_chroma_had_satd.c", 485 "encoder/ihevce_cmn_utils_instr_set_router.c", 486 "encoder/ihevce_coarse_me_pass.c", 487 "encoder/ihevce_common_utils.c", 488 "encoder/ihevce_deblk.c", 489 "encoder/ihevce_decomp_pre_intra_pass.c", 490 "encoder/ihevce_dep_mngr.c", 491 "encoder/ihevce_enc_cu_recursion.c", 492 "encoder/ihevce_enc_loop_inter_mode_sifter.c", 493 "encoder/ihevce_enc_loop_pass.c", 494 "encoder/ihevce_enc_loop_utils.c", 495 "encoder/ihevce_enc_sbh_funcs.c", 496 "encoder/ihevce_enc_subpel_gen.c", 497 "encoder/ihevce_encode_header.c", 498 "encoder/ihevce_encode_header_sei_vui.c", 499 "encoder/ihevce_entropy_cod.c", 500 "encoder/ihevce_entropy_interface.c", 501 "encoder/ihevce_error_check.c", 502 "encoder/ihevce_frame_process.c", 503 "encoder/ihevce_frame_process_utils.c", 504 "encoder/ihevce_function_selector.c", 505 "encoder/ihevce_global_tables.c", 506 "encoder/ihevce_had_satd.c", 507 "encoder/ihevce_hle_interface.c", 508 "encoder/ihevce_hle_q_func.c", 509 "encoder/ihevce_inter_pred.c", 510 "encoder/ihevce_ipe_instr_set_router.c", 511 "encoder/ihevce_ipe_pass.c", 512 "encoder/ihevce_lap_interface.c", 513 "encoder/ihevce_me_instr_set_router.c", 514 "encoder/ihevce_me_pass.c", 515 "encoder/ihevce_memory_init.c", 516 "encoder/ihevce_multi_thrd_funcs.c", 517 "encoder/ihevce_mv_pred.c", 518 "encoder/ihevce_mv_pred_merge.c", 519 "encoder/ihevce_nbr_avail.c", 520 "encoder/ihevce_plugin.c", 521 "encoder/ihevce_profile.c", 522 "encoder/ihevce_rc_interface.c", 523 "encoder/ihevce_recur_bracketing.c", 524 "encoder/ihevce_sao.c", 525 "encoder/ihevce_stasino_helpers.c", 526 "encoder/ihevce_sub_pic_rc.c", 527 "encoder/ihevce_sys_api.c", 528 "encoder/ihevce_tile_interface.c", 529 "encoder/ihevce_trace.c", 530 "encoder/ihevce_tu_tree_selector.c", 531 "encoder/init_qp.c", 532 "encoder/mb_model_based.c", 533 "encoder/osal.c", 534 "encoder/osal_cond_var.c", 535 "encoder/osal_error.c", 536 "encoder/osal_mutex.c", 537 "encoder/osal_semaphore.c", 538 "encoder/osal_thread.c", 539 "encoder/picture_type.c", 540 "encoder/rate_control_api.c", 541 "encoder/rc_rd_model.c", 542 "encoder/rc_rd_model_fix.c", 543 "encoder/rc_sad_acc.c", 544 "encoder/sqrt_interp.c", 545 "encoder/var_q_operator.c", 546 "encoder/vbr_storage_vbv.c", 547 "encoder/vbr_str_prms.c", 548 ], 549 550 arch: { 551 arm64: { 552 553 local_include_dirs: [ 554 "encoder/arm", 555 "common/arm", 556 "common/arm64", 557 ], 558 559 srcs: [ 560 "encoder/arm/ihevce_coarse_layer_sad_neon.c", 561 "encoder/arm/ihevce_common_utils_neon.c", 562 "encoder/arm/ihevce_copy_neon.c", 563 "encoder/arm/ihevce_had_compute_neon.c", 564 "encoder/arm/ihevce_hme_utils_neon.c", 565 "encoder/arm/ihevce_itrans_recon_neon.c", 566 "encoder/arm/ihevce_me_neon.c", 567 "encoder/arm/ihevce_sad_compute_neon.c", 568 "encoder/arm/ihevce_scale_by_2_neon.c", 569 "encoder/arm/ihevce_scan_coeffs_neon.c", 570 "encoder/arm/ihevce_ssd_and_sad_calculator_neon.c", 571 "encoder/arm/ihevce_ssd_calculator_neon.c", 572 "encoder/arm/ihevce_subpel_neon.c", 573 "common/arm/ihevc_resi_trans_neon.c", 574 "common/arm/ihevc_resi_trans_neon_32x32.c", 575 "common/arm/ihevc_quant_iquant_ssd_neon_intr.c", 576 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 577 "common/arm/ihevc_weighted_pred_neon_intr.c", 578 "common/arm/ihevc_intra_ref_substitution_a9q.c", 579 "common/arm64/ihevc_deblk_chroma_horz.s", 580 "common/arm64/ihevc_deblk_chroma_vert.s", 581 "common/arm64/ihevc_deblk_luma_horz.s", 582 "common/arm64/ihevc_deblk_luma_vert.s", 583 "common/arm64/ihevc_inter_pred_chroma_copy.s", 584 "common/arm64/ihevc_inter_pred_chroma_copy_w16out.s", 585 "common/arm64/ihevc_inter_pred_chroma_horz.s", 586 "common/arm64/ihevc_inter_pred_chroma_horz_w16out.s", 587 "common/arm64/ihevc_inter_pred_chroma_vert.s", 588 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s", 589 "common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 590 "common/arm64/ihevc_inter_pred_chroma_vert_w16out.s", 591 "common/arm64/ihevc_inter_pred_filters_luma_horz.s", 592 "common/arm64/ihevc_inter_pred_filters_luma_vert.s", 593 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s", 594 "common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s", 595 "common/arm64/ihevc_inter_pred_luma_copy.s", 596 "common/arm64/ihevc_inter_pred_luma_copy_w16out.s", 597 "common/arm64/ihevc_inter_pred_luma_horz_w16out.s", 598 "common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 599 "common/arm64/ihevc_intra_pred_chroma_dc.s", 600 "common/arm64/ihevc_intra_pred_chroma_horz.s", 601 "common/arm64/ihevc_intra_pred_chroma_mode2.s", 602 "common/arm64/ihevc_intra_pred_chroma_mode_18_34.s", 603 "common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s", 604 "common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s", 605 "common/arm64/ihevc_intra_pred_chroma_planar.s", 606 "common/arm64/ihevc_intra_pred_chroma_ver.s", 607 "common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 608 "common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 609 "common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 610 "common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 611 "common/arm64/ihevc_intra_pred_luma_dc.s", 612 "common/arm64/ihevc_intra_pred_luma_horz.s", 613 "common/arm64/ihevc_intra_pred_luma_mode2.s", 614 "common/arm64/ihevc_intra_pred_luma_mode_18_34.s", 615 "common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s", 616 "common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s", 617 "common/arm64/ihevc_intra_pred_luma_planar.s", 618 "common/arm64/ihevc_intra_pred_luma_vert.s", 619 "common/arm64/ihevc_itrans_recon_16x16.s", 620 "common/arm64/ihevc_itrans_recon_32x32.s", 621 "common/arm64/ihevc_itrans_recon_4x4.s", 622 "common/arm64/ihevc_itrans_recon_4x4_ttype1.s", 623 "common/arm64/ihevc_itrans_recon_8x8.s", 624 "common/arm64/ihevc_mem_fns.s", 625 "common/arm64/ihevc_padding.s", 626 "common/arm64/ihevc_sao_band_offset_chroma.s", 627 "common/arm64/ihevc_sao_band_offset_luma.s", 628 "common/arm64/ihevc_sao_edge_offset_class0.s", 629 "common/arm64/ihevc_sao_edge_offset_class0_chroma.s", 630 "common/arm64/ihevc_sao_edge_offset_class1.s", 631 "common/arm64/ihevc_sao_edge_offset_class1_chroma.s", 632 "common/arm64/ihevc_sao_edge_offset_class2.s", 633 "common/arm64/ihevc_sao_edge_offset_class2_chroma.s", 634 "common/arm64/ihevc_sao_edge_offset_class3.s", 635 "common/arm64/ihevc_sao_edge_offset_class3_chroma.s", 636 "common/arm64/ihevc_weighted_pred_bi.s", 637 "common/arm64/ihevc_weighted_pred_bi_default.s", 638 "common/arm64/ihevc_weighted_pred_uni.s", 639 ], 640 641 cflags: [ 642 "-DENABLE_NEON", "-DARMV8", "-DARM", 643 ], 644 }, 645 646 arm: { 647 local_include_dirs: [ 648 "encoder/arm", 649 "common/arm", 650 ], 651 652 instruction_set: "arm", 653 654 neon: { 655 srcs: [ 656 "encoder/arm/ihevce_coarse_layer_sad_neon.c", 657 "encoder/arm/ihevce_common_utils_neon.c", 658 "encoder/arm/ihevce_copy_neon.c", 659 "encoder/arm/ihevce_had_compute_neon.c", 660 "encoder/arm/ihevce_hme_utils_neon.c", 661 "encoder/arm/ihevce_itrans_recon_neon.c", 662 "encoder/arm/ihevce_me_neon.c", 663 "encoder/arm/ihevce_sad_compute_neon.c", 664 "encoder/arm/ihevce_scale_by_2_neon.c", 665 "encoder/arm/ihevce_scan_coeffs_neon.c", 666 "encoder/arm/ihevce_ssd_and_sad_calculator_neon.c", 667 "encoder/arm/ihevce_ssd_calculator_neon.c", 668 "encoder/arm/ihevce_subpel_neon.c", 669 "common/arm/ihevc_resi_trans_neon.c", 670 "common/arm/ihevc_resi_trans_neon_32x32.c", 671 "common/arm/ihevc_quant_iquant_ssd_neon_intr.c", 672 "common/arm/ihevc_intra_pred_filters_neon_intr.c", 673 "common/arm/ihevc_weighted_pred_neon_intr.c", 674 "common/arm/ihevc_intra_ref_substitution_a9q.c", 675 "common/arm/ihevc_deblk_chroma_horz.s", 676 "common/arm/ihevc_deblk_chroma_vert.s", 677 "common/arm/ihevc_deblk_luma_horz.s", 678 "common/arm/ihevc_deblk_luma_vert.s", 679 "common/arm/ihevc_inter_pred_chroma_copy.s", 680 "common/arm/ihevc_inter_pred_chroma_copy_w16out.s", 681 "common/arm/ihevc_inter_pred_chroma_horz.s", 682 "common/arm/ihevc_inter_pred_chroma_horz_w16out.s", 683 "common/arm/ihevc_inter_pred_chroma_vert.s", 684 "common/arm/ihevc_inter_pred_chroma_vert_w16inp.s", 685 "common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s", 686 "common/arm/ihevc_inter_pred_chroma_vert_w16out.s", 687 "common/arm/ihevc_inter_pred_filters_luma_horz.s", 688 "common/arm/ihevc_inter_pred_filters_luma_vert.s", 689 "common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s", 690 "common/arm/ihevc_inter_pred_luma_copy.s", 691 "common/arm/ihevc_inter_pred_luma_copy_w16out.s", 692 "common/arm/ihevc_inter_pred_luma_horz_w16out.s", 693 "common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s", 694 "common/arm/ihevc_intra_pred_chroma_dc.s", 695 "common/arm/ihevc_intra_pred_chroma_horz.s", 696 "common/arm/ihevc_intra_pred_chroma_mode2.s", 697 "common/arm/ihevc_intra_pred_chroma_mode_18_34.s", 698 "common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s", 699 "common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s", 700 "common/arm/ihevc_intra_pred_chroma_planar.s", 701 "common/arm/ihevc_intra_pred_chroma_ver.s", 702 "common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s", 703 "common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s", 704 "common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s", 705 "common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s", 706 "common/arm/ihevc_intra_pred_luma_dc.s", 707 "common/arm/ihevc_intra_pred_luma_horz.s", 708 "common/arm/ihevc_intra_pred_luma_mode2.s", 709 "common/arm/ihevc_intra_pred_luma_mode_18_34.s", 710 "common/arm/ihevc_intra_pred_luma_mode_27_to_33.s", 711 "common/arm/ihevc_intra_pred_luma_mode_3_to_9.s", 712 "common/arm/ihevc_intra_pred_luma_planar.s", 713 "common/arm/ihevc_intra_pred_luma_vert.s", 714 "common/arm/ihevc_itrans_recon_16x16.s", 715 "common/arm/ihevc_itrans_recon_32x32.s", 716 "common/arm/ihevc_itrans_recon_4x4.s", 717 "common/arm/ihevc_itrans_recon_4x4_ttype1.s", 718 "common/arm/ihevc_itrans_recon_8x8.s", 719 "common/arm/ihevc_resi_trans.s", 720 "common/arm/ihevc_resi_trans_32x32_a9q.s", 721 "common/arm/ihevc_mem_fns.s", 722 "common/arm/ihevc_padding.s", 723 "common/arm/ihevc_sao_band_offset_chroma.s", 724 "common/arm/ihevc_sao_band_offset_luma.s", 725 "common/arm/ihevc_sao_edge_offset_class0.s", 726 "common/arm/ihevc_sao_edge_offset_class0_chroma.s", 727 "common/arm/ihevc_sao_edge_offset_class1.s", 728 "common/arm/ihevc_sao_edge_offset_class1_chroma.s", 729 "common/arm/ihevc_sao_edge_offset_class2.s", 730 "common/arm/ihevc_sao_edge_offset_class2_chroma.s", 731 "common/arm/ihevc_sao_edge_offset_class3.s", 732 "common/arm/ihevc_sao_edge_offset_class3_chroma.s", 733 "common/arm/ihevc_weighted_pred_bi_default.s", 734 "common/arm/ihevc_weighted_pred_bi.s", 735 "common/arm/ihevc_weighted_pred_uni.s", 736 ], 737 738 cflags: [ 739 "-DENABLE_NEON", "-DARM", 740 ], 741 }, 742 }, 743 744 x86_64: { 745 local_include_dirs: [ 746 "common/x86", 747 ], 748 }, 749 750 x86: { 751 local_include_dirs: [ 752 "common/x86", 753 ], 754 } 755 756 }, 757 sanitize: { 758 integer_overflow: true, 759 misc_undefined: ["bounds"], 760 // Enable CFI if this becomes a shared library. 761 // cfi: true, 762 diag: { 763 integer_overflow: true, 764 misc_undefined: ["bounds"], 765 }, 766 blacklist: "libhevc_blacklist.txt", 767 }, 768} 769 770cc_test { 771 name: "hevcenc", 772 cflags: [ 773 "-DARM", 774 "-fPIC", 775 "-Wall", 776 "-Werror", 777 ], 778 srcs: ["test/encoder/main.c"], 779 static_libs: ["libhevcenc"], 780 sanitize: { 781 integer_overflow: true, 782 misc_undefined: ["bounds"], 783 diag: { 784 integer_overflow: true, 785 misc_undefined: ["bounds"], 786 }, 787 }, 788} 789