From 2f6f955a178b120f89b3b554b3a12c4a8af82838 Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 14 May 2014 11:33:47 -0700 Subject: [PATCH] Remove intermediate step in vp8_dequantize_b With the intrinsics it is no longer necessary to have a stub/helper function. Change-Id: I3695961c3c94f1bb750d3b7b29716e509ebba482 --- build/make/Android.mk | 5 +++-- vp8/common/arm/dequantize_arm.c | 17 ----------------- vp8/common/arm/neon/dequantizeb_neon.c | 12 +++++------- vp8/common/rtcd_defs.pl | 3 +-- 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/build/make/Android.mk b/build/make/Android.mk index 826ff2f81..816334e04 100644 --- a/build/make/Android.mk +++ b/build/make/Android.mk @@ -38,8 +38,9 @@ # For this we import the 'cpufeatures' module from the NDK sources. # libvpx can also be configured without this runtime detection method. # Configuring with --disable-runtime-cpu-detect will assume presence of NEON. -# Configuring with --disable-runtime-cpu-detect --disable-neon will remove any -# NEON dependency. +# Configuring with --disable-runtime-cpu-detect --disable-neon \ +# --disable-neon-asm +# will remove any NEON dependency. # To change to building armeabi, run ./libvpx/configure again, but with # --target=arm5te-android-gcc and modify the Application.mk file to diff --git a/vp8/common/arm/dequantize_arm.c b/vp8/common/arm/dequantize_arm.c index 3e37e0892..1f8157f0b 100644 --- a/vp8/common/arm/dequantize_arm.c +++ b/vp8/common/arm/dequantize_arm.c @@ -12,26 +12,9 @@ #include "vpx_config.h" #include "vp8/common/blockd.h" -#if HAVE_NEON_ASM -extern void vp8_dequantize_b_loop_neon(short *Q, short *DQC, short *DQ); -#endif - #if HAVE_MEDIA extern void vp8_dequantize_b_loop_v6(short *Q, short *DQC, short *DQ); -#endif -#if HAVE_NEON_ASM - -void vp8_dequantize_b_neon(BLOCKD *d, short *DQC) -{ - short *DQ = d->dqcoeff; - short *Q = d->qcoeff; - - vp8_dequantize_b_loop_neon(Q, DQC, DQ); -} -#endif - -#if HAVE_MEDIA void vp8_dequantize_b_v6(BLOCKD *d, short *DQC) { short *DQ = d->dqcoeff; diff --git a/vp8/common/arm/neon/dequantizeb_neon.c b/vp8/common/arm/neon/dequantizeb_neon.c index 60f69c8db..54e709dd3 100644 --- a/vp8/common/arm/neon/dequantizeb_neon.c +++ b/vp8/common/arm/neon/dequantizeb_neon.c @@ -10,18 +10,16 @@ #include -void vp8_dequantize_b_loop_neon( - int16_t *Q, - int16_t *DQC, - int16_t *DQ) { +#include "vp8/common/blockd.h" + +void vp8_dequantize_b_neon(BLOCKD *d, short *DQC) { int16x8x2_t qQ, qDQC, qDQ; - qQ = vld2q_s16(Q); + qQ = vld2q_s16(d->qcoeff); qDQC = vld2q_s16(DQC); qDQ.val[0] = vmulq_s16(qQ.val[0], qDQC.val[0]); qDQ.val[1] = vmulq_s16(qQ.val[1], qDQC.val[1]); - vst2q_s16(DQ, qDQ); - return; + vst2q_s16(d->dqcoeff, qDQ); } diff --git a/vp8/common/rtcd_defs.pl b/vp8/common/rtcd_defs.pl index 502f49af9..6908a9728 100644 --- a/vp8/common/rtcd_defs.pl +++ b/vp8/common/rtcd_defs.pl @@ -29,9 +29,8 @@ $vp8_clear_system_state_mmx=vpx_reset_mmx_state; # Dequant # add_proto qw/void vp8_dequantize_b/, "struct blockd*, short *dqc"; -specialize qw/vp8_dequantize_b mmx media neon_asm/; +specialize qw/vp8_dequantize_b mmx media neon/; $vp8_dequantize_b_media=vp8_dequantize_b_v6; -$vp8_dequantize_b_neon_asm=vp8_dequantize_b_neon; add_proto qw/void vp8_dequant_idct_add/, "short *input, short *dq, unsigned char *output, int stride"; specialize qw/vp8_dequant_idct_add mmx media neon dspr2/;