| package { | |
| default_applicable_licenses: ["external_libmpeg2_license"], | |
| } | |
| // Added automatically by a large-scale-change | |
| // See: http://go/android-license-faq | |
| license { | |
| name: "external_libmpeg2_license", | |
| visibility: [":__subpackages__"], | |
| license_kinds: [ | |
| "SPDX-license-identifier-Apache-2.0", | |
| ], | |
| license_text: [ | |
| "NOTICE", | |
| ], | |
| } | |
| cc_library_static { | |
| name: "libmpeg2dec", | |
| defaults: ["no_bti"], | |
| vendor_available: true, | |
| host_supported: true, | |
| shared_libs: [ | |
| "liblog", | |
| "libcutils", | |
| ], | |
| cflags: [ | |
| "-D_LIB", | |
| "-DMULTICORE", | |
| "-fPIC", | |
| "-O3", | |
| "-DANDROID", | |
| "-Werror", | |
| // #KEEP_THREAD_ACTIVE is experimental | |
| "-UKEEP_THREADS_ACTIVE", | |
| ], | |
| export_include_dirs: [ | |
| "common", | |
| "decoder", | |
| ], | |
| srcs: [ | |
| "common/icv_sad.c", | |
| "common/icv_variance.c", | |
| "common/ideint.c", | |
| "common/ideint_cac.c", | |
| "common/ideint_debug.c", | |
| "common/ideint_function_selector_generic.c", | |
| "common/ideint_utils.c", | |
| "common/impeg2_buf_mgr.c", | |
| "common/impeg2_disp_mgr.c", | |
| "common/impeg2_format_conv.c", | |
| "common/impeg2_globals.c", | |
| "common/impeg2_idct.c", | |
| "common/impeg2_inter_pred.c", | |
| "common/impeg2_job_queue.c", | |
| "common/impeg2_mem_func.c", | |
| "common/ithread.c", | |
| "decoder/impeg2d_api_main.c", | |
| "decoder/impeg2d_bitstream.c", | |
| "decoder/impeg2d_d_pic.c", | |
| "decoder/impeg2d_debug.c", | |
| "decoder/impeg2d_dec_hdr.c", | |
| "decoder/impeg2d_decoder.c", | |
| "decoder/impeg2d_deinterlace.c", | |
| "decoder/impeg2d_function_selector_generic.c", | |
| "decoder/impeg2d_globals.c", | |
| "decoder/impeg2d_i_pic.c", | |
| "decoder/impeg2d_mc.c", | |
| "decoder/impeg2d_mv_dec.c", | |
| "decoder/impeg2d_pic_proc.c", | |
| "decoder/impeg2d_pnb_pic.c", | |
| "decoder/impeg2d_vld.c", | |
| "decoder/impeg2d_vld_tables.c", | |
| ], | |
| arch: { | |
| arm: { | |
| local_include_dirs: [ | |
| "common/arm", | |
| "decoder/arm", | |
| ], | |
| srcs: [ | |
| "common/arm/ideint_function_selector.c", | |
| "decoder/arm/impeg2d_function_selector.c", | |
| "common/arm/icv_sad_a9.s", | |
| "common/arm/icv_variance_a9.s", | |
| "common/arm/ideint_cac_a9.s", | |
| "common/arm/ideint_function_selector_a9.c", | |
| "common/arm/ideint_spatial_filter_a9.s", | |
| "common/arm/impeg2_format_conv.s", | |
| "common/arm/impeg2_idct.s", | |
| "common/arm/impeg2_inter_pred.s", | |
| "common/arm/impeg2_mem_func.s", | |
| "decoder/arm/impeg2d_function_selector_a9q.c", | |
| ], | |
| cflags: [ | |
| "-DARM", | |
| "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q", | |
| ], | |
| instruction_set: "arm", | |
| }, | |
| arm64: { | |
| cflags: [ | |
| "-DARMV8", | |
| "-DARM", | |
| "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC", | |
| ], | |
| local_include_dirs: [ | |
| "common/armv8", | |
| "decoder/arm", | |
| ], | |
| srcs: [ | |
| "common/arm/ideint_function_selector.c", | |
| "common/arm/ideint_function_selector_av8.c", | |
| "common/armv8/icv_sad_av8.s", | |
| "common/armv8/icv_variance_av8.s", | |
| "common/armv8/ideint_cac_av8.s", | |
| "common/armv8/ideint_spatial_filter_av8.s", | |
| "common/armv8/impeg2_format_conv.s", | |
| "common/armv8/impeg2_idct.s", | |
| "common/armv8/impeg2_inter_pred.s", | |
| "common/armv8/impeg2_mem_func.s", | |
| "common/armv8/impeg2_neon_macros.s", | |
| "decoder/arm/impeg2d_function_selector.c", | |
| "decoder/arm/impeg2d_function_selector_av8.c", | |
| ], | |
| }, | |
| riscv64: { | |
| local_include_dirs: [ | |
| "common/riscv", | |
| ], | |
| srcs: [ | |
| "common/riscv/ideint_function_selector.c", | |
| "decoder/riscv/impeg2d_function_selector.c", | |
| ], | |
| }, | |
| x86: { | |
| cflags: [ | |
| "-DX86", | |
| "-DDISABLE_AVX2", | |
| "-msse4.2", | |
| "-mno-avx", | |
| "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", | |
| ], | |
| local_include_dirs: [ | |
| "common/x86", | |
| "decoder/x86", | |
| ], | |
| srcs: [ | |
| "common/x86/icv_sad_ssse3.c", | |
| "common/x86/icv_variance_ssse3.c", | |
| "common/x86/ideint_cac_ssse3.c", | |
| "common/x86/ideint_function_selector.c", | |
| "common/x86/ideint_function_selector_sse42.c", | |
| "common/x86/ideint_function_selector_ssse3.c", | |
| "common/x86/ideint_spatial_filter_ssse3.c", | |
| "common/x86/impeg2_idct_recon_sse42_intr.c", | |
| "common/x86/impeg2_inter_pred_sse42_intr.c", | |
| "common/x86/impeg2_mem_func_sse42_intr.c", | |
| "decoder/x86/impeg2d_function_selector.c", | |
| "decoder/x86/impeg2d_function_selector_avx2.c", | |
| "decoder/x86/impeg2d_function_selector_sse42.c", | |
| "decoder/x86/impeg2d_function_selector_ssse3.c", | |
| ], | |
| }, | |
| x86_64: { | |
| cflags: [ | |
| "-DX86", | |
| "-DDISABLE_AVX2", | |
| "-msse4.2", | |
| "-mno-avx", | |
| "-DDEFAULT_ARCH=D_ARCH_X86_SSE42", | |
| ], | |
| local_include_dirs: [ | |
| "common/x86", | |
| "decoder/x86", | |
| ], | |
| srcs: [ | |
| "common/x86/icv_sad_ssse3.c", | |
| "common/x86/icv_variance_ssse3.c", | |
| "common/x86/ideint_cac_ssse3.c", | |
| "common/x86/ideint_function_selector.c", | |
| "common/x86/ideint_function_selector_sse42.c", | |
| "common/x86/ideint_function_selector_ssse3.c", | |
| "common/x86/ideint_spatial_filter_ssse3.c", | |
| "common/x86/impeg2_idct_recon_sse42_intr.c", | |
| "common/x86/impeg2_inter_pred_sse42_intr.c", | |
| "common/x86/impeg2_mem_func_sse42_intr.c", | |
| "decoder/x86/impeg2d_function_selector.c", | |
| "decoder/x86/impeg2d_function_selector_avx2.c", | |
| "decoder/x86/impeg2d_function_selector_sse42.c", | |
| "decoder/x86/impeg2d_function_selector_ssse3.c", | |
| ], | |
| }, | |
| }, | |
| sanitize: { | |
| integer_overflow: true, | |
| misc_undefined: ["bounds"], | |
| // Enable CFI if this becomes a shared library. | |
| // cfi: true, | |
| blocklist: "libmpeg2dec_blocklist.txt", | |
| }, | |
| apex_available: [ | |
| "//apex_available:platform", | |
| "com.android.media.swcodec", | |
| ], | |
| min_sdk_version: "29", | |
| } | |
| subdirs = ["test"] |