summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-04-05 06:35:23 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-04-05 06:35:23 +0000
commit5b8aca84dca69bad86c2f01811e91faad130ecae (patch)
treed0679e5031e59f98244ac1fd4b36d5c8bccaf7a6 /firmware
parent69186f6f8528d56499b32f86204d547db834b80c (diff)
downloadrockbox-5b8aca84dca69bad86c2f01811e91faad130ecae.tar.gz
rockbox-5b8aca84dca69bad86c2f01811e91faad130ecae.zip
Fuzev2: don't reinvent the wheel: swap pixels with existing swap_odd_even32
It is equally fast and doesn't need an additional mask Thanks to amiconn for pointing to it git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25477 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
index 06a1b7f4dd..b337a14eac 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
@@ -144,23 +144,9 @@ static void dbop_write_data(const int16_t* p_bytes, int count)
dbop_set_mode(32);
data = (int32_t*)p_bytes;
- const unsigned int mask = 0xff00ff;
while (count > 1)
{
- register unsigned int pixels = *data++;
- register unsigned int tmp;
-
- /* pixels == ABCD */
- asm(
- "and %[tmp], %[pixels], %[mask] \n" /* tmp = 0B0D */
- "and %[pixels], %[pixels], %[mask], lsl #8\n" /* %[pixels] = A0C0 */
- "mov %[pixels], %[pixels], lsr #8 \n" /* %[pixels] = 0A0C */
- "orr %[pixels], %[pixels], %[tmp], lsl #8 \n" /* %[pixels] = BADC */
- : [pixels]"+r"(pixels), [tmp]"=r"(tmp) /* output */
- : [mask]"r"(mask) /* input */
- );
-
- DBOP_DOUT32 = pixels;
+ DBOP_DOUT32 = swap_odd_even32(*data++);
count -= 2;
/* Wait if push fifo is full */