summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-12-28 11:32:13 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-12-28 11:32:13 +0000
commitd2cdd80f5cceb38f9add911f289d566f85a4c186 (patch)
treeb125f4b3eb73562668a3299714f20490237d8b4b /apps/plugins/imageviewer
parent7949dd4daebe7f058839ecc22f653ee38064d97f (diff)
downloadrockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.zip
rockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.tar.gz
rockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.tar.bz2
rockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.tar.xz
plugins: another round of making local things static and adding missing #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31453 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/imageviewer')
-rw-r--r--apps/plugins/imageviewer/jpeg/jpeg_decoder.c13
-rw-r--r--apps/plugins/imageviewer/png/png_decoder.c2
2 files changed, 8 insertions, 7 deletions
diff --git a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
index c90bff8..3c43c5d 100644
--- a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
+++ b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
@@ -144,7 +144,7 @@ INLINE unsigned range_limit(int value)
* Perform dequantization and inverse DCT on one block of coefficients,
* producing a reduced-size 1x1 output block.
*/
-void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
+static void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
{
(void)skip_line; /* unused */
*p_byte = range_limit(inptr[0] * quantptr[0] >> 3);
@@ -156,7 +156,7 @@ void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
* Perform dequantization and inverse DCT on one block of coefficients,
* producing a reduced-size 2x2 output block.
*/
-void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
+static void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
{
int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
unsigned char* outptr;
@@ -198,7 +198,7 @@ void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
* Perform dequantization and inverse DCT on one block of coefficients,
* producing a reduced-size 4x4 output block.
*/
-void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
+static void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
{
int tmp0, tmp2, tmp10, tmp12;
int z1, z2, z3;
@@ -282,7 +282,7 @@ void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
/*
* Perform dequantization and inverse DCT on one block of coefficients.
*/
-void idct8x8(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
+static void idct8x8(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
{
long tmp0, tmp1, tmp2, tmp3;
long tmp10, tmp11, tmp12, tmp13;
@@ -794,7 +794,7 @@ void default_huff_tbl(struct jpeg* p_jpeg)
}
/* Compute the derived values for a Huffman table */
-void fix_huff_tbl(int* htbl, struct derived_tbl* dtbl)
+static void fix_huff_tbl(int* htbl, struct derived_tbl* dtbl)
{
int p, i, l, si;
int lookbits, ctr;
@@ -1081,7 +1081,7 @@ INLINE void drop_bits(struct bitstream* pb, int nbits)
}
/* re-synchronize to entropy data (skip restart marker) */
-void search_restart(struct bitstream* pb)
+static void search_restart(struct bitstream* pb)
{
pb->next_input_byte--; /* we may have overread it, taking 2 bytes */
/* search for a non-byte-padding marker, has to be RSTm or EOS */
@@ -1245,6 +1245,7 @@ int jpeg_decode(struct jpeg* p_jpeg, unsigned char* p_pixel[3],
else return -1; /* not supported */
/* init bitstream, fake a restart to make it start */
+ bs.get_buffer = 0;
bs.next_input_byte = p_jpeg->p_entropy_data;
bs.bits_left = 0;
bs.input_end = p_jpeg->p_entropy_end;
diff --git a/apps/plugins/imageviewer/png/png_decoder.c b/apps/plugins/imageviewer/png/png_decoder.c
index bae1fe3..5c7b43f 100644
--- a/apps/plugins/imageviewer/png/png_decoder.c
+++ b/apps/plugins/imageviewer/png/png_decoder.c
@@ -383,7 +383,7 @@ static void LodePNG_InfoPng_init(LodePNG_InfoPng* info)
#endif
}
-void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info)
+static void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info)
{
LodePNG_InfoColor_cleanup(&info->color);
}