diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/eet/src/lib/eet_image.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to 'libraries/eet/src/lib/eet_image.c')
-rw-r--r-- | libraries/eet/src/lib/eet_image.c | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/libraries/eet/src/lib/eet_image.c b/libraries/eet/src/lib/eet_image.c index 79f6f90..8c6c03c 100644 --- a/libraries/eet/src/lib/eet_image.c +++ b/libraries/eet/src/lib/eet_image.c | |||
@@ -66,7 +66,7 @@ _eet_jpeg_membuf_src_init(j_decompress_ptr cinfo) | |||
66 | { | 66 | { |
67 | /* FIXME: Use attribute unused */ | 67 | /* FIXME: Use attribute unused */ |
68 | (void)cinfo; | 68 | (void)cinfo; |
69 | } /* _eet_jpeg_membuf_src_init */ | 69 | } |
70 | 70 | ||
71 | static boolean | 71 | static boolean |
72 | _eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo) | 72 | _eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo) |
@@ -78,7 +78,7 @@ _eet_jpeg_membuf_src_fill(j_decompress_ptr cinfo) | |||
78 | src->pub.next_input_byte = jpeg_eoi; | 78 | src->pub.next_input_byte = jpeg_eoi; |
79 | 79 | ||
80 | return TRUE; | 80 | return TRUE; |
81 | } /* _eet_jpeg_membuf_src_fill */ | 81 | } |
82 | 82 | ||
83 | static void | 83 | static void |
84 | _eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo, | 84 | _eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo, |
@@ -88,7 +88,7 @@ _eet_jpeg_membuf_src_skip(j_decompress_ptr cinfo, | |||
88 | 88 | ||
89 | src->pub.bytes_in_buffer -= num_bytes; | 89 | src->pub.bytes_in_buffer -= num_bytes; |
90 | src->pub.next_input_byte += num_bytes; | 90 | src->pub.next_input_byte += num_bytes; |
91 | } /* _eet_jpeg_membuf_src_skip */ | 91 | } |
92 | 92 | ||
93 | static void | 93 | static void |
94 | _eet_jpeg_membuf_src_term(j_decompress_ptr cinfo) | 94 | _eet_jpeg_membuf_src_term(j_decompress_ptr cinfo) |
@@ -97,7 +97,7 @@ _eet_jpeg_membuf_src_term(j_decompress_ptr cinfo) | |||
97 | 97 | ||
98 | free(src); | 98 | free(src); |
99 | cinfo->src = NULL; | 99 | cinfo->src = NULL; |
100 | } /* _eet_jpeg_membuf_src_term */ | 100 | } |
101 | 101 | ||
102 | static int | 102 | static int |
103 | eet_jpeg_membuf_src(j_decompress_ptr cinfo, | 103 | eet_jpeg_membuf_src(j_decompress_ptr cinfo, |
@@ -124,7 +124,7 @@ eet_jpeg_membuf_src(j_decompress_ptr cinfo, | |||
124 | src->pub.next_input_byte = src->buf; | 124 | src->pub.next_input_byte = src->buf; |
125 | 125 | ||
126 | return 0; | 126 | return 0; |
127 | } /* eet_jpeg_membuf_src */ | 127 | } |
128 | 128 | ||
129 | struct jpeg_membuf_dst | 129 | struct jpeg_membuf_dst |
130 | { | 130 | { |
@@ -144,7 +144,7 @@ _eet_jpeg_membuf_dst_init(j_compress_ptr cinfo) | |||
144 | { | 144 | { |
145 | /* FIXME: Use eina attribute */ | 145 | /* FIXME: Use eina attribute */ |
146 | (void)cinfo; | 146 | (void)cinfo; |
147 | } /* _eet_jpeg_membuf_dst_init */ | 147 | } |
148 | 148 | ||
149 | static boolean | 149 | static boolean |
150 | _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) | 150 | _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) |
@@ -168,7 +168,7 @@ _eet_jpeg_membuf_dst_flush(j_compress_ptr cinfo) | |||
168 | dst->len *= 2; | 168 | dst->len *= 2; |
169 | 169 | ||
170 | return FALSE; | 170 | return FALSE; |
171 | } /* _eet_jpeg_membuf_dst_flush */ | 171 | } |
172 | 172 | ||
173 | static void | 173 | static void |
174 | _eet_jpeg_membuf_dst_term(j_compress_ptr cinfo) | 174 | _eet_jpeg_membuf_dst_term(j_compress_ptr cinfo) |
@@ -189,7 +189,7 @@ _eet_jpeg_membuf_dst_term(j_compress_ptr cinfo) | |||
189 | 189 | ||
190 | free(dst); | 190 | free(dst); |
191 | cinfo->dest = NULL; | 191 | cinfo->dest = NULL; |
192 | } /* _eet_jpeg_membuf_dst_term */ | 192 | } |
193 | 193 | ||
194 | static int | 194 | static int |
195 | eet_jpeg_membuf_dst(j_compress_ptr cinfo, | 195 | eet_jpeg_membuf_dst(j_compress_ptr cinfo, |
@@ -223,7 +223,7 @@ eet_jpeg_membuf_dst(j_compress_ptr cinfo, | |||
223 | dst->failed = 0; | 223 | dst->failed = 0; |
224 | 224 | ||
225 | return 0; | 225 | return 0; |
226 | } /* eet_jpeg_membuf_dst */ | 226 | } |
227 | 227 | ||
228 | /*---*/ | 228 | /*---*/ |
229 | 229 | ||
@@ -336,7 +336,7 @@ _JPEGFatalErrorHandler(j_common_ptr cinfo) | |||
336 | /* cinfo->err->output_message(cinfo);*/ | 336 | /* cinfo->err->output_message(cinfo);*/ |
337 | longjmp(errmgr->setjmp_buffer, 1); | 337 | longjmp(errmgr->setjmp_buffer, 1); |
338 | return; | 338 | return; |
339 | } /* _JPEGFatalErrorHandler */ | 339 | } |
340 | 340 | ||
341 | static void | 341 | static void |
342 | _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) | 342 | _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) |
@@ -347,7 +347,7 @@ _JPEGErrorHandler(j_common_ptr cinfo __UNUSED__) | |||
347 | /* cinfo->err->output_message(cinfo);*/ | 347 | /* cinfo->err->output_message(cinfo);*/ |
348 | /* longjmp(errmgr->setjmp_buffer, 1);*/ | 348 | /* longjmp(errmgr->setjmp_buffer, 1);*/ |
349 | return; | 349 | return; |
350 | } /* _JPEGErrorHandler */ | 350 | } |
351 | 351 | ||
352 | static void | 352 | static void |
353 | _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, | 353 | _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, |
@@ -359,7 +359,7 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, | |||
359 | /* cinfo->err->output_message(cinfo);*/ | 359 | /* cinfo->err->output_message(cinfo);*/ |
360 | /* longjmp(errmgr->setjmp_buffer, 1);*/ | 360 | /* longjmp(errmgr->setjmp_buffer, 1);*/ |
361 | return; | 361 | return; |
362 | } /* _JPEGErrorHandler2 */ | 362 | } |
363 | 363 | ||
364 | static int | 364 | static int |
365 | eet_data_image_jpeg_header_decode(const void *data, | 365 | eet_data_image_jpeg_header_decode(const void *data, |
@@ -405,7 +405,7 @@ eet_data_image_jpeg_header_decode(const void *data, | |||
405 | return 0; | 405 | return 0; |
406 | 406 | ||
407 | return 1; | 407 | return 1; |
408 | } /* eet_data_image_jpeg_header_decode */ | 408 | } |
409 | 409 | ||
410 | static int | 410 | static int |
411 | eet_data_image_jpeg_rgb_decode(const void *data, | 411 | eet_data_image_jpeg_rgb_decode(const void *data, |
@@ -558,7 +558,7 @@ eet_data_image_jpeg_rgb_decode(const void *data, | |||
558 | jpeg_finish_decompress(&cinfo); | 558 | jpeg_finish_decompress(&cinfo); |
559 | jpeg_destroy_decompress(&cinfo); | 559 | jpeg_destroy_decompress(&cinfo); |
560 | return 1; | 560 | return 1; |
561 | } /* eet_data_image_jpeg_rgb_decode */ | 561 | } |
562 | 562 | ||
563 | static void * | 563 | static void * |
564 | eet_data_image_jpeg_alpha_decode(const void *data, | 564 | eet_data_image_jpeg_alpha_decode(const void *data, |
@@ -667,7 +667,7 @@ eet_data_image_jpeg_alpha_decode(const void *data, | |||
667 | jpeg_finish_decompress(&cinfo); | 667 | jpeg_finish_decompress(&cinfo); |
668 | jpeg_destroy_decompress(&cinfo); | 668 | jpeg_destroy_decompress(&cinfo); |
669 | return d; | 669 | return d; |
670 | } /* eet_data_image_jpeg_alpha_decode */ | 670 | } |
671 | 671 | ||
672 | static void * | 672 | static void * |
673 | eet_data_image_lossless_convert(int *size, | 673 | eet_data_image_lossless_convert(int *size, |
@@ -715,7 +715,7 @@ eet_data_image_lossless_convert(int *size, | |||
715 | *size = ((w * h * 4) + (8 * 4)); | 715 | *size = ((w * h * 4) + (8 * 4)); |
716 | return d; | 716 | return d; |
717 | } | 717 | } |
718 | } /* eet_data_image_lossless_convert */ | 718 | } |
719 | 719 | ||
720 | static void * | 720 | static void * |
721 | eet_data_image_lossless_compressed_convert(int *size, | 721 | eet_data_image_lossless_compressed_convert(int *size, |
@@ -789,7 +789,7 @@ eet_data_image_lossless_compressed_convert(int *size, | |||
789 | free(comp); | 789 | free(comp); |
790 | return d; | 790 | return d; |
791 | } | 791 | } |
792 | } /* eet_data_image_lossless_compressed_convert */ | 792 | } |
793 | 793 | ||
794 | static void * | 794 | static void * |
795 | eet_data_image_jpeg_convert(int *size, | 795 | eet_data_image_jpeg_convert(int *size, |
@@ -872,7 +872,7 @@ eet_data_image_jpeg_convert(int *size, | |||
872 | 872 | ||
873 | *size = sz; | 873 | *size = sz; |
874 | return d; | 874 | return d; |
875 | } /* eet_data_image_jpeg_convert */ | 875 | } |
876 | 876 | ||
877 | static void * | 877 | static void * |
878 | eet_data_image_jpeg_alpha_convert(int *size, | 878 | eet_data_image_jpeg_alpha_convert(int *size, |
@@ -1063,7 +1063,7 @@ eet_data_image_jpeg_alpha_convert(int *size, | |||
1063 | free(d2); | 1063 | free(d2); |
1064 | *size = 12 + sz1 + sz2; | 1064 | *size = 12 + sz1 + sz2; |
1065 | return d; | 1065 | return d; |
1066 | } /* eet_data_image_jpeg_alpha_convert */ | 1066 | } |
1067 | 1067 | ||
1068 | EAPI int | 1068 | EAPI int |
1069 | eet_data_image_write_cipher(Eet_File *ef, | 1069 | eet_data_image_write_cipher(Eet_File *ef, |
@@ -1091,7 +1091,7 @@ eet_data_image_write_cipher(Eet_File *ef, | |||
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | return 0; | 1093 | return 0; |
1094 | } /* eet_data_image_write_cipher */ | 1094 | } |
1095 | 1095 | ||
1096 | EAPI int | 1096 | EAPI int |
1097 | eet_data_image_write(Eet_File *ef, | 1097 | eet_data_image_write(Eet_File *ef, |
@@ -1114,7 +1114,7 @@ eet_data_image_write(Eet_File *ef, | |||
1114 | comp, | 1114 | comp, |
1115 | quality, | 1115 | quality, |
1116 | lossy); | 1116 | lossy); |
1117 | } /* eet_data_image_write */ | 1117 | } |
1118 | 1118 | ||
1119 | EAPI void * | 1119 | EAPI void * |
1120 | eet_data_image_read_cipher(Eet_File *ef, | 1120 | eet_data_image_read_cipher(Eet_File *ef, |
@@ -1149,7 +1149,7 @@ eet_data_image_read_cipher(Eet_File *ef, | |||
1149 | free(data); | 1149 | free(data); |
1150 | 1150 | ||
1151 | return d; | 1151 | return d; |
1152 | } /* eet_data_image_read_cipher */ | 1152 | } |
1153 | 1153 | ||
1154 | EAPI void * | 1154 | EAPI void * |
1155 | eet_data_image_read(Eet_File *ef, | 1155 | eet_data_image_read(Eet_File *ef, |
@@ -1163,7 +1163,7 @@ eet_data_image_read(Eet_File *ef, | |||
1163 | { | 1163 | { |
1164 | return eet_data_image_read_cipher(ef, name, NULL, w, h, alpha, | 1164 | return eet_data_image_read_cipher(ef, name, NULL, w, h, alpha, |
1165 | comp, quality, lossy); | 1165 | comp, quality, lossy); |
1166 | } /* eet_data_image_read */ | 1166 | } |
1167 | 1167 | ||
1168 | EAPI int | 1168 | EAPI int |
1169 | eet_data_image_read_to_surface_cipher(Eet_File *ef, | 1169 | eet_data_image_read_to_surface_cipher(Eet_File *ef, |
@@ -1204,7 +1204,7 @@ eet_data_image_read_to_surface_cipher(Eet_File *ef, | |||
1204 | free(data); | 1204 | free(data); |
1205 | 1205 | ||
1206 | return res; | 1206 | return res; |
1207 | } /* eet_data_image_read_to_surface_cipher */ | 1207 | } |
1208 | 1208 | ||
1209 | EAPI int | 1209 | EAPI int |
1210 | eet_data_image_read_to_surface(Eet_File *ef, | 1210 | eet_data_image_read_to_surface(Eet_File *ef, |
@@ -1225,7 +1225,7 @@ eet_data_image_read_to_surface(Eet_File *ef, | |||
1225 | w, h, row_stride, | 1225 | w, h, row_stride, |
1226 | alpha, comp, quality, | 1226 | alpha, comp, quality, |
1227 | lossy); | 1227 | lossy); |
1228 | } /* eet_data_image_read_to_surface */ | 1228 | } |
1229 | 1229 | ||
1230 | EAPI int | 1230 | EAPI int |
1231 | eet_data_image_header_read_cipher(Eet_File *ef, | 1231 | eet_data_image_header_read_cipher(Eet_File *ef, |
@@ -1260,7 +1260,7 @@ eet_data_image_header_read_cipher(Eet_File *ef, | |||
1260 | free(data); | 1260 | free(data); |
1261 | 1261 | ||
1262 | return d; | 1262 | return d; |
1263 | } /* eet_data_image_header_read_cipher */ | 1263 | } |
1264 | 1264 | ||
1265 | EAPI int | 1265 | EAPI int |
1266 | eet_data_image_header_read(Eet_File *ef, | 1266 | eet_data_image_header_read(Eet_File *ef, |
@@ -1275,7 +1275,7 @@ eet_data_image_header_read(Eet_File *ef, | |||
1275 | return eet_data_image_header_read_cipher(ef, name, NULL, | 1275 | return eet_data_image_header_read_cipher(ef, name, NULL, |
1276 | w, h, alpha, | 1276 | w, h, alpha, |
1277 | comp, quality, lossy); | 1277 | comp, quality, lossy); |
1278 | } /* eet_data_image_header_read */ | 1278 | } |
1279 | 1279 | ||
1280 | EAPI void * | 1280 | EAPI void * |
1281 | eet_data_image_encode_cipher(const void *data, | 1281 | eet_data_image_encode_cipher(const void *data, |
@@ -1333,7 +1333,7 @@ eet_data_image_encode_cipher(const void *data, | |||
1333 | *size_ret = size; | 1333 | *size_ret = size; |
1334 | 1334 | ||
1335 | return d; | 1335 | return d; |
1336 | } /* eet_data_image_encode_cipher */ | 1336 | } |
1337 | 1337 | ||
1338 | EAPI void * | 1338 | EAPI void * |
1339 | eet_data_image_encode(const void *data, | 1339 | eet_data_image_encode(const void *data, |
@@ -1347,7 +1347,7 @@ eet_data_image_encode(const void *data, | |||
1347 | { | 1347 | { |
1348 | return eet_data_image_encode_cipher(data, NULL, w, h, alpha, | 1348 | return eet_data_image_encode_cipher(data, NULL, w, h, alpha, |
1349 | comp, quality, lossy, size_ret); | 1349 | comp, quality, lossy, size_ret); |
1350 | } /* eet_data_image_encode */ | 1350 | } |
1351 | 1351 | ||
1352 | EAPI int | 1352 | EAPI int |
1353 | eet_data_image_header_decode_cipher(const void *data, | 1353 | eet_data_image_header_decode_cipher(const void *data, |
@@ -1499,7 +1499,7 @@ eet_data_image_header_decode_cipher(const void *data, | |||
1499 | } | 1499 | } |
1500 | 1500 | ||
1501 | return 0; | 1501 | return 0; |
1502 | } /* eet_data_image_header_decode_cipher */ | 1502 | } |
1503 | 1503 | ||
1504 | EAPI int | 1504 | EAPI int |
1505 | eet_data_image_header_decode(const void *data, | 1505 | eet_data_image_header_decode(const void *data, |
@@ -1520,7 +1520,7 @@ eet_data_image_header_decode(const void *data, | |||
1520 | comp, | 1520 | comp, |
1521 | quality, | 1521 | quality, |
1522 | lossy); | 1522 | lossy); |
1523 | } /* eet_data_image_header_decode */ | 1523 | } |
1524 | 1524 | ||
1525 | static void | 1525 | static void |
1526 | _eet_data_image_copy_buffer(const unsigned int *src, | 1526 | _eet_data_image_copy_buffer(const unsigned int *src, |
@@ -1544,7 +1544,7 @@ _eet_data_image_copy_buffer(const unsigned int *src, | |||
1544 | for (y = 0; y < h; ++y, src += src_w, over += row_stride) | 1544 | for (y = 0; y < h; ++y, src += src_w, over += row_stride) |
1545 | memcpy(over, src, w * 4); | 1545 | memcpy(over, src, w * 4); |
1546 | } | 1546 | } |
1547 | } /* _eet_data_image_copy_buffer */ | 1547 | } |
1548 | 1548 | ||
1549 | static int | 1549 | static int |
1550 | _eet_data_image_decode_inside(const void *data, | 1550 | _eet_data_image_decode_inside(const void *data, |
@@ -1647,7 +1647,7 @@ _eet_data_image_decode_inside(const void *data, | |||
1647 | abort(); | 1647 | abort(); |
1648 | 1648 | ||
1649 | return 1; | 1649 | return 1; |
1650 | } /* _eet_data_image_decode_inside */ | 1650 | } |
1651 | 1651 | ||
1652 | EAPI void * | 1652 | EAPI void * |
1653 | eet_data_image_decode_cipher(const void *data, | 1653 | eet_data_image_decode_cipher(const void *data, |
@@ -1714,7 +1714,7 @@ eet_data_image_decode_cipher(const void *data, | |||
1714 | *lossy = ilossy; | 1714 | *lossy = ilossy; |
1715 | 1715 | ||
1716 | return d; | 1716 | return d; |
1717 | } /* eet_data_image_decode_cipher */ | 1717 | } |
1718 | 1718 | ||
1719 | EAPI void * | 1719 | EAPI void * |
1720 | eet_data_image_decode(const void *data, | 1720 | eet_data_image_decode(const void *data, |
@@ -1728,7 +1728,7 @@ eet_data_image_decode(const void *data, | |||
1728 | { | 1728 | { |
1729 | return eet_data_image_decode_cipher(data, NULL, size, w, h, | 1729 | return eet_data_image_decode_cipher(data, NULL, size, w, h, |
1730 | alpha, comp, quality, lossy); | 1730 | alpha, comp, quality, lossy); |
1731 | } /* eet_data_image_decode */ | 1731 | } |
1732 | 1732 | ||
1733 | EAPI int | 1733 | EAPI int |
1734 | eet_data_image_decode_to_surface_cipher(const void *data, | 1734 | eet_data_image_decode_to_surface_cipher(const void *data, |
@@ -1795,7 +1795,7 @@ eet_data_image_decode_to_surface_cipher(const void *data, | |||
1795 | *lossy = ilossy; | 1795 | *lossy = ilossy; |
1796 | 1796 | ||
1797 | return 1; | 1797 | return 1; |
1798 | } /* eet_data_image_decode_to_surface_cipher */ | 1798 | } |
1799 | 1799 | ||
1800 | EAPI int | 1800 | EAPI int |
1801 | eet_data_image_decode_to_surface(const void *data, | 1801 | eet_data_image_decode_to_surface(const void *data, |
@@ -1816,5 +1816,5 @@ eet_data_image_decode_to_surface(const void *data, | |||
1816 | w, h, row_stride, | 1816 | w, h, row_stride, |
1817 | alpha, comp, quality, | 1817 | alpha, comp, quality, |
1818 | lossy); | 1818 | lossy); |
1819 | } /* eet_data_image_decode_to_surface */ | 1819 | } |
1820 | 1820 | ||