package {
    default_applicable_licenses: [
        "frameworks_av_media_codecs_m4v_h263_dec_license",
    ],
}

// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
    name: "frameworks_av_media_codecs_m4v_h263_dec_license",
    visibility: [":__subpackages__"],
    license_kinds: [
        "SPDX-license-identifier-Apache-2.0",
    ],
    license_text: [
        "NOTICE",
    ],
}

cc_library_static {
    name: "libstagefright_m4vh263dec",
    vendor_available: true,
    apex_available: [
        "//apex_available:platform",
        "com.android.media.swcodec",
    ],
    min_sdk_version: "29",
    host_supported: true,
    shared_libs: ["liblog"],

    srcs: [
        "src/bitstream.cpp",
        "src/block_idct.cpp",
        "src/cal_dc_scaler.cpp",
        "src/combined_decode.cpp",
        "src/conceal.cpp",
        "src/datapart_decode.cpp",
        "src/dcac_prediction.cpp",
        "src/dec_pred_intra_dc.cpp",
        "src/get_pred_adv_b_add.cpp",
        "src/get_pred_outside.cpp",
        "src/idct.cpp",
        "src/idct_vca.cpp",
        "src/mb_motion_comp.cpp",
        "src/mb_utils.cpp",
        "src/packet_util.cpp",
        "src/post_filter.cpp",
        "src/pvdec_api.cpp",
        "src/scaling_tab.cpp",
        "src/vlc_decode.cpp",
        "src/vlc_dequant.cpp",
        "src/vlc_tab.cpp",
        "src/vop.cpp",
        "src/zigzag_tab.cpp",
    ],

    local_include_dirs: ["src"],
    export_include_dirs: ["include"],

    cflags: [
        "-Werror",
    ],

    sanitize: {
        misc_undefined: [
            "signed-integer-overflow",
        ],
        cfi: true,
    },

    target: {
        darwin: {
            enabled: false,
        },
    },
}
