search for: color_table_size

Displaying 8 results from an estimated 8 matches for "color_table_size".

2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...e->height; y++) { - p = image_data + y * image->rowstride; + p = image_data + y * image->width * 4; for (x = 0; x < image->width; x++) { p[SWFDEC_COLOR_INDEX_ALPHA] = *alpha; p += 4; @@ -317,6 +325,7 @@ swfdec_image_lossless_load (SwfdecImage *image) guint color_table_size; unsigned char *ptr; SwfdecBits bits; + guint8 *data; int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2); swfdec_bits_init (&bits, image->raw_data); @@ -348,15 +357,14 @@ swfdec_image_lossless_load (SwfdecImage *image) guint i; guint rowstride = (image-...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...nflateInit (&z); - ret = inflate (&z, Z_SYNC_FLUSH); + ret = inflate (&z, Z_FINISH); if (ret != Z_STREAM_END) { SWFDEC_WARNING ("lossless: ret == %d", ret); } @@ -348,9 +348,8 @@ static void swfdec_image_lossless_load (SwfdecImage *image) { int format; - int color_table_size; + guint color_table_size; unsigned char *ptr; - unsigned char *endptr; SwfdecBits bits; unsigned char *image_data = NULL; int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2); @@ -377,66 +376,70 @@ swfdec_image_lossless_load (SwfdecImage if (image->width == 0 || im...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
...ta); - swfdec_image_create_surface (image, image_data); - SWFDEC_LOG (" width = %d", image->width); SWFDEC_LOG (" height = %d", image->height); } @@@ -356,13 -348,20 +326,12 @@@ swfdec_image_lossless_load (SwfdecImage *image) { int format; - int color_table_size; + guint color_table_size; unsigned char *ptr; - int len; - unsigned char *endptr; SwfdecBits bits; - unsigned char *image_data = NULL; int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2); - bits.buffer = image->raw_data; - bits.ptr = image->raw_data-&g...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...unsigned char *indexed_data; guint i; unsigned int rowstride = (image->width + 3) & ~3; @@ -363,8 +323,13 @@ swfdec_image_lossless_load (SwfdecImage image->rowstride = image->width * 4; if (have_alpha) { - ptr = lossless (bits.ptr, bits.end - bits.ptr, - color_table_size * 4 + rowstride * image->height); + buffer = swfdec_bits_decompress (&bits, -1, color_table_size * 4 + rowstride * image->height); + if (buffer == NULL) { + SWFDEC_ERROR ("failed to decompress data"); + memset (image->data, 0, 4 * image->width * image->height)...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...ta); - swfdec_image_create_surface (image, image_data); - SWFDEC_LOG (" width = %d", image->width); SWFDEC_LOG (" height = %d", image->height); } @@@ -356,13 -348,20 +326,12 @@@ swfdec_image_lossless_load (SwfdecImage *image) { int format; - int color_table_size; + guint color_table_size; unsigned char *ptr; - int len; - unsigned char *endptr; SwfdecBits bits; - unsigned char *image_data = NULL; int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2); - bits.buffer = image->raw_data; - bits.ptr = image->raw_data-&g...
2007 Feb 06
0
21 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c
...ge_lossless_load (SwfdecImage unsigned char *indexed_data; int i; - image_data = g_malloc (4 * image->width * image->height); + image->data = g_malloc (4 * image->width * image->height); image->rowstride = image->width * 4; color_table = g_malloc (color_table_size * 4); @@ -450,7 +427,7 @@ swfdec_image_lossless_load (SwfdecImage } indexed_data = ptr + color_table_size * 3; } - swfdec_image_colormap_decode (image, image_data, indexed_data, + swfdec_image_colormap_decode (image, image->data, indexed_data, color_table, color_table...
2007 Jan 16
0
9 commits - libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_audio_stream.c libswfdec/swfdec_audio_stream.h libswfdec/swfdec_cache.c libswfdec/swfdec_cached.c libswfdec/swfdec_cached.h libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_image.c
...age->height = swfdec_bits_get_u16 (&bits); SWFDEC_LOG (" height = %d", image->height); - image->handle.size = 4 * image->width * image->height; - if (image->cache) - swfdec_cache_add_handle (image->cache, &image->handle); if (format == 3) { color_table_size = swfdec_bits_get_u8 (&bits) + 1; } else { @@ -399,6 +403,9 @@ swfdec_image_lossless_load (SwfdecImage SWFDEC_LOG ("height = %d", image->height); SWFDEC_LOG ("color_table_size = %d", color_table_size); + if (image->width == 0 || image->height == 0) +...
2007 Jan 18
0
Branch 'interpreter' - 4 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_swf_decoder.c libswfdec/swfdec_tag.c
...ts, -1); + alpha_data = lossless (buffer->data, buffer->length, image->width * image->height); + swfdec_buffer_unref (buffer); merge_alpha (image, image_data, alpha_data); g_free (alpha_data); @@ -372,19 +350,12 @@ swfdec_image_lossless_load (SwfdecImage int format; int color_table_size; unsigned char *ptr; - int len; unsigned char *endptr; SwfdecBits bits; unsigned char *image_data = NULL; int have_alpha = (image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2); - bits.buffer = image->raw_data; - bits.ptr = image->raw_data->data; - bits.idx = 0; - bits.end...