summaryrefslogtreecommitdiff
path: root/apps/recorder/resize.h
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-04-08 06:25:06 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-04-08 06:25:06 +0000
commit1541c313a08b1674a8a0603146697bee21429839 (patch)
treebeea89f0215cbf6a969f5e6a715f96500e606cab /apps/recorder/resize.h
parent05875e4ce11a807da508eb9e07c0316bcd17846a (diff)
downloadrockbox-1541c313a08b1674a8a0603146697bee21429839.tar.gz
rockbox-1541c313a08b1674a8a0603146697bee21429839.zip
Improve scaler reciprocal precision by 1 bit, and remove unused SC_NUM, SC_FIX, and SC_SHIFT.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20654 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/resize.h')
-rw-r--r--apps/recorder/resize.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/apps/recorder/resize.h b/apps/recorder/resize.h
index 4ea4eaa9a0..dc93585a08 100644
--- a/apps/recorder/resize.h
+++ b/apps/recorder/resize.h
@@ -44,7 +44,6 @@
44#define HAVE_UPSCALER 1 44#define HAVE_UPSCALER 1
45 45
46#if defined(CPU_COLDFIRE) 46#if defined(CPU_COLDFIRE)
47#define SC_NUM 0x80000000U
48#define SC_MUL_INIT \ 47#define SC_MUL_INIT \
49 unsigned long macsr_st = coldfire_get_macsr(); \ 48 unsigned long macsr_st = coldfire_get_macsr(); \
50 coldfire_set_macsr(EMAC_UNSIGNED); 49 coldfire_set_macsr(EMAC_UNSIGNED);
@@ -101,32 +100,12 @@ static inline unsigned sc_mul32(unsigned a, unsigned b)
101#define SC_MUL_END 100#define SC_MUL_END
102#endif 101#endif
103 102
104#ifndef SC_SHIFT
105#define SC_SHIFT 32
106#endif
107
108#if SC_SHIFT == 24
109#define SC_NUM 0x1000000U
110#define SC_FIX 0
111
112#ifndef SC_MUL
113#define SC_MUL(x, y) ((x) * (y) >> 24)
114#define SC_MUL_INIT
115#define SC_MUL_END
116#endif
117
118#else /* SC_SHIFT == 32 */
119#define SC_NUM 0x80000000U
120#define SC_FIX 1
121
122#ifndef SC_MUL 103#ifndef SC_MUL
123#define SC_MUL(x, y) ((x) * (uint64_t)(y) >> 32) 104#define SC_MUL(x, y) ((x) * (uint64_t)(y) >> 32)
124#define SC_MUL_INIT 105#define SC_MUL_INIT
125#define SC_MUL_END 106#define SC_MUL_END
126#endif 107#endif
127 108
128#endif
129
130struct img_part { 109struct img_part {
131 int len; 110 int len;
132#if !defined(HAVE_LCD_COLOR) 111#if !defined(HAVE_LCD_COLOR)