diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-01 08:16:44 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-01 08:16:44 +0000 |
| commit | 1d21ca902303b559999418ea260103ec37b026de (patch) | |
| tree | e2a8dfe7014cddd0bce44f8ebf0e1492ab20e6ea | |
| parent | 364783a3d51ab7c4b2a1e806878348035b672584 (diff) | |
| download | rockbox-1d21ca902303b559999418ea260103ec37b026de.zip rockbox-1d21ca902303b559999418ea260103ec37b026de.tar.gz rockbox-1d21ca902303b559999418ea260103ec37b026de.tar.bz2 rockbox-1d21ca902303b559999418ea260103ec37b026de.tar.xz | |
Moved bitswap() to internal RAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1502 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/mpeg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index e61f794..9470986 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -468,6 +468,7 @@ static void dma_tick(void) } } +static void bitswap(unsigned short *data, int length) __attribute__ ((section (".icode"))); static void bitswap(unsigned short *data, int length) { int i = length; @@ -636,6 +637,7 @@ static void mpeg_thread(void) int unplayed_space_left; int amount_to_read; int amount_to_swap; + int t1, t2; play_pending = false; playing = false; @@ -782,8 +784,11 @@ static void mpeg_thread(void) amount_to_swap); DEBUGF("B %x\n", amount_to_swap); + t1 = current_tick; bitswap((unsigned short *)(mp3buf + mp3buf_swapwrite), (amount_to_swap+1)/2); + t2 = current_tick; + DEBUGF("time: %d\n", t2 - t1); mp3buf_swapwrite += amount_to_swap; if(mp3buf_swapwrite >= mp3buflen) @@ -858,9 +863,12 @@ static void mpeg_thread(void) if(mpeg_file >= 0) { DEBUGF("R\n"); + t1 = current_tick; len = read(mpeg_file, mp3buf+mp3buf_write, amount_to_read); if(len > 0) { + t2 = current_tick; + DEBUGF("time: %d\n", t2 - t1); DEBUGF("R: %x\n", len); /* Tell ourselves that we need to swap some data */ queue_post(&mpeg_queue, MPEG_SWAP_DATA, 0); |