1cc_library_static { 2 name: "libavcdec", 3 vendor_available: true, 4 shared_libs: ["liblog", "libcutils",], 5 6 cflags: [ 7 "-fPIC", 8 "-O3", 9 ], 10 11 export_include_dirs: [ 12 "decoder", 13 "common", 14 ], 15 16 srcs: [ 17 "common/ih264_buf_mgr.c", 18 "common/ih264_disp_mgr.c", 19 "common/ih264_inter_pred_filters.c", 20 "common/ih264_luma_intra_pred_filters.c", 21 "common/ih264_chroma_intra_pred_filters.c", 22 "common/ih264_padding.c", 23 "common/ih264_mem_fns.c", 24 "common/ih264_deblk_edge_filters.c", 25 "common/ih264_iquant_itrans_recon.c", 26 "common/ih264_ihadamard_scaling.c", 27 "common/ih264_weighted_pred.c", 28 "common/ithread.c", 29 "decoder/ih264d_cabac.c", 30 "decoder/ih264d_parse_mb_header.c", 31 "decoder/ih264d_parse_cabac.c", 32 "decoder/ih264d_process_intra_mb.c", 33 "decoder/ih264d_inter_pred.c", 34 "decoder/ih264d_parse_bslice.c", 35 "decoder/ih264d_parse_pslice.c", 36 "decoder/ih264d_parse_islice.c", 37 "decoder/ih264d_cabac_init_tables.c", 38 "decoder/ih264d_bitstrm.c", 39 "decoder/ih264d_compute_bs.c", 40 "decoder/ih264d_deblocking.c", 41 "decoder/ih264d_parse_headers.c", 42 "decoder/ih264d_mb_utils.c", 43 "decoder/ih264d_mvpred.c", 44 "decoder/ih264d_utils.c", 45 "decoder/ih264d_process_bslice.c", 46 "decoder/ih264d_process_pslice.c", 47 "decoder/ih264d_parse_slice.c", 48 "decoder/ih264d_quant_scaling.c", 49 "decoder/ih264d_parse_cavlc.c", 50 "decoder/ih264d_dpb_mgr.c", 51 "decoder/ih264d_nal.c", 52 "decoder/ih264d_sei.c", 53 "decoder/ih264d_tables.c", 54 "decoder/ih264d_vui.c", 55 "decoder/ih264d_format_conv.c", 56 "decoder/ih264d_thread_parse_decode.c", 57 "decoder/ih264d_api.c", 58 "decoder/ih264d_thread_compute_bs.c", 59 "decoder/ih264d_function_selector_generic.c", 60 ], 61 62 arch: { 63 arm: { 64 local_include_dirs: [ 65 "decoder/arm", 66 "common/arm", 67 ], 68 69 srcs: [ 70 "decoder/arm/ih264d_function_selector.c", 71 "common/arm/ih264_arm_memory_barrier.s", 72 ], 73 74 cflags: [ 75 "-DARM", 76 77 // These will be overriden by armv7_a_neon 78 "-DDISABLE_NEON", 79 "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON", 80 ], 81 82 armv7_a_neon: { 83 srcs: [ 84 "decoder/arm/ih264d_function_selector_a9q.c", 85 "common/arm/ih264_intra_pred_chroma_a9q.s", 86 "common/arm/ih264_intra_pred_luma_16x16_a9q.s", 87 "common/arm/ih264_intra_pred_luma_4x4_a9q.s", 88 "common/arm/ih264_intra_pred_luma_8x8_a9q.s", 89 "common/arm/ih264_inter_pred_chroma_a9q.s", 90 "common/arm/ih264_inter_pred_filters_luma_horz_a9q.s", 91 "common/arm/ih264_inter_pred_filters_luma_vert_a9q.s", 92 "common/arm/ih264_inter_pred_luma_copy_a9q.s", 93 "common/arm/ih264_inter_pred_luma_horz_qpel_a9q.s", 94 "common/arm/ih264_inter_pred_luma_vert_qpel_a9q.s", 95 "common/arm/ih264_inter_pred_luma_horz_hpel_vert_hpel_a9q.s", 96 "common/arm/ih264_inter_pred_luma_horz_qpel_vert_qpel_a9q.s", 97 "common/arm/ih264_inter_pred_luma_horz_qpel_vert_hpel_a9q.s", 98 "common/arm/ih264_inter_pred_luma_horz_hpel_vert_qpel_a9q.s", 99 "common/arm/ih264_default_weighted_pred_a9q.s", 100 "common/arm/ih264_weighted_pred_a9q.s", 101 "common/arm/ih264_weighted_bi_pred_a9q.s", 102 "common/arm/ih264_deblk_chroma_a9.s", 103 "common/arm/ih264_deblk_luma_a9.s", 104 "common/arm/ih264_padding_neon.s", 105 "common/arm/ih264_iquant_itrans_recon_a9.s", 106 "common/arm/ih264_iquant_itrans_recon_dc_a9.s", 107 "common/arm/ih264_ihadamard_scaling_a9.s", 108 ], 109 cflags: [ 110 "-UDISABLE_NEON", 111 "-UDEFAULT_ARCH", 112 "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q", 113 ], 114 }, 115 }, 116 117 arm64: { 118 cflags: [ 119 "-DARMV8", 120 "-DARM", 121 "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC", 122 ], 123 local_include_dirs: [ 124 "decoder/arm", 125 "common/armv8", 126 ], 127 128 srcs: [ 129 "decoder/arm/ih264d_function_selector.c", 130 "decoder/arm/ih264d_function_selector_av8.c", 131 "common/armv8/ih264_intra_pred_chroma_av8.s", 132 "common/armv8/ih264_intra_pred_luma_16x16_av8.s", 133 "common/armv8/ih264_intra_pred_luma_4x4_av8.s", 134 "common/armv8/ih264_inter_pred_chroma_av8.s", 135 "common/armv8/ih264_inter_pred_filters_luma_horz_av8.s", 136 "common/armv8/ih264_inter_pred_filters_luma_vert_av8.s", 137 "common/armv8/ih264_inter_pred_luma_copy_av8.s", 138 "common/armv8/ih264_inter_pred_luma_horz_qpel_av8.s", 139 "common/armv8/ih264_inter_pred_luma_vert_qpel_av8.s", 140 "common/armv8/ih264_inter_pred_luma_horz_hpel_vert_hpel_av8.s", 141 "common/armv8/ih264_inter_pred_luma_horz_qpel_vert_qpel_av8.s", 142 "common/armv8/ih264_inter_pred_luma_horz_qpel_vert_hpel_av8.s", 143 "common/armv8/ih264_inter_pred_luma_horz_hpel_vert_qpel_av8.s", 144 "common/armv8/ih264_default_weighted_pred_av8.s", 145 "common/armv8/ih264_weighted_pred_av8.s", 146 "common/armv8/ih264_weighted_bi_pred_av8.s", 147 "common/armv8/ih264_deblk_chroma_av8.s", 148 "common/armv8/ih264_deblk_luma_av8.s", 149 "common/armv8/ih264_padding_neon_av8.s", 150 "common/armv8/ih264_iquant_itrans_recon_av8.s", 151 "common/armv8/ih264_iquant_itrans_recon_dc_av8.s", 152 "common/armv8/ih264_ihadamard_scaling_av8.s", 153 "common/armv8/ih264_intra_pred_luma_8x8_av8.s", 154 ], 155 }, 156 157 mips: { 158 local_include_dirs: ["common/mips"], 159 160 srcs: ["decoder/mips/ih264d_function_selector.c"], 161 }, 162 163 mips64: { 164 local_include_dirs: ["common/mips"], 165 166 srcs: ["decoder/mips/ih264d_function_selector.c"], 167 }, 168 169 x86: { 170 cflags: [ 171 "-DX86", 172 "-msse4.2", 173 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 174 ], 175 176 local_include_dirs: [ 177 "decoder/x86", 178 "common/x86", 179 ], 180 181 srcs: [ 182 "decoder/x86/ih264d_function_selector.c", 183 "decoder/x86/ih264d_function_selector_sse42.c", 184 "decoder/x86/ih264d_function_selector_ssse3.c", 185 "common/x86/ih264_inter_pred_filters_ssse3.c", 186 "common/x86/ih264_deblk_luma_ssse3.c", 187 "common/x86/ih264_deblk_chroma_ssse3.c", 188 "common/x86/ih264_padding_ssse3.c", 189 "common/x86/ih264_mem_fns_ssse3.c", 190 "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c", 191 "common/x86/ih264_iquant_itrans_recon_ssse3.c", 192 "common/x86/ih264_luma_intra_pred_filters_ssse3.c", 193 "common/x86/ih264_chroma_intra_pred_filters_ssse3.c", 194 "common/x86/ih264_iquant_itrans_recon_sse42.c", 195 "common/x86/ih264_weighted_pred_sse42.c", 196 "common/x86/ih264_ihadamard_scaling_sse42.c", 197 ], 198 }, 199 200 x86_64: { 201 cflags: [ 202 "-DX86", 203 "-msse4.2", 204 "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", 205 ], 206 207 local_include_dirs: [ 208 "decoder/x86", 209 "common/x86", 210 ], 211 212 srcs: [ 213 "decoder/x86/ih264d_function_selector.c", 214 "decoder/x86/ih264d_function_selector_sse42.c", 215 "decoder/x86/ih264d_function_selector_ssse3.c", 216 "common/x86/ih264_inter_pred_filters_ssse3.c", 217 "common/x86/ih264_deblk_luma_ssse3.c", 218 "common/x86/ih264_deblk_chroma_ssse3.c", 219 "common/x86/ih264_padding_ssse3.c", 220 "common/x86/ih264_mem_fns_ssse3.c", 221 "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c", 222 "common/x86/ih264_iquant_itrans_recon_ssse3.c", 223 "common/x86/ih264_luma_intra_pred_filters_ssse3.c", 224 "common/x86/ih264_chroma_intra_pred_filters_ssse3.c", 225 "common/x86/ih264_iquant_itrans_recon_sse42.c", 226 "common/x86/ih264_weighted_pred_sse42.c", 227 "common/x86/ih264_ihadamard_scaling_sse42.c", 228 ], 229 }, 230 }, 231} 232 233cc_library_static { 234 name: "libavcenc", 235 vendor_available: true, 236 shared_libs: ["liblog", "libcutils",], 237 238 cflags: [ 239 "-DNDEBUG", 240 "-UHP_PL", 241 "-DN_MB_ENABLE", 242 "-fPIC", 243 244 "-O3", 245 ], 246 247 export_include_dirs: [ 248 "encoder", 249 "common", 250 ], 251 252 srcs: [ //Rate Control 253 "common/ih264_resi_trans_quant.c", 254 "common/ih264_iquant_itrans_recon.c", 255 "common/ih264_ihadamard_scaling.c", 256 "common/ih264_inter_pred_filters.c", 257 "common/ih264_luma_intra_pred_filters.c", 258 "common/ih264_chroma_intra_pred_filters.c", 259 "common/ih264_padding.c", 260 "common/ih264_mem_fns.c", 261 "common/ih264_deblk_edge_filters.c", 262 "common/ih264_deblk_tables.c", 263 "common/ih264_cavlc_tables.c", 264 "common/ih264_cabac_tables.c", 265 "common/ih264_common_tables.c", 266 "common/ih264_trans_data.c", 267 "common/ih264_buf_mgr.c", 268 "common/ih264_dpb_mgr.c", 269 "common/ih264_list.c", 270 "common/ithread.c", 271 "encoder/ih264e_globals.c", 272 "encoder/ih264e_intra_modes_eval.c", 273 "encoder/ih264e_half_pel.c", 274 "encoder/ih264e_mc.c", 275 "encoder/ih264e_me.c", 276 "encoder/ih264e_rc_mem_interface.c", 277 "encoder/ih264e_time_stamp.c", 278 "encoder/ih264e_modify_frm_rate.c", 279 "encoder/ih264e_rate_control.c", 280 "encoder/ih264e_core_coding.c", 281 "encoder/ih264e_deblk.c", 282 "encoder/ih264e_api.c", 283 "encoder/ih264e_process.c", 284 "encoder/ih264e_encode.c", 285 "encoder/ih264e_utils.c", 286 "encoder/ih264e_version.c", 287 "encoder/ih264e_bitstream.c", 288 "encoder/ih264e_cavlc.c", 289 "encoder/ih264e_cabac_init.c", 290 "encoder/ih264e_cabac.c", 291 "encoder/ih264e_cabac_encode.c", 292 "encoder/ih264e_encode_header.c", 293 "encoder/ih264e_function_selector_generic.c", 294 "encoder/ih264e_fmt_conv.c", 295 "encoder/irc_rate_control_api.c", 296 "encoder/irc_bit_allocation.c", 297 "encoder/irc_cbr_buffer_control.c", 298 "encoder/irc_est_sad.c", 299 "encoder/irc_fixed_point_error_bits.c", 300 "encoder/irc_frame_info_collector.c", 301 "encoder/irc_mb_model_based.c", 302 "encoder/irc_picture_type.c", 303 "encoder/irc_rd_model.c", 304 "encoder/irc_vbr_storage_vbv.c", 305 "encoder/irc_vbr_str_prms.c", 306 "encoder/ime.c", 307 "encoder/ime_distortion_metrics.c", 308 ], 309 310 arch: { 311 arm: { 312 local_include_dirs: [ 313 "encoder/arm", 314 "common/arm", 315 ], 316 317 srcs: [ 318 "encoder/arm/ih264e_function_selector.c", 319 "common/arm/ih264_arm_memory_barrier.s", 320 ], 321 322 cflags: [ 323 "-DARM", 324 325 // This will be overriden by armv7_a_neon 326 "-DDISABLE_NEON", 327 ], 328 329 armv7_a_neon: { 330 srcs: [ 331 "encoder/arm/ih264e_function_selector_a9q.c", 332 "common/arm/ih264_resi_trans_quant_a9.s", 333 "common/arm/ih264_iquant_itrans_recon_a9.s", 334 "common/arm/ih264_iquant_itrans_recon_dc_a9.s", 335 "common/arm/ih264_ihadamard_scaling_a9.s", 336 "common/arm/ih264_deblk_chroma_a9.s", 337 "common/arm/ih264_deblk_luma_a9.s", 338 "common/arm/ih264_intra_pred_chroma_a9q.s", 339 "common/arm/ih264_intra_pred_luma_16x16_a9q.s", 340 "common/arm/ih264_intra_pred_luma_4x4_a9q.s", 341 "common/arm/ih264_intra_pred_luma_8x8_a9q.s", 342 "common/arm/ih264_inter_pred_chroma_a9q.s", 343 "common/arm/ih264_inter_pred_filters_luma_horz_a9q.s", 344 "common/arm/ih264_inter_pred_filters_luma_vert_a9q.s", 345 "common/arm/ih264_inter_pred_luma_bilinear_a9q.s", 346 "common/arm/ih264_inter_pred_luma_copy_a9q.s", 347 "common/arm/ih264_padding_neon.s", 348 "common/arm/ih264_mem_fns_neon.s", 349 "encoder/arm/ih264e_evaluate_intra16x16_modes_a9q.s", 350 "encoder/arm/ih264e_evaluate_intra4x4_modes_a9q.s", 351 "encoder/arm/ih264e_evaluate_intra_chroma_modes_a9q.s", 352 "encoder/arm/ih264e_half_pel.s", 353 "encoder/arm/ih264e_fmt_conv.s", 354 "encoder/arm/ime_distortion_metrics_a9q.s", 355 ], 356 357 cflags: [ 358 "-UDISABLE_NEON", 359 ], 360 }, 361 }, 362 363 arm64: { 364 cflags: [ 365 "-DARMV8", 366 "-DARM", 367 ], 368 369 local_include_dirs: [ 370 "encoder/arm", 371 "encoder/armv8", 372 "common/armv8", 373 ], 374 375 srcs: [ 376 "encoder/arm/ih264e_function_selector.c", 377 "encoder/arm/ih264e_function_selector_av8.c", 378 "common/armv8/ih264_resi_trans_quant_av8.s", 379 "common/armv8/ih264_iquant_itrans_recon_av8.s", 380 "common/armv8/ih264_iquant_itrans_recon_dc_av8.s", 381 "common/armv8/ih264_ihadamard_scaling_av8.s", 382 "common/armv8/ih264_intra_pred_chroma_av8.s", 383 "common/armv8/ih264_intra_pred_luma_16x16_av8.s", 384 "common/armv8/ih264_intra_pred_luma_4x4_av8.s", 385 "common/armv8/ih264_intra_pred_luma_8x8_av8.s", 386 "common/armv8/ih264_inter_pred_luma_copy_av8.s", 387 "common/armv8/ih264_inter_pred_chroma_av8.s", 388 "common/armv8/ih264_inter_pred_filters_luma_horz_av8.s", 389 "common/armv8/ih264_inter_pred_filters_luma_vert_av8.s", 390 "common/armv8/ih264_padding_neon_av8.s", 391 "common/armv8/ih264_mem_fns_neon_av8.s", 392 "common/armv8/ih264_deblk_luma_av8.s", 393 "common/armv8/ih264_deblk_chroma_av8.s", 394 "encoder/armv8/ih264e_evaluate_intra16x16_modes_av8.s", 395 "encoder/armv8/ih264e_evaluate_intra_chroma_modes_av8.s", 396 "encoder/armv8/ih264e_half_pel_av8.s", 397 "encoder/armv8/ime_distortion_metrics_av8.s", 398 ], 399 }, 400 401 mips: { 402 local_include_dirs: [ 403 "common/mips", 404 "encoder/mips", 405 ], 406 407 srcs: ["encoder/mips/ih264e_function_selector.c"], 408 }, 409 410 mips64: { 411 local_include_dirs: [ 412 "common/mips", 413 "encoder/mips", 414 ], 415 416 srcs: ["encoder/mips/ih264e_function_selector.c"], 417 }, 418 419 x86: { 420 cflags: [ 421 "-DX86", 422 "-msse4.2", 423 ], 424 425 local_include_dirs: [ 426 "encoder/x86", 427 "common/x86", 428 ], 429 430 srcs: [ 431 "encoder/x86/ih264e_function_selector.c", 432 "encoder/x86/ih264e_function_selector_sse42.c", 433 "encoder/x86/ih264e_function_selector_ssse3.c", 434 "common/x86/ih264_iquant_itrans_recon_ssse3.c", 435 "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c", 436 "common/x86/ih264_ihadamard_scaling_ssse3.c", 437 "common/x86/ih264_inter_pred_filters_ssse3.c", 438 "common/x86/ih264_mem_fns_ssse3.c", 439 "common/x86/ih264_padding_ssse3.c", 440 "common/x86/ih264_luma_intra_pred_filters_ssse3.c", 441 "common/x86/ih264_chroma_intra_pred_filters_ssse3.c", 442 "common/x86/ih264_deblk_chroma_ssse3.c", 443 "common/x86/ih264_deblk_luma_ssse3.c", 444 "common/x86/ih264_iquant_itrans_recon_sse42.c", 445 "common/x86/ih264_ihadamard_scaling_sse42.c", 446 "common/x86/ih264_resi_trans_quant_sse42.c", 447 "common/x86/ih264_weighted_pred_sse42.c", 448 "encoder/x86/ih264e_half_pel_ssse3.c", 449 "encoder/x86/ih264e_intra_modes_eval_ssse3.c", 450 "encoder/x86/ime_distortion_metrics_sse42.c", 451 ], 452 }, 453 454 x86_64: { 455 cflags: [ 456 "-DX86", 457 "-msse4.2", 458 ], 459 460 local_include_dirs: [ 461 "encoder/x86", 462 "common/x86", 463 ], 464 465 srcs: [ 466 "encoder/x86/ih264e_function_selector.c", 467 "encoder/x86/ih264e_function_selector_sse42.c", 468 "encoder/x86/ih264e_function_selector_ssse3.c", 469 "common/x86/ih264_iquant_itrans_recon_ssse3.c", 470 "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c", 471 "common/x86/ih264_ihadamard_scaling_ssse3.c", 472 "common/x86/ih264_inter_pred_filters_ssse3.c", 473 "common/x86/ih264_mem_fns_ssse3.c", 474 "common/x86/ih264_padding_ssse3.c", 475 "common/x86/ih264_luma_intra_pred_filters_ssse3.c", 476 "common/x86/ih264_chroma_intra_pred_filters_ssse3.c", 477 "common/x86/ih264_deblk_chroma_ssse3.c", 478 "common/x86/ih264_deblk_luma_ssse3.c", 479 "common/x86/ih264_iquant_itrans_recon_sse42.c", 480 "common/x86/ih264_ihadamard_scaling_sse42.c", 481 "common/x86/ih264_resi_trans_quant_sse42.c", 482 "common/x86/ih264_weighted_pred_sse42.c", 483 "encoder/x86/ih264e_half_pel_ssse3.c", 484 "encoder/x86/ih264e_intra_modes_eval_ssse3.c", 485 "encoder/x86/ime_distortion_metrics_sse42.c", 486 ], 487 }, 488 }, 489} 490 491subdirs = ["test"] 492