optimize speex fixed point
This commit is contained in:
parent
f0ff248a99
commit
163e3939aa
2 changed files with 29 additions and 14 deletions
37
submodules/externals/build/speex/Android.mk
vendored
37
submodules/externals/build/speex/Android.mk
vendored
|
@ -67,22 +67,31 @@ LOCAL_SRC_FILES := \
|
|||
|
||||
# -DARM4_ASM
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
ARMV7_USE_FLOAT=1
|
||||
endif
|
||||
|
||||
USE_FLOAT=0
|
||||
|
||||
FIXED_POINT_FLAGS=\
|
||||
-DARM5E_ASM\
|
||||
-DDISABLE_FLOAT_API \
|
||||
-DFIXED_POINT=1
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
ifeq ($(ARMV7_USE_FLOAT),1)
|
||||
LOCAL_CFLAGS += -DFLOATING_POINT=1
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE
|
||||
ifeq ($(LINPHONE_VIDEO),1)
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INNER_PRODUCT_SINGLE -Dinner_product_single=ff_scalarproduct_float_neon
|
||||
endif
|
||||
else
|
||||
LOCAL_CFLAGS +=\
|
||||
-DARM5E_ASM\
|
||||
-DDISABLE_FLOAT_API \
|
||||
-DFIXED_POINT=1
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
ifeq ($(USE_FLOAT),1)
|
||||
LOCAL_CFLAGS += -DFLOATING_POINT=1
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE
|
||||
ifeq ($(LINPHONE_VIDEO),1)
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INNER_PRODUCT_SINGLE -Dinner_product_single=ff_scalarproduct_float_neon
|
||||
endif
|
||||
else
|
||||
LOCAL_CFLAGS += $(FIXED_POINT_FLAGS)
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE -Dinterpolate_product_single=interpolate_product_single_int
|
||||
ifeq ($(LINPHONE_VIDEO),1)
|
||||
LOCAL_CFLAGS += -DOVERRIDE_INNER_PRODUCT_SINGLE -Dinner_product_single=ff_scalarproduct_int16_neon
|
||||
endif
|
||||
endif
|
||||
else
|
||||
LOCAL_CFLAGS += $(FIXED_POINT_FLAGS)
|
||||
endif
|
||||
else
|
||||
LOCAL_CFLAGS += \
|
||||
|
|
|
@ -8,6 +8,12 @@ typedef int spx_int32_t;
|
|||
typedef unsigned int spx_uint32_t;
|
||||
|
||||
extern float ff_scalarproduct_float_neon (const float *v1, const float *v2, int len);
|
||||
|
||||
#ifndef FIXED_POINT
|
||||
extern float interpolate_product_single(const float *a, const float *b, unsigned int len, const spx_uint32_t oversample, float *frac);
|
||||
#else
|
||||
extern int interpolate_product_single_int(const spx_int16_t *a, const spx_int16_t *b, unsigned int len, const spx_uint32_t oversample, spx_int16_t *frac);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue