Initialize DPB structures to valid values. am: b8d362561e am: 278ed70003 am: f178731344 am: ed0086bd3f am: aa22ca288d am: b2503ce9ad am: 2025670e41 am: 630d10abba am: 8a712339cf
am: f7de034890
Change-Id: I7c36a060e4801cfed11e27ac43601b8d36a15bea
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..ac7d304
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,487 @@
+cc_library_static {
+ name: "libavcdec",
+
+ cflags: [
+ "-fPIC",
+ "-O3",
+ ],
+
+ export_include_dirs: [
+ "decoder",
+ "common",
+ ],
+
+ srcs: [
+ "common/ih264_buf_mgr.c",
+ "common/ih264_disp_mgr.c",
+ "common/ih264_inter_pred_filters.c",
+ "common/ih264_luma_intra_pred_filters.c",
+ "common/ih264_chroma_intra_pred_filters.c",
+ "common/ih264_padding.c",
+ "common/ih264_mem_fns.c",
+ "common/ih264_deblk_edge_filters.c",
+ "common/ih264_iquant_itrans_recon.c",
+ "common/ih264_ihadamard_scaling.c",
+ "common/ih264_weighted_pred.c",
+ "common/ithread.c",
+ "decoder/ih264d_cabac.c",
+ "decoder/ih264d_parse_mb_header.c",
+ "decoder/ih264d_parse_cabac.c",
+ "decoder/ih264d_process_intra_mb.c",
+ "decoder/ih264d_inter_pred.c",
+ "decoder/ih264d_parse_bslice.c",
+ "decoder/ih264d_parse_pslice.c",
+ "decoder/ih264d_parse_islice.c",
+ "decoder/ih264d_cabac_init_tables.c",
+ "decoder/ih264d_bitstrm.c",
+ "decoder/ih264d_compute_bs.c",
+ "decoder/ih264d_deblocking.c",
+ "decoder/ih264d_parse_headers.c",
+ "decoder/ih264d_mb_utils.c",
+ "decoder/ih264d_mvpred.c",
+ "decoder/ih264d_utils.c",
+ "decoder/ih264d_process_bslice.c",
+ "decoder/ih264d_process_pslice.c",
+ "decoder/ih264d_parse_slice.c",
+ "decoder/ih264d_quant_scaling.c",
+ "decoder/ih264d_parse_cavlc.c",
+ "decoder/ih264d_dpb_mgr.c",
+ "decoder/ih264d_nal.c",
+ "decoder/ih264d_sei.c",
+ "decoder/ih264d_tables.c",
+ "decoder/ih264d_vui.c",
+ "decoder/ih264d_format_conv.c",
+ "decoder/ih264d_thread_parse_decode.c",
+ "decoder/ih264d_api.c",
+ "decoder/ih264d_thread_compute_bs.c",
+ "decoder/ih264d_function_selector_generic.c",
+ ],
+
+ arch: {
+ arm: {
+ local_include_dirs: [
+ "decoder/arm",
+ "common/arm",
+ ],
+
+ srcs: [
+ "decoder/arm/ih264d_function_selector.c",
+ "common/arm/ih264_arm_memory_barrier.s",
+ ],
+
+ cflags: [
+ "-DARM",
+
+ // These will be overriden by armv7_a_neon
+ "-DDISABLE_NEON",
+ "-DDEFAULT_ARCH=D_ARCH_ARM_NONEON",
+ ],
+
+ armv7_a_neon: {
+ srcs: [
+ "decoder/arm/ih264d_function_selector_a9q.c",
+ "common/arm/ih264_intra_pred_chroma_a9q.s",
+ "common/arm/ih264_intra_pred_luma_16x16_a9q.s",
+ "common/arm/ih264_intra_pred_luma_4x4_a9q.s",
+ "common/arm/ih264_intra_pred_luma_8x8_a9q.s",
+ "common/arm/ih264_inter_pred_chroma_a9q.s",
+ "common/arm/ih264_inter_pred_filters_luma_horz_a9q.s",
+ "common/arm/ih264_inter_pred_filters_luma_vert_a9q.s",
+ "common/arm/ih264_inter_pred_luma_copy_a9q.s",
+ "common/arm/ih264_inter_pred_luma_horz_qpel_a9q.s",
+ "common/arm/ih264_inter_pred_luma_vert_qpel_a9q.s",
+ "common/arm/ih264_inter_pred_luma_horz_hpel_vert_hpel_a9q.s",
+ "common/arm/ih264_inter_pred_luma_horz_qpel_vert_qpel_a9q.s",
+ "common/arm/ih264_inter_pred_luma_horz_qpel_vert_hpel_a9q.s",
+ "common/arm/ih264_inter_pred_luma_horz_hpel_vert_qpel_a9q.s",
+ "common/arm/ih264_default_weighted_pred_a9q.s",
+ "common/arm/ih264_weighted_pred_a9q.s",
+ "common/arm/ih264_weighted_bi_pred_a9q.s",
+ "common/arm/ih264_deblk_chroma_a9.s",
+ "common/arm/ih264_deblk_luma_a9.s",
+ "common/arm/ih264_padding_neon.s",
+ "common/arm/ih264_iquant_itrans_recon_a9.s",
+ "common/arm/ih264_iquant_itrans_recon_dc_a9.s",
+ "common/arm/ih264_ihadamard_scaling_a9.s",
+ ],
+ cflags: [
+ "-UDISABLE_NEON",
+ "-UDEFAULT_ARCH",
+ "-DDEFAULT_ARCH=D_ARCH_ARM_A9Q",
+ ],
+ },
+ },
+
+ arm64: {
+ cflags: [
+ "-DARMV8",
+ "-DARM",
+ "-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC",
+ ],
+ local_include_dirs: [
+ "decoder/arm",
+ "common/armv8",
+ ],
+
+ srcs: [
+ "decoder/arm/ih264d_function_selector.c",
+ "decoder/arm/ih264d_function_selector_av8.c",
+ "common/armv8/ih264_intra_pred_chroma_av8.s",
+ "common/armv8/ih264_intra_pred_luma_16x16_av8.s",
+ "common/armv8/ih264_intra_pred_luma_4x4_av8.s",
+ "common/armv8/ih264_inter_pred_chroma_av8.s",
+ "common/armv8/ih264_inter_pred_filters_luma_horz_av8.s",
+ "common/armv8/ih264_inter_pred_filters_luma_vert_av8.s",
+ "common/armv8/ih264_inter_pred_luma_copy_av8.s",
+ "common/armv8/ih264_inter_pred_luma_horz_qpel_av8.s",
+ "common/armv8/ih264_inter_pred_luma_vert_qpel_av8.s",
+ "common/armv8/ih264_inter_pred_luma_horz_hpel_vert_hpel_av8.s",
+ "common/armv8/ih264_inter_pred_luma_horz_qpel_vert_qpel_av8.s",
+ "common/armv8/ih264_inter_pred_luma_horz_qpel_vert_hpel_av8.s",
+ "common/armv8/ih264_inter_pred_luma_horz_hpel_vert_qpel_av8.s",
+ "common/armv8/ih264_default_weighted_pred_av8.s",
+ "common/armv8/ih264_weighted_pred_av8.s",
+ "common/armv8/ih264_weighted_bi_pred_av8.s",
+ "common/armv8/ih264_deblk_chroma_av8.s",
+ "common/armv8/ih264_deblk_luma_av8.s",
+ "common/armv8/ih264_padding_neon_av8.s",
+ "common/armv8/ih264_iquant_itrans_recon_av8.s",
+ "common/armv8/ih264_iquant_itrans_recon_dc_av8.s",
+ "common/armv8/ih264_ihadamard_scaling_av8.s",
+ "common/armv8/ih264_intra_pred_luma_8x8_av8.s",
+ ],
+ },
+
+ mips: {
+ local_include_dirs: ["common/mips"],
+
+ srcs: ["decoder/mips/ih264d_function_selector.c"],
+ },
+
+ mips64: {
+ local_include_dirs: ["common/mips"],
+
+ srcs: ["decoder/mips/ih264d_function_selector.c"],
+ },
+
+ x86: {
+ cflags: [
+ "-DX86",
+ "-msse4.2",
+ "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
+ ],
+
+ local_include_dirs: [
+ "decoder/x86",
+ "common/x86",
+ ],
+
+ srcs: [
+ "decoder/x86/ih264d_function_selector.c",
+ "decoder/x86/ih264d_function_selector_sse42.c",
+ "decoder/x86/ih264d_function_selector_ssse3.c",
+ "common/x86/ih264_inter_pred_filters_ssse3.c",
+ "common/x86/ih264_deblk_luma_ssse3.c",
+ "common/x86/ih264_deblk_chroma_ssse3.c",
+ "common/x86/ih264_padding_ssse3.c",
+ "common/x86/ih264_mem_fns_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_ssse3.c",
+ "common/x86/ih264_luma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_chroma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_sse42.c",
+ "common/x86/ih264_weighted_pred_sse42.c",
+ "common/x86/ih264_ihadamard_scaling_sse42.c",
+ ],
+ },
+
+ x86_64: {
+ cflags: [
+ "-DX86",
+ "-msse4.2",
+ "-DDEFAULT_ARCH=D_ARCH_X86_SSE42",
+ ],
+
+ local_include_dirs: [
+ "decoder/x86",
+ "common/x86",
+ ],
+
+ srcs: [
+ "decoder/x86/ih264d_function_selector.c",
+ "decoder/x86/ih264d_function_selector_sse42.c",
+ "decoder/x86/ih264d_function_selector_ssse3.c",
+ "common/x86/ih264_inter_pred_filters_ssse3.c",
+ "common/x86/ih264_deblk_luma_ssse3.c",
+ "common/x86/ih264_deblk_chroma_ssse3.c",
+ "common/x86/ih264_padding_ssse3.c",
+ "common/x86/ih264_mem_fns_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_ssse3.c",
+ "common/x86/ih264_luma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_chroma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_sse42.c",
+ "common/x86/ih264_weighted_pred_sse42.c",
+ "common/x86/ih264_ihadamard_scaling_sse42.c",
+ ],
+ },
+ },
+}
+
+cc_library_static {
+ name: "libavcenc",
+
+ cflags: [
+ "-DNDEBUG",
+ "-UHP_PL",
+ "-DN_MB_ENABLE",
+ "-fPIC",
+
+ "-O3",
+ ],
+
+ export_include_dirs: [
+ "encoder",
+ "common",
+ ],
+
+ srcs: [ //Rate Control
+ "common/ih264_resi_trans_quant.c",
+ "common/ih264_iquant_itrans_recon.c",
+ "common/ih264_ihadamard_scaling.c",
+ "common/ih264_inter_pred_filters.c",
+ "common/ih264_luma_intra_pred_filters.c",
+ "common/ih264_chroma_intra_pred_filters.c",
+ "common/ih264_padding.c",
+ "common/ih264_mem_fns.c",
+ "common/ih264_deblk_edge_filters.c",
+ "common/ih264_deblk_tables.c",
+ "common/ih264_cavlc_tables.c",
+ "common/ih264_cabac_tables.c",
+ "common/ih264_common_tables.c",
+ "common/ih264_trans_data.c",
+ "common/ih264_buf_mgr.c",
+ "common/ih264_dpb_mgr.c",
+ "common/ih264_list.c",
+ "common/ithread.c",
+ "encoder/ih264e_globals.c",
+ "encoder/ih264e_intra_modes_eval.c",
+ "encoder/ih264e_half_pel.c",
+ "encoder/ih264e_mc.c",
+ "encoder/ih264e_me.c",
+ "encoder/ih264e_rc_mem_interface.c",
+ "encoder/ih264e_time_stamp.c",
+ "encoder/ih264e_modify_frm_rate.c",
+ "encoder/ih264e_rate_control.c",
+ "encoder/ih264e_core_coding.c",
+ "encoder/ih264e_deblk.c",
+ "encoder/ih264e_api.c",
+ "encoder/ih264e_process.c",
+ "encoder/ih264e_encode.c",
+ "encoder/ih264e_utils.c",
+ "encoder/ih264e_version.c",
+ "encoder/ih264e_bitstream.c",
+ "encoder/ih264e_cavlc.c",
+ "encoder/ih264e_cabac_init.c",
+ "encoder/ih264e_cabac.c",
+ "encoder/ih264e_cabac_encode.c",
+ "encoder/ih264e_encode_header.c",
+ "encoder/ih264e_function_selector_generic.c",
+ "encoder/ih264e_fmt_conv.c",
+ "encoder/irc_rate_control_api.c",
+ "encoder/irc_bit_allocation.c",
+ "encoder/irc_cbr_buffer_control.c",
+ "encoder/irc_est_sad.c",
+ "encoder/irc_fixed_point_error_bits.c",
+ "encoder/irc_frame_info_collector.c",
+ "encoder/irc_mb_model_based.c",
+ "encoder/irc_picture_type.c",
+ "encoder/irc_rd_model.c",
+ "encoder/irc_vbr_storage_vbv.c",
+ "encoder/irc_vbr_str_prms.c",
+ "encoder/ime.c",
+ "encoder/ime_distortion_metrics.c",
+ ],
+
+ arch: {
+ arm: {
+ local_include_dirs: [
+ "encoder/arm",
+ "common/arm",
+ ],
+
+ srcs: [
+ "encoder/arm/ih264e_function_selector.c",
+ "common/arm/ih264_arm_memory_barrier.s",
+ ],
+
+ cflags: [
+ "-DARM",
+
+ // This will be overriden by armv7_a_neon
+ "-DDISABLE_NEON",
+ ],
+
+ armv7_a_neon: {
+ srcs: [
+ "encoder/arm/ih264e_function_selector_a9q.c",
+ "common/arm/ih264_resi_trans_quant_a9.s",
+ "common/arm/ih264_iquant_itrans_recon_a9.s",
+ "common/arm/ih264_iquant_itrans_recon_dc_a9.s",
+ "common/arm/ih264_ihadamard_scaling_a9.s",
+ "common/arm/ih264_deblk_chroma_a9.s",
+ "common/arm/ih264_deblk_luma_a9.s",
+ "common/arm/ih264_intra_pred_chroma_a9q.s",
+ "common/arm/ih264_intra_pred_luma_16x16_a9q.s",
+ "common/arm/ih264_intra_pred_luma_4x4_a9q.s",
+ "common/arm/ih264_intra_pred_luma_8x8_a9q.s",
+ "common/arm/ih264_inter_pred_chroma_a9q.s",
+ "common/arm/ih264_inter_pred_filters_luma_horz_a9q.s",
+ "common/arm/ih264_inter_pred_filters_luma_vert_a9q.s",
+ "common/arm/ih264_inter_pred_luma_bilinear_a9q.s",
+ "common/arm/ih264_inter_pred_luma_copy_a9q.s",
+ "common/arm/ih264_padding_neon.s",
+ "common/arm/ih264_mem_fns_neon.s",
+ "encoder/arm/ih264e_evaluate_intra16x16_modes_a9q.s",
+ "encoder/arm/ih264e_evaluate_intra4x4_modes_a9q.s",
+ "encoder/arm/ih264e_evaluate_intra_chroma_modes_a9q.s",
+ "encoder/arm/ih264e_half_pel.s",
+ "encoder/arm/ih264e_fmt_conv.s",
+ "encoder/arm/ime_distortion_metrics_a9q.s",
+ ],
+
+ cflags: [
+ "-UDISABLE_NEON",
+ ],
+ },
+ },
+
+ arm64: {
+ cflags: [
+ "-DARMV8",
+ "-DARM",
+ ],
+
+ local_include_dirs: [
+ "encoder/arm",
+ "encoder/armv8",
+ "common/armv8",
+ ],
+
+ srcs: [
+ "encoder/arm/ih264e_function_selector.c",
+ "encoder/arm/ih264e_function_selector_av8.c",
+ "common/armv8/ih264_resi_trans_quant_av8.s",
+ "common/armv8/ih264_iquant_itrans_recon_av8.s",
+ "common/armv8/ih264_iquant_itrans_recon_dc_av8.s",
+ "common/armv8/ih264_ihadamard_scaling_av8.s",
+ "common/armv8/ih264_intra_pred_chroma_av8.s",
+ "common/armv8/ih264_intra_pred_luma_16x16_av8.s",
+ "common/armv8/ih264_intra_pred_luma_4x4_av8.s",
+ "common/armv8/ih264_intra_pred_luma_8x8_av8.s",
+ "common/armv8/ih264_inter_pred_luma_copy_av8.s",
+ "common/armv8/ih264_inter_pred_chroma_av8.s",
+ "common/armv8/ih264_inter_pred_filters_luma_horz_av8.s",
+ "common/armv8/ih264_inter_pred_filters_luma_vert_av8.s",
+ "common/armv8/ih264_padding_neon_av8.s",
+ "common/armv8/ih264_mem_fns_neon_av8.s",
+ "common/armv8/ih264_deblk_luma_av8.s",
+ "common/armv8/ih264_deblk_chroma_av8.s",
+ "encoder/armv8/ih264e_evaluate_intra16x16_modes_av8.s",
+ "encoder/armv8/ih264e_evaluate_intra_chroma_modes_av8.s",
+ "encoder/armv8/ih264e_half_pel_av8.s",
+ "encoder/armv8/ime_distortion_metrics_av8.s",
+ ],
+ },
+
+ mips: {
+ local_include_dirs: [
+ "common/mips",
+ "encoder/mips",
+ ],
+
+ srcs: ["encoder/mips/ih264e_function_selector.c"],
+ },
+
+ mips64: {
+ local_include_dirs: [
+ "common/mips",
+ "encoder/mips",
+ ],
+
+ srcs: ["encoder/mips/ih264e_function_selector.c"],
+ },
+
+ x86: {
+ cflags: [
+ "-DX86",
+ "-msse4.2",
+ ],
+
+ local_include_dirs: [
+ "encoder/x86",
+ "common/x86",
+ ],
+
+ srcs: [
+ "encoder/x86/ih264e_function_selector.c",
+ "encoder/x86/ih264e_function_selector_sse42.c",
+ "encoder/x86/ih264e_function_selector_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c",
+ "common/x86/ih264_ihadamard_scaling_ssse3.c",
+ "common/x86/ih264_inter_pred_filters_ssse3.c",
+ "common/x86/ih264_mem_fns_ssse3.c",
+ "common/x86/ih264_padding_ssse3.c",
+ "common/x86/ih264_luma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_chroma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_deblk_chroma_ssse3.c",
+ "common/x86/ih264_deblk_luma_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_sse42.c",
+ "common/x86/ih264_ihadamard_scaling_sse42.c",
+ "common/x86/ih264_resi_trans_quant_sse42.c",
+ "common/x86/ih264_weighted_pred_sse42.c",
+ "encoder/x86/ih264e_half_pel_ssse3.c",
+ "encoder/x86/ih264e_intra_modes_eval_ssse3.c",
+ "encoder/x86/ime_distortion_metrics_sse42.c",
+ ],
+ },
+
+ x86_64: {
+ cflags: [
+ "-DX86",
+ "-msse4.2",
+ ],
+
+ local_include_dirs: [
+ "encoder/x86",
+ "common/x86",
+ ],
+
+ srcs: [
+ "encoder/x86/ih264e_function_selector.c",
+ "encoder/x86/ih264e_function_selector_sse42.c",
+ "encoder/x86/ih264e_function_selector_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_dc_ssse3.c",
+ "common/x86/ih264_ihadamard_scaling_ssse3.c",
+ "common/x86/ih264_inter_pred_filters_ssse3.c",
+ "common/x86/ih264_mem_fns_ssse3.c",
+ "common/x86/ih264_padding_ssse3.c",
+ "common/x86/ih264_luma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_chroma_intra_pred_filters_ssse3.c",
+ "common/x86/ih264_deblk_chroma_ssse3.c",
+ "common/x86/ih264_deblk_luma_ssse3.c",
+ "common/x86/ih264_iquant_itrans_recon_sse42.c",
+ "common/x86/ih264_ihadamard_scaling_sse42.c",
+ "common/x86/ih264_resi_trans_quant_sse42.c",
+ "common/x86/ih264_weighted_pred_sse42.c",
+ "encoder/x86/ih264e_half_pel_ssse3.c",
+ "encoder/x86/ih264e_intra_modes_eval_ssse3.c",
+ "encoder/x86/ime_distortion_metrics_sse42.c",
+ ],
+ },
+ },
+}
+
+subdirs = ["test"]
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 0085832..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# encoder
-include $(LOCAL_PATH)/encoder.mk
-
-# decoder
-include $(LOCAL_PATH)/decoder.mk
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..3da5c7a
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,3 @@
+marcone@google.com
+essick@google.com
+lajos@google.com
diff --git a/decoder.arm.mk b/decoder.arm.mk
deleted file mode 100644
index e5ac2d4..0000000
--- a/decoder.arm.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-libavcd_inc_dir_arm += $(LOCAL_PATH)/decoder/arm
-libavcd_inc_dir_arm += $(LOCAL_PATH)/common/arm
-
-libavcd_srcs_c_arm += decoder/arm/ih264d_function_selector.c
-libavcd_cflags_arm += -DARM
-
-#LOCAL_ARM_MODE := arm
-
-ifeq ($(ARCH_ARM_HAVE_NEON),true)
-libavcd_srcs_c_arm += decoder/arm/ih264d_function_selector_a9q.c
-
-libavcd_srcs_asm_arm += common/arm/ih264_intra_pred_chroma_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_intra_pred_luma_16x16_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_intra_pred_luma_4x4_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_intra_pred_luma_8x8_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_chroma_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_filters_luma_horz_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_filters_luma_vert_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_copy_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_horz_qpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_vert_qpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_horz_hpel_vert_hpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_horz_qpel_vert_qpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_horz_qpel_vert_hpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_inter_pred_luma_horz_hpel_vert_qpel_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_default_weighted_pred_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_weighted_pred_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_weighted_bi_pred_a9q.s
-libavcd_srcs_asm_arm += common/arm/ih264_deblk_chroma_a9.s
-libavcd_srcs_asm_arm += common/arm/ih264_deblk_luma_a9.s
-libavcd_srcs_asm_arm += common/arm/ih264_padding_neon.s
-libavcd_srcs_asm_arm += common/arm/ih264_iquant_itrans_recon_a9.s
-libavcd_srcs_asm_arm += common/arm/ih264_iquant_itrans_recon_dc_a9.s
-libavcd_srcs_asm_arm += common/arm/ih264_ihadamard_scaling_a9.s
-
-libavcd_cflags_arm += -DDEFAULT_ARCH=D_ARCH_ARM_A9Q
-else
-libavcd_cflags_arm += -DDISABLE_NEON -DDEFAULT_ARCH=D_ARCH_ARM_NONEON
-endif
-
-libavcd_srcs_asm_arm += common/arm/ih264_arm_memory_barrier.s
-
-LOCAL_SRC_FILES_arm += $(libavcd_srcs_c_arm) $(libavcd_srcs_asm_arm)
-LOCAL_C_INCLUDES_arm += $(libavcd_inc_dir_arm)
-LOCAL_CFLAGS_arm += $(libavcd_cflags_arm)
diff --git a/decoder.arm64.mk b/decoder.arm64.mk
deleted file mode 100644
index 5ccf70f..0000000
--- a/decoder.arm64.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-libavcd_cflags_arm64 += -DARMV8
-libavcd_cflags_arm64 += -DARM
-
-libavcd_inc_dir_arm64 += $(LOCAL_PATH)/decoder/arm
-libavcd_inc_dir_arm64 += $(LOCAL_PATH)/common/armv8
-
-libavcd_srcs_c_arm64 += decoder/arm/ih264d_function_selector.c
-
-libavcd_srcs_c_arm64 += decoder/arm/ih264d_function_selector_av8.c
-
-libavcd_srcs_asm_arm64 += common/armv8/ih264_intra_pred_chroma_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_16x16_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_4x4_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_chroma_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_filters_luma_horz_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_filters_luma_vert_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_copy_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_horz_qpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_vert_qpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_horz_hpel_vert_hpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_horz_qpel_vert_qpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_horz_qpel_vert_hpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_horz_hpel_vert_qpel_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_default_weighted_pred_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_weighted_pred_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_weighted_bi_pred_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_deblk_chroma_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_deblk_luma_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_padding_neon_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_iquant_itrans_recon_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_iquant_itrans_recon_dc_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_ihadamard_scaling_av8.s
-libavcd_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_8x8_av8.s
-
-libavcd_cflags_arm64 += -DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC
-
-
-LOCAL_SRC_FILES_arm64 += $(libavcd_srcs_c_arm64) $(libavcd_srcs_asm_arm64)
-LOCAL_C_INCLUDES_arm64 += $(libavcd_inc_dir_arm64)
-LOCAL_CFLAGS_arm64 += $(libavcd_cflags_arm64)
-
-# CLANG WORKAROUNDS
-LOCAL_CLANG_ASFLAGS_arm64 += $(addprefix -Wa$(comma)-I,$(libavcd_inc_dir_arm64))
diff --git a/decoder.mips.mk b/decoder.mips.mk
deleted file mode 100644
index 3d00395..0000000
--- a/decoder.mips.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-libavcd_inc_dir_mips += $(LOCAL_PATH)/common/mips
-
-libavcd_srcs_c_mips += decoder/mips/ih264d_function_selector.c
-
-LOCAL_C_INCLUDES_mips += $(libavcd_inc_dir_mips)
-LOCAL_SRC_FILES_mips += $(libavcd_srcs_c_mips)
diff --git a/decoder.mips64.mk b/decoder.mips64.mk
deleted file mode 100644
index 18dc40e..0000000
--- a/decoder.mips64.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-libavcd_inc_dir_mips64 += $(LOCAL_PATH)/common/mips
-
-libavcd_srcs_c_mips64 += decoder/mips/ih264d_function_selector.c
-
-LOCAL_C_INCLUDES_mips64 += $(libavcd_inc_dir_mips64)
-LOCAL_SRC_FILES_mips64 += $(libavcd_srcs_c_mips64)
diff --git a/decoder.mk b/decoder.mk
deleted file mode 100644
index 8b9bd55..0000000
--- a/decoder.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-libavcd_source_dir := $(LOCAL_PATH)
-
-## Arch-common settings
-LOCAL_MODULE := libavcdec
-#LOCAL_32_BIT_ONLY := true
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_CFLAGS += -fPIC
-LOCAL_CFLAGS += -O3
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/decoder $(LOCAL_PATH)/common
-
-libavcd_srcs_c += common/ih264_buf_mgr.c
-libavcd_srcs_c += common/ih264_disp_mgr.c
-libavcd_srcs_c += common/ih264_inter_pred_filters.c
-libavcd_srcs_c += common/ih264_luma_intra_pred_filters.c
-libavcd_srcs_c += common/ih264_chroma_intra_pred_filters.c
-libavcd_srcs_c += common/ih264_padding.c
-libavcd_srcs_c += common/ih264_mem_fns.c
-libavcd_srcs_c += common/ih264_deblk_edge_filters.c
-libavcd_srcs_c += common/ih264_iquant_itrans_recon.c
-libavcd_srcs_c += common/ih264_ihadamard_scaling.c
-libavcd_srcs_c += common/ih264_weighted_pred.c
-
-libavcd_srcs_c += common/ithread.c
-
-libavcd_srcs_c += decoder/ih264d_cabac.c
-libavcd_srcs_c += decoder/ih264d_parse_mb_header.c
-libavcd_srcs_c += decoder/ih264d_parse_cabac.c
-libavcd_srcs_c += decoder/ih264d_process_intra_mb.c
-libavcd_srcs_c += decoder/ih264d_inter_pred.c
-libavcd_srcs_c += decoder/ih264d_parse_bslice.c
-libavcd_srcs_c += decoder/ih264d_parse_pslice.c
-libavcd_srcs_c += decoder/ih264d_parse_islice.c
-libavcd_srcs_c += decoder/ih264d_cabac_init_tables.c
-libavcd_srcs_c += decoder/ih264d_bitstrm.c
-libavcd_srcs_c += decoder/ih264d_compute_bs.c
-libavcd_srcs_c += decoder/ih264d_deblocking.c
-libavcd_srcs_c += decoder/ih264d_parse_headers.c
-libavcd_srcs_c += decoder/ih264d_mb_utils.c
-libavcd_srcs_c += decoder/ih264d_mvpred.c
-libavcd_srcs_c += decoder/ih264d_utils.c
-libavcd_srcs_c += decoder/ih264d_process_bslice.c
-libavcd_srcs_c += decoder/ih264d_process_pslice.c
-libavcd_srcs_c += decoder/ih264d_parse_slice.c
-libavcd_srcs_c += decoder/ih264d_quant_scaling.c
-libavcd_srcs_c += decoder/ih264d_parse_cavlc.c
-libavcd_srcs_c += decoder/ih264d_dpb_mgr.c
-libavcd_srcs_c += decoder/ih264d_nal.c
-libavcd_srcs_c += decoder/ih264d_sei.c
-libavcd_srcs_c += decoder/ih264d_tables.c
-libavcd_srcs_c += decoder/ih264d_vui.c
-libavcd_srcs_c += decoder/ih264d_format_conv.c
-libavcd_srcs_c += decoder/ih264d_thread_parse_decode.c
-libavcd_srcs_c += decoder/ih264d_api.c
-libavcd_srcs_c += decoder/ih264d_thread_compute_bs.c
-libavcd_srcs_c += decoder/ih264d_function_selector_generic.c
-
-
-LOCAL_SRC_FILES := $(libavcd_srcs_c) $(libavcd_srcs_asm)
-
-
-# Load the arch-specific settings
-include $(LOCAL_PATH)/decoder.arm.mk
-include $(LOCAL_PATH)/decoder.arm64.mk
-include $(LOCAL_PATH)/decoder.x86.mk
-include $(LOCAL_PATH)/decoder.x86_64.mk
-include $(LOCAL_PATH)/decoder.mips.mk
-include $(LOCAL_PATH)/decoder.mips64.mk
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/decoder.x86.mk b/decoder.x86.mk
deleted file mode 100644
index 100a501..0000000
--- a/decoder.x86.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-libavcd_cflags_x86 += -DX86 -msse4.2 -DDEFAULT_ARCH=D_ARCH_X86_SSE42
-
-libavcd_inc_dir_x86 += $(LOCAL_PATH)/decoder/x86
-libavcd_inc_dir_x86 += $(LOCAL_PATH)/common/x86
-
-libavcd_srcs_c_x86 += decoder/x86/ih264d_function_selector.c
-libavcd_srcs_c_x86 += decoder/x86/ih264d_function_selector_sse42.c
-libavcd_srcs_c_x86 += decoder/x86/ih264d_function_selector_ssse3.c
-
-libavcd_srcs_c_x86 += common/x86/ih264_inter_pred_filters_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_deblk_luma_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_deblk_chroma_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_padding_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_mem_fns_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_luma_intra_pred_filters_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_chroma_intra_pred_filters_ssse3.c
-libavcd_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_sse42.c
-libavcd_srcs_c_x86 += common/x86/ih264_weighted_pred_sse42.c
-libavcd_srcs_c_x86 += common/x86/ih264_ihadamard_scaling_sse42.c
-
-LOCAL_SRC_FILES_x86 += $(libavcd_srcs_c_x86) $(libavcd_srcs_asm_x86)
-LOCAL_C_INCLUDES_x86 += $(libavcd_inc_dir_x86)
-LOCAL_CFLAGS_x86 += $(libavcd_cflags_x86)
-
diff --git a/decoder.x86_64.mk b/decoder.x86_64.mk
deleted file mode 100644
index 4d926ec..0000000
--- a/decoder.x86_64.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-libavcd_cflags_x86_64 += -DX86 -msse4.2 -DDEFAULT_ARCH=D_ARCH_X86_SSE42
-
-libavcd_inc_dir_x86_64 += $(LOCAL_PATH)/decoder/x86
-libavcd_inc_dir_x86_64 += $(LOCAL_PATH)/common/x86
-
-libavcd_srcs_c_x86_64 += decoder/x86/ih264d_function_selector.c
-libavcd_srcs_c_x86_64 += decoder/x86/ih264d_function_selector_sse42.c
-libavcd_srcs_c_x86_64 += decoder/x86/ih264d_function_selector_ssse3.c
-
-libavcd_srcs_c_x86_64 += common/x86/ih264_inter_pred_filters_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_deblk_luma_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_deblk_chroma_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_padding_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_mem_fns_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_luma_intra_pred_filters_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_chroma_intra_pred_filters_ssse3.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_sse42.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_weighted_pred_sse42.c
-libavcd_srcs_c_x86_64 += common/x86/ih264_ihadamard_scaling_sse42.c
-
-
-LOCAL_SRC_FILES_x86_64 += $(libavcd_srcs_c_x86_64) $(libavcd_srcs_asm_x86_64)
-LOCAL_C_INCLUDES_x86_64 += $(libavcd_inc_dir_x86_64)
-LOCAL_CFLAGS_x86_64 += $(libavcd_cflags_x86_64)
-
-
-
diff --git a/encoder.arm.mk b/encoder.arm.mk
deleted file mode 100644
index f06a6d5..0000000
--- a/encoder.arm.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-libavce_inc_dir_arm += $(LOCAL_PATH)/encoder/arm
-libavce_inc_dir_arm += $(LOCAL_PATH)/common/arm
-
-libavce_cflags_arm += -DARM
-
-libavce_srcs_c_arm += encoder/arm/ih264e_function_selector.c
-
-ifeq ($(ARCH_ARM_HAVE_NEON),true)
-libavce_srcs_c_arm += encoder/arm/ih264e_function_selector_a9q.c
-
-libavce_srcs_asm_arm += common/arm/ih264_resi_trans_quant_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_iquant_itrans_recon_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_iquant_itrans_recon_dc_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_ihadamard_scaling_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_deblk_chroma_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_deblk_luma_a9.s
-libavce_srcs_asm_arm += common/arm/ih264_intra_pred_chroma_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_intra_pred_luma_16x16_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_intra_pred_luma_4x4_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_intra_pred_luma_8x8_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_inter_pred_chroma_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_inter_pred_filters_luma_horz_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_inter_pred_filters_luma_vert_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_inter_pred_luma_bilinear_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_inter_pred_luma_copy_a9q.s
-libavce_srcs_asm_arm += common/arm/ih264_padding_neon.s
-libavce_srcs_asm_arm += common/arm/ih264_mem_fns_neon.s
-
-libavce_srcs_asm_arm += encoder/arm/ih264e_evaluate_intra16x16_modes_a9q.s
-libavce_srcs_asm_arm += encoder/arm/ih264e_evaluate_intra4x4_modes_a9q.s
-libavce_srcs_asm_arm += encoder/arm/ih264e_evaluate_intra_chroma_modes_a9q.s
-libavce_srcs_asm_arm += encoder/arm/ih264e_half_pel.s
-libavce_srcs_asm_arm += encoder/arm/ih264e_fmt_conv.s
-
-#ME
-libavce_srcs_asm_arm += encoder/arm/ime_distortion_metrics_a9q.s
-
-else #No Neon
-libavce_cflags_arm += -DDISABLE_NEON
-endif #Neon check
-
-libavce_srcs_asm_arm += common/arm/ih264_arm_memory_barrier.s
-
-LOCAL_SRC_FILES_arm += $(libavce_srcs_c_arm) $(libavce_srcs_asm_arm)
-LOCAL_C_INCLUDES_arm += $(libavce_inc_dir_arm)
-LOCAL_CFLAGS_arm += $(libavce_cflags_arm)
diff --git a/encoder.arm64.mk b/encoder.arm64.mk
deleted file mode 100644
index 73cce1b..0000000
--- a/encoder.arm64.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-libavce_cflags_arm64 += -DARMV8
-libavce_cflags_arm64 += -DARM
-
-libavce_inc_dir_arm64 += $(LOCAL_PATH)/encoder/arm
-libavce_inc_dir_arm64 += $(LOCAL_PATH)/encoder/armv8
-libavce_inc_dir_arm64 += $(LOCAL_PATH)/common/armv8
-
-libavce_srcs_c_arm64 += encoder/arm/ih264e_function_selector.c
-
-libavce_srcs_c_arm64 += encoder/arm/ih264e_function_selector_av8.c
-
-libavce_srcs_asm_arm64 += common/armv8/ih264_resi_trans_quant_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_iquant_itrans_recon_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_iquant_itrans_recon_dc_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_ihadamard_scaling_av8.s
-
-libavce_srcs_asm_arm64 += common/armv8/ih264_intra_pred_chroma_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_16x16_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_4x4_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_intra_pred_luma_8x8_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_inter_pred_luma_copy_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_inter_pred_chroma_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_inter_pred_filters_luma_horz_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_inter_pred_filters_luma_vert_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_padding_neon_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_mem_fns_neon_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_deblk_luma_av8.s
-libavce_srcs_asm_arm64 += common/armv8/ih264_deblk_chroma_av8.s
-
-libavce_srcs_asm_arm64 += encoder/armv8/ih264e_evaluate_intra16x16_modes_av8.s
-libavce_srcs_asm_arm64 += encoder/armv8/ih264e_evaluate_intra_chroma_modes_av8.s
-libavce_srcs_asm_arm64 += encoder/armv8/ih264e_half_pel_av8.s
-
-#ME
-libavce_srcs_asm_arm64 += encoder/armv8/ime_distortion_metrics_av8.s
-
-
-LOCAL_SRC_FILES_arm64 += $(libavce_srcs_c_arm64) $(libavce_srcs_asm_arm64)
-LOCAL_C_INCLUDES_arm64 += $(libavce_inc_dir_arm64)
-LOCAL_CFLAGS_arm64 += $(libavce_cflags_arm64)
-
-# CLANG WORKAROUNDS
-LOCAL_CLANG_ASFLAGS_arm64 += $(addprefix -Wa$(comma)-I,$(libavce_inc_dir_arm64))
diff --git a/encoder.mips.mk b/encoder.mips.mk
deleted file mode 100644
index 92ae5de..0000000
--- a/encoder.mips.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-libavce_inc_dir_mips += $(LOCAL_PATH)/common/mips
-libavce_inc_dir_mips += $(LOCAL_PATH)/encoder/mips
-
-libavce_srcs_c_mips += encoder/mips/ih264e_function_selector.c
-
-LOCAL_C_INCLUDES_mips += $(libavce_inc_dir_mips)
-LOCAL_SRC_FILES_mips += $(libavce_srcs_c_mips)
diff --git a/encoder.mips64.mk b/encoder.mips64.mk
deleted file mode 100644
index 4f48789..0000000
--- a/encoder.mips64.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-libavce_inc_dir_mips64 += $(LOCAL_PATH)/common/mips
-libavce_inc_dir_mips64 += $(LOCAL_PATH)/encoder/mips
-
-libavce_srcs_c_mips64 += encoder/mips/ih264e_function_selector.c
-
-LOCAL_C_INCLUDES_mips64 += $(libavce_inc_dir_mips64)
-LOCAL_SRC_FILES_mips64 += $(libavce_srcs_c_mips64)
diff --git a/encoder.mk b/encoder.mk
deleted file mode 100644
index 7efcda2..0000000
--- a/encoder.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-libavce_source_dir := $(LOCAL_PATH)
-
-## Arch-common settings
-LOCAL_MODULE := libavcenc
-#LOCAL_32_BIT_ONLY := true
-
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_CFLAGS += -DNDEBUG -UHP_PL -DN_MB_ENABLE -fPIC
-LOCAL_CFLAGS += -O3
-
-LOCAL_C_INCLUDES := $(LOCAL_PATH)/encoder $(LOCAL_PATH)/common
-
-libavce_srcs_c += common/ih264_resi_trans_quant.c
-libavce_srcs_c += common/ih264_iquant_itrans_recon.c
-libavce_srcs_c += common/ih264_ihadamard_scaling.c
-libavce_srcs_c += common/ih264_inter_pred_filters.c
-libavce_srcs_c += common/ih264_luma_intra_pred_filters.c
-libavce_srcs_c += common/ih264_chroma_intra_pred_filters.c
-libavce_srcs_c += common/ih264_padding.c
-libavce_srcs_c += common/ih264_mem_fns.c
-libavce_srcs_c += common/ih264_deblk_edge_filters.c
-libavce_srcs_c += common/ih264_deblk_tables.c
-libavce_srcs_c += common/ih264_cavlc_tables.c
-libavce_srcs_c += common/ih264_cabac_tables.c
-libavce_srcs_c += common/ih264_common_tables.c
-libavce_srcs_c += common/ih264_trans_data.c
-libavce_srcs_c += common/ih264_buf_mgr.c
-libavce_srcs_c += common/ih264_dpb_mgr.c
-libavce_srcs_c += common/ih264_list.c
-
-
-libavce_srcs_c += common/ithread.c
-
-libavce_srcs_c += encoder/ih264e_globals.c
-libavce_srcs_c += encoder/ih264e_intra_modes_eval.c
-libavce_srcs_c += encoder/ih264e_half_pel.c
-libavce_srcs_c += encoder/ih264e_mc.c
-libavce_srcs_c += encoder/ih264e_me.c
-libavce_srcs_c += encoder/ih264e_rc_mem_interface.c
-libavce_srcs_c += encoder/ih264e_time_stamp.c
-libavce_srcs_c += encoder/ih264e_modify_frm_rate.c
-libavce_srcs_c += encoder/ih264e_rate_control.c
-libavce_srcs_c += encoder/ih264e_core_coding.c
-libavce_srcs_c += encoder/ih264e_deblk.c
-libavce_srcs_c += encoder/ih264e_api.c
-libavce_srcs_c += encoder/ih264e_process.c
-libavce_srcs_c += encoder/ih264e_encode.c
-libavce_srcs_c += encoder/ih264e_utils.c
-libavce_srcs_c += encoder/ih264e_version.c
-libavce_srcs_c += encoder/ih264e_bitstream.c
-libavce_srcs_c += encoder/ih264e_cavlc.c
-libavce_srcs_c += encoder/ih264e_cabac_init.c
-libavce_srcs_c += encoder/ih264e_cabac.c
-libavce_srcs_c += encoder/ih264e_cabac_encode.c
-libavce_srcs_c += encoder/ih264e_encode_header.c
-libavce_srcs_c += encoder/ih264e_function_selector_generic.c
-libavce_srcs_c += encoder/ih264e_fmt_conv.c
-
-#Rate Control
-libavce_srcs_c += encoder/irc_rate_control_api.c
-libavce_srcs_c += encoder/irc_bit_allocation.c
-libavce_srcs_c += encoder/irc_cbr_buffer_control.c
-libavce_srcs_c += encoder/irc_est_sad.c
-libavce_srcs_c += encoder/irc_fixed_point_error_bits.c
-libavce_srcs_c += encoder/irc_frame_info_collector.c
-libavce_srcs_c += encoder/irc_mb_model_based.c
-libavce_srcs_c += encoder/irc_picture_type.c
-libavce_srcs_c += encoder/irc_rd_model.c
-libavce_srcs_c += encoder/irc_vbr_storage_vbv.c
-libavce_srcs_c += encoder/irc_vbr_str_prms.c
-
-#ME files
-libavce_srcs_c += encoder/ime.c
-libavce_srcs_c += encoder/ime_distortion_metrics.c
-
-
-
-LOCAL_SRC_FILES := $(libavce_srcs_c) $(libavce_srcs_asm)
-
-
-# Load the arch-specific settings
-include $(LOCAL_PATH)/encoder.arm.mk
-include $(LOCAL_PATH)/encoder.arm64.mk
-include $(LOCAL_PATH)/encoder.x86.mk
-include $(LOCAL_PATH)/encoder.x86_64.mk
-include $(LOCAL_PATH)/encoder.mips.mk
-include $(LOCAL_PATH)/encoder.mips64.mk
-
-include $(BUILD_STATIC_LIBRARY)
diff --git a/encoder.x86.mk b/encoder.x86.mk
deleted file mode 100644
index 91f20d9..0000000
--- a/encoder.x86.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-libavce_cflags_x86 += -DX86 -msse4.2
-
-libavce_inc_dir_x86 += $(LOCAL_PATH)/encoder/x86
-libavce_inc_dir_x86 += $(LOCAL_PATH)/common/x86
-
-libavce_srcs_c_x86 += encoder/x86/ih264e_function_selector.c
-libavce_srcs_c_x86 += encoder/x86/ih264e_function_selector_sse42.c
-libavce_srcs_c_x86 += encoder/x86/ih264e_function_selector_ssse3.c
-
-libavce_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_ihadamard_scaling_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_inter_pred_filters_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_mem_fns_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_padding_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_luma_intra_pred_filters_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_chroma_intra_pred_filters_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_deblk_chroma_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_deblk_luma_ssse3.c
-libavce_srcs_c_x86 += common/x86/ih264_iquant_itrans_recon_sse42.c
-libavce_srcs_c_x86 += common/x86/ih264_ihadamard_scaling_sse42.c
-libavce_srcs_c_x86 += common/x86/ih264_resi_trans_quant_sse42.c
-libavce_srcs_c_x86 += common/x86/ih264_weighted_pred_sse42.c
-
-libavce_srcs_c_x86 += encoder/x86/ih264e_half_pel_ssse3.c
-libavce_srcs_c_x86 += encoder/x86/ih264e_intra_modes_eval_ssse3.c
-libavce_srcs_c_x86 += encoder/x86/ime_distortion_metrics_sse42.c
-
-
-
-
-
-
-LOCAL_SRC_FILES_x86 += $(libavce_srcs_c_x86) $(libavce_srcs_asm_x86)
-LOCAL_C_INCLUDES_x86 += $(libavce_inc_dir_x86)
-LOCAL_CFLAGS_x86 += $(libavce_cflags_x86)
-
diff --git a/encoder.x86_64.mk b/encoder.x86_64.mk
deleted file mode 100644
index 3e7b850..0000000
--- a/encoder.x86_64.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-libavce_cflags_x86_64 += -DX86 -msse4.2
-
-libavce_inc_dir_x86_64 += $(LOCAL_PATH)/encoder/x86
-libavce_inc_dir_x86_64 += $(LOCAL_PATH)/common/x86
-
-libavce_srcs_c_x86_64 += encoder/x86/ih264e_function_selector.c
-libavce_srcs_c_x86_64 += encoder/x86/ih264e_function_selector_sse42.c
-libavce_srcs_c_x86_64 += encoder/x86/ih264e_function_selector_ssse3.c
-
-libavce_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_dc_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_ihadamard_scaling_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_inter_pred_filters_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_mem_fns_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_padding_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_luma_intra_pred_filters_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_chroma_intra_pred_filters_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_deblk_chroma_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_deblk_luma_ssse3.c
-libavce_srcs_c_x86_64 += common/x86/ih264_iquant_itrans_recon_sse42.c
-libavce_srcs_c_x86_64 += common/x86/ih264_ihadamard_scaling_sse42.c
-libavce_srcs_c_x86_64 += common/x86/ih264_resi_trans_quant_sse42.c
-libavce_srcs_c_x86_64 += common/x86/ih264_weighted_pred_sse42.c
-
-libavce_srcs_c_x86_64 += encoder/x86/ih264e_half_pel_ssse3.c
-libavce_srcs_c_x86_64 += encoder/x86/ih264e_intra_modes_eval_ssse3.c
-libavce_srcs_c_x86_64 += encoder/x86/ime_distortion_metrics_sse42.c
-
-
-LOCAL_SRC_FILES_x86_64 += $(libavce_srcs_c_x86_64) $(libavce_srcs_asm_x86_64)
-LOCAL_C_INCLUDES_x86_64 += $(libavce_inc_dir_x86_64)
-LOCAL_CFLAGS_x86_64 += $(libavce_cflags_x86_64)
-
-
-
diff --git a/test/Android.bp b/test/Android.bp
new file mode 100644
index 0000000..5fef68b
--- /dev/null
+++ b/test/Android.bp
@@ -0,0 +1,41 @@
+cc_test {
+ name: "avcdec",
+ gtest: false,
+
+ cflags: [
+ "-DPROFILE_ENABLE",
+ "-DARM",
+ "-DMD5_DISABLE",
+ "-fPIC",
+ ],
+ local_include_dirs: [
+ "decoder/",
+ ],
+ srcs: ["decoder/main.c"],
+ static_libs: ["libavcdec"],
+ shared_libs: ["liblog"],
+}
+
+cc_test {
+ name: "avcenc",
+ gtest: false,
+
+ cflags: [
+ "-DPROFILE_ENABLE",
+ "-DARM",
+ "-DMD5_DISABLE",
+ "-fPIC",
+ "-pie",
+ ],
+ local_include_dirs: [
+ "encoder/",
+ ],
+ srcs: [
+ "encoder/main.c",
+ "encoder/psnr.c",
+ "encoder/input.c",
+ "encoder/output.c",
+ "encoder/recon.c",
+ ],
+ static_libs: ["libavcenc"],
+}
diff --git a/test/Android.mk b/test/Android.mk
deleted file mode 100644
index 0085832..0000000
--- a/test/Android.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-include $(CLEAR_VARS)
-
-# encoder
-include $(LOCAL_PATH)/encoder.mk
-
-# decoder
-include $(LOCAL_PATH)/decoder.mk
diff --git a/test/decoder.mk b/test/decoder.mk
deleted file mode 100644
index 0dda948..0000000
--- a/test/decoder.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := avcdec
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DPROFILE_ENABLE -DARM -DMD5_DISABLE -fPIC
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../decoder $(LOCAL_PATH)/../common $(LOCAL_PATH)/decoder/
-LOCAL_SRC_FILES := decoder/main.c
-LOCAL_STATIC_LIBRARIES := libavcdec
-LOCAL_SHARED_LIBRARIES := liblog
-include $(BUILD_EXECUTABLE)
diff --git a/test/encoder.mk b/test/encoder.mk
deleted file mode 100644
index 9a0980e..0000000
--- a/test/encoder.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := avcenc
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_CFLAGS := -DPROFILE_ENABLE -DARM -DMD5_DISABLE -fPIC -pie
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/../encoder $(LOCAL_PATH)/../common $(LOCAL_PATH)/encoder/
-LOCAL_SRC_FILES := encoder/main.c encoder/psnr.c encoder/input.c encoder/output.c encoder/recon.c
-LOCAL_STATIC_LIBRARIES := libavcenc
-
-include $(BUILD_EXECUTABLE)