summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2010-02-04 05:49:37 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2010-02-04 05:49:37 +0000
commit8ed7bda64cb98d491431fd130eb754c6320441a0 (patch)
treebe9b6340aaaba3820e87a57c7c3db545c9c2cf15
parent7ed87517f734d7d70ab6f294735a77a65bd22e42 (diff)
Move udiv32_arm.S into libdemac, as this divider is specialized for the APE codec and an optimized divider is already provided for general use in codeclib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24506 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/demac/libdemac/SOURCES1
-rw-r--r--apps/codecs/demac/libdemac/demac_config.h14
-rw-r--r--apps/codecs/demac/libdemac/udiv32_arm.S (renamed from apps/codecs/lib/udiv32_arm.S)0
-rw-r--r--apps/codecs/lib/SOURCES1
-rw-r--r--apps/codecs/lib/codeclib.h9
5 files changed, 11 insertions, 14 deletions
diff --git a/apps/codecs/demac/libdemac/SOURCES b/apps/codecs/demac/libdemac/SOURCES
index 5a4482376c..f9f8f217c7 100644
--- a/apps/codecs/demac/libdemac/SOURCES
+++ b/apps/codecs/demac/libdemac/SOURCES
@@ -2,6 +2,7 @@ crc.c
predictor.c
#ifdef CPU_ARM
predictor-arm.S
+udiv32_arm.S
#elif defined CPU_COLDFIRE
predictor-cf.S
#endif
diff --git a/apps/codecs/demac/libdemac/demac_config.h b/apps/codecs/demac/libdemac/demac_config.h
index 13166f69ae..7388aa1059 100644
--- a/apps/codecs/demac/libdemac/demac_config.h
+++ b/apps/codecs/demac/libdemac/demac_config.h
@@ -91,10 +91,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
/* Defaults */
-#ifndef UDIV32
-#define UDIV32(a, b) (a / b)
-#endif
-
#ifndef FILTER_HISTORY_SIZE
#define FILTER_HISTORY_SIZE 512
#endif
@@ -109,6 +105,16 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
#ifndef __ASSEMBLER__
+
+#if defined(CPU_ARM) && (ARM_ARCH < 5 || defined(USE_IRAM))
+/* optimised unsigned integer division for ARMv4, in IRAM */
+unsigned udiv32_arm(unsigned a, unsigned b);
+#define UDIV32(a, b) udiv32_arm(a, b)
+#else
+/* default */
+#define UDIV32(a, b) (a / b)
+#endif
+
#include <inttypes.h>
#if FILTER_BITS == 32
typedef int32_t filter_int;
diff --git a/apps/codecs/lib/udiv32_arm.S b/apps/codecs/demac/libdemac/udiv32_arm.S
index 4492492d30..4492492d30 100644
--- a/apps/codecs/lib/udiv32_arm.S
+++ b/apps/codecs/demac/libdemac/udiv32_arm.S
diff --git a/apps/codecs/lib/SOURCES b/apps/codecs/lib/SOURCES
index a8c3feb1aa..42bb1138d1 100644
--- a/apps/codecs/lib/SOURCES
+++ b/apps/codecs/lib/SOURCES
@@ -7,7 +7,6 @@ mdct_lookup.c
#ifdef CPU_ARM
mdct_arm.S
setjmp_arm.S
-udiv32_arm.S
../../../firmware/target/arm/support-arm.S
#endif
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index 2d34523de5..6dda3e794c 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -65,15 +65,6 @@ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, con
extern void mdct_backward(int n, int32_t *in, int32_t *out);
-#if defined(CPU_ARM) && (ARM_ARCH < 5 || defined(USE_IRAM))
-/* optimised unsigned integer division for ARMv4, in IRAM */
-unsigned udiv32_arm(unsigned a, unsigned b);
-#define UDIV32(a, b) udiv32_arm(a, b)
-#else
-/* default */
-#define UDIV32(a, b) (a / b)
-#endif
-
#if !defined(CPU_ARM) || ARM_ARCH < 5
/* From libavutil/common.h */
extern const uint8_t bs_log2_tab[256] ICONST_ATTR;