Displaying 15 results from an estimated 15 matches for "swfdec_image_lossless_load".
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...e_data,
unsigned char *p;
for (y = 0; y < image->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 *imag...
2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...ge_data, alpha_data);
g_free (alpha_data);
- swfdec_image_create_surface (image, image_data);
+ swfdec_image_create_surface (image, image_data, TRUE);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -464,6 +464,7 @@ swfdec_image_lossless_load (SwfdecImage
if (have_alpha) {
SWFDEC_INFO("16bit images aren't allowed to have alpha, ignoring");
+ have_alpha = FALSE;
}
image_data = g_malloc (4 * image->width * image->height);
@@ -513,7 +514,7 @@ swfdec_image_lossless_load (SwfdecImage...
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
...);
+ merge_alpha (image, image->data, alpha_data);
g_free (alpha_data);
- 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...
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
...ge_data, alpha_data);
g_free (alpha_data);
- swfdec_image_create_surface (image, image_data, TRUE);
+ swfdec_image_create_surface (image, image_data);
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -487,7 +495,7 @@ swfdec_image_lossless_load (SwfdecImage
#endif
}
- swfdec_image_create_surface (image, image_data, have_alpha);
+ swfdec_image_create_surface (image, image_data);
}
int
@@ -611,11 +619,7 @@ swfdec_image_get_surface_for_target (Swf
/* FIXME: we might want to create multiple surfaces here if there's multipl...
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
...++) {
p = image_data + y * image->rowstride;
for (x = 0; x < image->width; x++) {
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- p[3] = *alpha;
-#else
- p[0] = *alpha;
-#endif
+ p[SWFDEC_COLOR_INDEX_ALPHA] = *alpha;
p += 4;
alpha++;
}
@@ -375,7 +353,6 @@ swfdec_image_lossless_load (SwfdecImage
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;
@@ -414,7 +391,7 @@ swfdec_image_lossless_load (SwfdecImage
unsigned char *i...
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
...->data);
+ swfdec_buffer_unref (buffer);
+ } else {
+ SWFDEC_WARNING ("cannot set alpha channel information, decompression failed");
+ }
SWFDEC_LOG (" width = %d", image->width);
SWFDEC_LOG (" height = %d", image->height);
@@ -355,6 +314,7 @@ swfdec_image_lossless_load (SwfdecImage
swfdec_cached_load (SWFDEC_CACHED (image), 4 * image->width * image->height);
if (format == 3) {
+ SwfdecBuffer *buffer;
unsigned char *indexed_data;
guint i;
unsigned int rowstride = (image->width + 3) & ~3;
@@ -363,8 +323,13 @@ swfdec_image_los...
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
...its.ptr, &len);
+ buffer = swfdec_bits_get_buffer (&bits, -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...
2007 Nov 12
0
13 commits - libswfdec/Makefile.am libswfdec/swfdec_decoder.c libswfdec/swfdec_decoder.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_flv_decoder.h libswfdec/swfdec_image.c libswfdec/swfdec_image_decoder.c libswfdec/swfdec_image_decoder.h
...7:33 2007 +0100
data might be used uninitialized
Also, it's nice to throw an error about unkown formats
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 0d0362d..a3094c9 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -448,8 +448,7 @@ swfdec_image_lossless_load (SwfdecImage *image)
ptr += 2;
}
swfdec_buffer_unref (buffer);
- }
- if (format == 5) {
+ } else if (format == 5) {
SwfdecBuffer *buffer;
int i, j;
buffer = swfdec_bits_decompress (&bits, -1, 4 * image->width * image->height);
@@ -471,6 +470,9 @@ swfdec_image...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...ult:
g_assert_not_reached ();
+ allowed = FALSE;
+ break;
}
callback (url, allowed, user_data);
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index ee200d9..be63312 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -451,18 +451,21 @@ swfdec_image_lossless_load (SwfdecImage *image)
} else if (format == 5) {
SwfdecBuffer *buffer;
int i, j;
+ guint32 *p;
+
buffer = swfdec_bits_decompress (&bits, -1, 4 * image->width * image->height);
if (buffer == NULL) {
SWFDEC_ERROR ("failed to decompress data");...
2007 Jun 15
0
Branch 'as' - 5 commits - libswfdec/swfdec_as_native_function.c libswfdec/swfdec_edittext.c libswfdec/swfdec_edittext.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_morphshape.h
...fdecBits *bits = &s->b;
int id;
@@ -229,7 +233,7 @@ swfdec_image_jpeg2_load (SwfdecImage *im
}
int
-tag_func_define_bits_jpeg_3 (SwfdecSwfDecoder * s)
+tag_func_define_bits_jpeg_3 (SwfdecSwfDecoder * s, guint tag)
{
SwfdecBits *bits = &s->b;
guint id;
@@ -463,7 +467,7 @@ swfdec_image_lossless_load (SwfdecImage
}
int
-tag_func_define_bits_lossless (SwfdecSwfDecoder * s)
+tag_func_define_bits_lossless (SwfdecSwfDecoder * s, guint tag)
{
SwfdecImage *image;
int id;
@@ -483,7 +487,7 @@ tag_func_define_bits_lossless (SwfdecSwf
}
int
-tag_func_define_bits_lossless_2 (SwfdecSwfDecod...
2007 Mar 29
0
libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_audio_event.h libswfdec/swfdec_audio_flv.h libswfdec/swfdec_audio_stream.h libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_buffer.h libswfdec/swfdec_cache.c
...*layout;
- unsigned int width;
+ guint width;
SwfdecColor color;
g_return_if_fail (SWFDEC_IS_EDIT_TEXT (text));
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 79e353a..69a3f17 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -343,7 +343,7 @@ swfdec_image_lossless_load (SwfdecImage
SwfdecBuffer *buffer;
unsigned char *indexed_data;
guint i;
- unsigned int rowstride = (image->width + 3) & ~3;
+ guint rowstride = (image->width + 3) & ~3;
image->data = g_malloc (4 * image->width * image->height);
image->row...
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
...ree (dec);
+ return;
+ }
+ swfdec_cached_load (SWFDEC_CACHED (image), 4 * image->width * image->height);
jpeg_rgb_decoder_get_image (dec, &image_data,
&image->rowstride, &image->width, &image->height);
jpeg_rgb_decoder_free (dec);
@@ -385,9 +392,6 @@ swfdec_image_lossless_load (SwfdecImage
SWFDEC_LOG (" width = %d", image->width);
image->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_a...
2007 Mar 29
0
Branch 'as' - 9 commits - libswfdec-gtk/swfdec_playback_alsa.c libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c
...*layout;
- unsigned int width;
+ guint width;
SwfdecColor color;
g_return_if_fail (SWFDEC_IS_EDIT_TEXT (text));
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 79e353a..69a3f17 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -343,7 +343,7 @@ swfdec_image_lossless_load (SwfdecImage
SwfdecBuffer *buffer;
unsigned char *indexed_data;
guint i;
- unsigned int rowstride = (image->width + 3) & ~3;
+ guint rowstride = (image->width + 3) & ~3;
image->data = g_malloc (4 * image->width * image->height);
image->row...
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
...);
+ merge_alpha (image, image->data, alpha_data);
g_free (alpha_data);
- 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...
2007 Nov 12
0
20 commits - libswfdec/swfdec_as_function.c libswfdec/swfdec_as_string.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_movie_as_drawing.c libswfdec/swfdec_player_as.c
...Pekka Lampila <pekka.lampila at iki.fi>
Date: Sun Nov 11 13:40:18 2007 +0200
Fix couple of compiler warnings
diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c
index 0d0362d..20f0440 100644
--- a/libswfdec/swfdec_image.c
+++ b/libswfdec/swfdec_image.c
@@ -448,8 +448,7 @@ swfdec_image_lossless_load (SwfdecImage *image)
ptr += 2;
}
swfdec_buffer_unref (buffer);
- }
- if (format == 5) {
+ } else if (format == 5) {
SwfdecBuffer *buffer;
int i, j;
buffer = swfdec_bits_decompress (&bits, -1, 4 * image->width * image->height);
@@ -471,6 +470,8 @@ swfdec_image...