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
|
# -DARM4_ASM
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
|
||||||
ARMV7_USE_FLOAT=1
|
USE_FLOAT=0
|
||||||
endif
|
|
||||||
|
FIXED_POINT_FLAGS=\
|
||||||
|
-DARM5E_ASM\
|
||||||
|
-DDISABLE_FLOAT_API \
|
||||||
|
-DFIXED_POINT=1
|
||||||
|
|
||||||
ifeq ($(TARGET_ARCH),arm)
|
ifeq ($(TARGET_ARCH),arm)
|
||||||
ifeq ($(ARMV7_USE_FLOAT),1)
|
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||||
LOCAL_CFLAGS += -DFLOATING_POINT=1
|
ifeq ($(USE_FLOAT),1)
|
||||||
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE
|
LOCAL_CFLAGS += -DFLOATING_POINT=1
|
||||||
ifeq ($(LINPHONE_VIDEO),1)
|
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE
|
||||||
LOCAL_CFLAGS += -DOVERRIDE_INNER_PRODUCT_SINGLE -Dinner_product_single=ff_scalarproduct_float_neon
|
ifeq ($(LINPHONE_VIDEO),1)
|
||||||
endif
|
LOCAL_CFLAGS += -DOVERRIDE_INNER_PRODUCT_SINGLE -Dinner_product_single=ff_scalarproduct_float_neon
|
||||||
else
|
endif
|
||||||
LOCAL_CFLAGS +=\
|
else
|
||||||
-DARM5E_ASM\
|
LOCAL_CFLAGS += $(FIXED_POINT_FLAGS)
|
||||||
-DDISABLE_FLOAT_API \
|
LOCAL_CFLAGS += -DOVERRIDE_INTERPOLATE_PRODUCT_SINGLE -Dinterpolate_product_single=interpolate_product_single_int
|
||||||
-DFIXED_POINT=1
|
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
|
endif
|
||||||
else
|
else
|
||||||
LOCAL_CFLAGS += \
|
LOCAL_CFLAGS += \
|
||||||
|
|
|
@ -8,6 +8,12 @@ typedef int spx_int32_t;
|
||||||
typedef unsigned int spx_uint32_t;
|
typedef unsigned int spx_uint32_t;
|
||||||
|
|
||||||
extern float ff_scalarproduct_float_neon (const float *v1, const float *v2, int len);
|
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);
|
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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue