fix build for generic builds
Change-Id: I7654a801a2b168b7e0bcbebf680efbf2343b1ece
diff --git a/decoder.arm.mk b/decoder.arm.mk
index 80093e4..7e14564 100755
--- a/decoder.arm.mk
+++ b/decoder.arm.mk
@@ -32,13 +32,14 @@
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_srcs_asm_arm += common/arm/ih264_arm_memory_barrier.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/arm/ih264d_function_selector.c b/decoder/arm/ih264d_function_selector.c
index 1aa0c43..925043b 100755
--- a/decoder/arm/ih264d_function_selector.c
+++ b/decoder/arm/ih264d_function_selector.c
@@ -61,24 +61,25 @@
ih264d_init_function_ptr_generic(ps_codec);
switch(e_proc_arch)
{
- case ARCH_ARM_NONEON:
- ih264d_init_function_ptr_generic(ps_codec);
+#if defined(ARMV8)
+ case ARCH_ARMV8_GENERIC:
+ default:
+ ih264d_init_function_ptr_av8(ps_codec);
break;
-#ifndef ARMV8
+#elif !defined(DISABLE_NEON)
case ARCH_ARM_A5:
case ARCH_ARM_A7:
case ARCH_ARM_A9:
case ARCH_ARM_A15:
case ARCH_ARM_A9Q:
default:
- ih264d_init_function_ptr_a9q(ps_codec);
+ ih264d_init_function_ptr_a9q(ps_codec);
break;
-#else /* ARMV8 */
- case ARCH_ARMV8_GENERIC:
+#else
default:
- ih264d_init_function_ptr_av8(ps_codec);
+#endif
+ case ARCH_ARM_NONEON:
break;
-#endif /* ARMV8 */
}
}
diff --git a/encoder.arm.mk b/encoder.arm.mk
index 81ed22f..b41c5ea 100755
--- a/encoder.arm.mk
+++ b/encoder.arm.mk
@@ -25,7 +25,6 @@
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 += common/arm/ih264_arm_memory_barrier.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
@@ -42,6 +41,8 @@
libavce_cflags_arm += -DDISABLE_NEON -DDEFAULT_ARCH=D_ARCH_ARM_NONEON
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/arm/ih264e_function_selector.c b/encoder/arm/ih264e_function_selector.c
index bb181c1..e4f67a0 100755
--- a/encoder/arm/ih264e_function_selector.c
+++ b/encoder/arm/ih264e_function_selector.c
@@ -96,23 +96,34 @@
*
*******************************************************************************
*/
-#ifdef ARMV8
void ih264e_init_function_ptr(void *pv_codec)
{
codec_t *ps_codec = (codec_t *)pv_codec;
ih264e_init_function_ptr_generic(ps_codec);
switch(ps_codec->s_cfg.e_arch)
{
- case ARCH_ARM_NONEON:
- break;
+#if defined(ARMV8)
case ARCH_ARM_A53:
case ARCH_ARM_A57:
case ARCH_ARM_V8_NEON:
- ih264e_init_function_ptr_neon_av8(ps_codec);
- break;
default:
ih264e_init_function_ptr_neon_av8(ps_codec);
break;
+#elif !defined(DISABLE_NEON)
+ case ARCH_ARM_A9Q:
+ case ARCH_ARM_A9A:
+ case ARCH_ARM_A9:
+ case ARCH_ARM_A7:
+ case ARCH_ARM_A5:
+ case ARCH_ARM_A15:
+ default:
+ ih264e_init_function_ptr_neon_a9q(ps_codec);
+ break;
+#else
+ default:
+#endif
+ case ARCH_ARM_NONEON:
+ break;
}
}
@@ -135,36 +146,11 @@
*/
IV_ARCH_T ih264e_default_arch(void)
{
+#if defined(ARMV8)
return ARCH_ARM_V8_NEON;
-}
-
-#else
-
-void ih264e_init_function_ptr(void *pv_codec)
-{
- codec_t *ps_codec = (codec_t *)pv_codec;
- ih264e_init_function_ptr_generic(ps_codec);
- switch(ps_codec->s_cfg.e_arch)
- {
- case ARCH_ARM_NONEON:
- break;
- case ARCH_ARM_A9Q:
- case ARCH_ARM_A9A:
- case ARCH_ARM_A9:
- case ARCH_ARM_A7:
- case ARCH_ARM_A5:
- case ARCH_ARM_A15:
- ih264e_init_function_ptr_neon_a9q(ps_codec);
- break;
- default:
- ih264e_init_function_ptr_neon_a9q(ps_codec);
- break;
- }
-}
-
-IV_ARCH_T ih264e_default_arch(void)
-{
+#elif !defined(DISABLE_NEON)
return ARCH_ARM_A9Q;
-}
-
+#else
+ return ARCH_ARM_NONEON;
#endif
+}