diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-02-17 18:14:28 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-02-17 18:14:28 +0000 |
commit | eaa7e22d98f28fd4fc650ae272cf15afcb2456f9 (patch) | |
tree | 9965b1a805b2a53caaf1363bd85435d1d5d22e1c /apps/plugins/jpeg.c | |
parent | e179291190e5b95afa9fbc10a04029bdd222ba86 (diff) | |
download | rockbox-eaa7e22d98f28fd4fc650ae272cf15afcb2456f9.tar.gz rockbox-eaa7e22d98f28fd4fc650ae272cf15afcb2456f9.zip |
Put not-so-large arrays on the stack, so they end up in IRAM on Iriver and iPod. Approximately doubles decoding speed on Iriver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8717 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/jpeg.c')
-rw-r--r-- | apps/plugins/jpeg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 7d29f353fe..e11680f8d6 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -392,7 +392,7 @@ void idct8x8(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line) | |||
392 | int * wsptr; | 392 | int * wsptr; |
393 | unsigned char* outptr; | 393 | unsigned char* outptr; |
394 | int ctr; | 394 | int ctr; |
395 | static int workspace[64]; /* buffers data between passes */ | 395 | int workspace[64]; /* buffers data between passes */ |
396 | 396 | ||
397 | /* Pass 1: process columns from input, store into work array. */ | 397 | /* Pass 1: process columns from input, store into work array. */ |
398 | /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ | 398 | /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ |
@@ -1397,7 +1397,7 @@ int jpeg_decode(struct jpeg* p_jpeg, unsigned char* p_pixel[3], | |||
1397 | int downscale, void (*pf_progress)(int current, int total)) | 1397 | int downscale, void (*pf_progress)(int current, int total)) |
1398 | { | 1398 | { |
1399 | struct bitstream bs; /* bitstream "object" */ | 1399 | struct bitstream bs; /* bitstream "object" */ |
1400 | static int block[64]; /* decoded DCT coefficients */ | 1400 | int block[64]; /* decoded DCT coefficients */ |
1401 | 1401 | ||
1402 | int width, height; | 1402 | int width, height; |
1403 | int skip_line[3]; /* bytes from one line to the next (skip_line) */ | 1403 | int skip_line[3]; /* bytes from one line to the next (skip_line) */ |
@@ -1574,7 +1574,7 @@ int jpeg_decode(struct jpeg* p_jpeg, unsigned char* p_pixel[1], int downscale, | |||
1574 | void (*pf_progress)(int current, int total)) | 1574 | void (*pf_progress)(int current, int total)) |
1575 | { | 1575 | { |
1576 | struct bitstream bs; /* bitstream "object" */ | 1576 | struct bitstream bs; /* bitstream "object" */ |
1577 | static int block[64]; /* decoded DCT coefficients */ | 1577 | int block[64]; /* decoded DCT coefficients */ |
1578 | 1578 | ||
1579 | int width, height; | 1579 | int width, height; |
1580 | int skip_line; /* bytes from one line to the next (skip_line) */ | 1580 | int skip_line; /* bytes from one line to the next (skip_line) */ |