(NEON/Android) Some fixes

This commit is contained in:
twinaphex 2012-12-02 23:50:32 +01:00
parent 2b04e1ece6
commit 1c9dec56a8
4 changed files with 13 additions and 8 deletions

View File

@ -1,6 +1,6 @@
RARCH_VERSION = "0.9.8-beta3"
LOCAL_PATH := $(call my-dir)
PERF_TEST := 0
PERF_TEST := 1
HAVE_OPENSL := 1
include $(CLEAR_VARS)
@ -15,8 +15,9 @@ LOCAL_CFLAGS += -DANDROID_X86 -DHAVE_SSSE3
endif
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
#LOCAL_CFLAGS += -mfpu=neon
LOCAL_CFLAGS += -DANDROID_ARM_V7
LOCAL_CFLAGS += -mfpu=neon
LOCAL_CFLAGS += -DANDROID_ARM_V7 -DHAVE_NEON
LOCAL_SRC_FILES += ../../../audio/sinc_neon.S.neon
endif
ifeq ($(TARGET_ARCH),mips)
@ -27,7 +28,7 @@ LOCAL_MODULE := retroarch-activity
RARCH_PATH := ../../..
LIBXML_PATH := ../../../deps/libxml2
LOCAL_SRC_FILES = $(RARCH_PATH)/console/griffin/griffin.c
LOCAL_SRC_FILES += $(RARCH_PATH)/console/griffin/griffin.c
ifeq ($(PERF_TEST), 1)

View File

@ -26,8 +26,8 @@ process_sinc_neon_asm:
vld1.f32 {q4-q5}, [r2]!
vld1.f32 {q6-q7}, [r2]!
# Coeff
vld1.f32 {q8-q9}, [r3, :1024]!
vld1.f32 {q10-q11}, [r3, :1024]!
vld1.f32 {q8-q9}, [r3, :128]!
vld1.f32 {q10-q11}, [r3, :128]!
# Left
vmul.f32 q0, q0, q8

View File

@ -247,7 +247,11 @@ FIFO BUFFER
/*============================================================
AUDIO HERMITE
============================================================ */
#ifdef HAVE_NEON
#include "../../audio/sinc.c"
#else
#include "../../audio/hermite.c"
#endif
/*============================================================
RSOUND

View File

@ -95,7 +95,7 @@ static bool gen_filter_bilinear(struct scaler_ctx *ctx)
return true;
}
static inline double sinc(double phase)
static inline double filter_sinc(double phase)
{
if (fabs(phase) < 0.0001)
return 1.0;
@ -116,7 +116,7 @@ static void gen_filter_sinc_sub(struct scaler_filter *filter, int len, int pos,
{
double sinc_phase = M_PI * ((double)((sinc_size << 15) + (pos & 0xffff)) / 0x10000 - j);
double lanczos_phase = sinc_phase / ((sinc_size >> 1));
int16_t sinc_val = FILTER_UNITY * sinc(sinc_phase * phase_mul) * sinc(lanczos_phase) * phase_mul;
int16_t sinc_val = FILTER_UNITY * filter_sinc(sinc_phase * phase_mul) * filter_sinc(lanczos_phase) * phase_mul;
//sinc_sum += sinc_val;
filter->filter[i * sinc_size + j] = sinc_val;