| 1 |
diff -ur ClanLib-0.6.5.orig/Sources/SmallJPEG/jpgd/jpegdecoder.cpp ClanLib-0.6.5/Sources/SmallJPEG/jpgd/jpegdecoder.cpp
|
| 2 |
--- ClanLib-0.6.5.orig/Sources/SmallJPEG/jpgd/jpegdecoder.cpp 2001-04-25 18:14:41.000000000 +0200
|
| 3 |
+++ ClanLib-0.6.5/Sources/SmallJPEG/jpgd/jpegdecoder.cpp 2006-07-20 12:25:34.000000000 +0200
|
| 4 |
@@ -102,7 +102,7 @@
|
| 5 |
blocks[i] = q;
|
| 6 |
|
| 7 |
// Round to qword boundry, to avoid misaligned accesses with MMX code
|
| 8 |
- return ((void *)(((uint)q + 7) & ~7));
|
| 9 |
+ return ((void *)(((unsigned long)q + 7) & ~7));
|
| 10 |
}
|
| 11 |
//------------------------------------------------------------------------------
|
| 12 |
// Clear buffer to word values.
|
| 13 |
@@ -1870,7 +1870,7 @@
|
| 14 |
q = (uchar *)alloc(max_blocks_per_row * 64 * sizeof(BLOCK_TYPE) + 8);
|
| 15 |
|
| 16 |
// Align to 8-byte boundry, for MMX code
|
| 17 |
- q = (uchar *)(((uint)q + 7) & ~7);
|
| 18 |
+ q = (uchar *)(((unsigned long)q + 7) & ~7);
|
| 19 |
|
| 20 |
// The block_seg[] array's name dates back to the
|
| 21 |
// 16-bit assembler implementation. "seg" stood for "segment".
|
| 22 |
@@ -1880,7 +1880,7 @@
|
| 23 |
for (i = 0; i < max_blocks_per_row; i++)
|
| 24 |
block_max_zag_set[i] = 64;
|
| 25 |
|
| 26 |
- Psample_buf = (uchar *)(((uint)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
|
| 27 |
+ Psample_buf = (uchar *)(((unsigned long)alloc(max_blocks_per_row * 64 + 8) + 7) & ~7);
|
| 28 |
|
| 29 |
total_lines_left = image_y_size;
|
| 30 |
|
| 31 |
diff -ur ClanLib-0.6.5.orig/Sources/SmallJPEG/jpgd/jpegdecoder.h ClanLib-0.6.5/Sources/SmallJPEG/jpgd/jpegdecoder.h
|
| 32 |
--- ClanLib-0.6.5.orig/Sources/SmallJPEG/jpgd/jpegdecoder.h 2001-05-07 10:36:59.000000000 +0200
|
| 33 |
+++ ClanLib-0.6.5/Sources/SmallJPEG/jpgd/jpegdecoder.h 2006-07-20 12:24:08.000000000 +0200
|
| 34 |
@@ -493,26 +493,26 @@
|
| 35 |
|
| 36 |
void find_eoi(void);
|
| 37 |
//------------------
|
| 38 |
- /*inline*/ uint jpeg_decoder::rol(uint i, uchar j);
|
| 39 |
- /*inline*/ uint jpeg_decoder::get_char(void);
|
| 40 |
- /*inline*/ uint jpeg_decoder::get_char(bool *Ppadding_flag);
|
| 41 |
- /*inline*/ void jpeg_decoder::stuff_char(uchar q);
|
| 42 |
- /*inline*/ uchar jpeg_decoder::get_octet(void);
|
| 43 |
- /*inline*/ uint jpeg_decoder::get_bits_1(int num_bits);
|
| 44 |
- /*inline*/ uint jpeg_decoder::get_bits_2(int numbits);
|
| 45 |
- /*inline*/ int jpeg_decoder::huff_decode(Phuff_tables_t Ph);
|
| 46 |
+ /*inline*/ uint rol(uint i, uchar j);
|
| 47 |
+ /*inline*/ uint get_char(void);
|
| 48 |
+ /*inline*/ uint get_char(bool *Ppadding_flag);
|
| 49 |
+ /*inline*/ void stuff_char(uchar q);
|
| 50 |
+ /*inline*/ uchar get_octet(void);
|
| 51 |
+ /*inline*/ uint get_bits_1(int num_bits);
|
| 52 |
+ /*inline*/ uint get_bits_2(int numbits);
|
| 53 |
+ /*inline*/ int huff_decode(Phuff_tables_t Ph);
|
| 54 |
#ifdef SUPPORT_X86ASM
|
| 55 |
- /*inline*/ uint jpeg_decoder::huff_extend(uint i, int c);
|
| 56 |
+ /*inline*/ uint huff_extend(uint i, int c);
|
| 57 |
#endif
|
| 58 |
- /*inline*/ uchar jpeg_decoder::clamp(int i);
|
| 59 |
+ /*inline*/ uchar clamp(int i);
|
| 60 |
|
| 61 |
#ifdef SUPPORT_MMX
|
| 62 |
- /*inline*/ uint jpeg_decoder::get_high_byte_mmx(void);
|
| 63 |
- /*inline*/ uint jpeg_decoder::get_high_word_mmx(void);
|
| 64 |
- /*inline*/ void jpeg_decoder::get_bits_2_mmx_init(void);
|
| 65 |
- /*inline*/ void jpeg_decoder::get_bits_2_mmx_deinit(void);
|
| 66 |
- /*inline*/ uint jpeg_decoder::get_bits_2_mmx(int numbits);
|
| 67 |
- /*inline*/ int jpeg_decoder::huff_decode_mmx(Phuff_tables_t Ph);
|
| 68 |
+ /*inline*/ uint get_high_byte_mmx(void);
|
| 69 |
+ /*inline*/ uint get_high_word_mmx(void);
|
| 70 |
+ /*inline*/ void get_bits_2_mmx_init(void);
|
| 71 |
+ /*inline*/ void get_bits_2_mmx_deinit(void);
|
| 72 |
+ /*inline*/ uint get_bits_2_mmx(int numbits);
|
| 73 |
+ /*inline*/ int huff_decode_mmx(Phuff_tables_t Ph);
|
| 74 |
#endif
|
| 75 |
//------------------
|
| 76 |
int image_x_size;
|