[Swfdec] 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 libswfdec/swfdec_interval.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_player.c libswfdec/swfdec_shape_parser.c libswfdec/swfdec_sound.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
Benjamin Otte
company at kemper.freedesktop.org
Mon Dec 10 13:37:36 PST 2007
libswfdec/jpeg/jpeg.h | 2 +-
libswfdec/jpeg/jpeg_rgb_decoder.c | 26 +++++++++++++-------------
libswfdec/swfdec_as_interpret.c | 26 +++++++++++++++++++-------
libswfdec/swfdec_bits.c | 4 ++--
libswfdec/swfdec_cached.c | 2 +-
libswfdec/swfdec_codec_adpcm.c | 2 +-
libswfdec/swfdec_codec_audio.c | 2 +-
libswfdec/swfdec_flash_security.c | 2 ++
libswfdec/swfdec_image.c | 20 ++++++++++++--------
libswfdec/swfdec_interval.c | 4 ++--
libswfdec/swfdec_net_stream.c | 8 ++++----
libswfdec/swfdec_player.c | 4 ++--
libswfdec/swfdec_shape_parser.c | 8 ++++----
libswfdec/swfdec_sound.c | 4 ++--
libswfdec/swfdec_text_field_movie.c | 4 ++--
libswfdec/swfdec_text_field_movie_html.c | 1 +
16 files changed, 69 insertions(+), 50 deletions(-)
New commits:
commit 534341e14aba5a7c80f962b3dcad6e9d04959f40
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Dec 10 22:37:29 2007 +0100
silence invalid alignment warnings
diff --git a/libswfdec/swfdec_cached.c b/libswfdec/swfdec_cached.c
index e49d42a..4279d1e 100644
--- a/libswfdec/swfdec_cached.c
+++ b/libswfdec/swfdec_cached.c
@@ -72,7 +72,7 @@ swfdec_cached_set_cache (SwfdecCached *cached, SwfdecCache *cache)
static void
swfdec_cached_unload_func (gpointer data)
{
- SwfdecCached *cached = SWFDEC_CACHED ((guint8 *) data - G_STRUCT_OFFSET (SwfdecCached, handle));
+ SwfdecCached *cached = SWFDEC_CACHED ((void *) ((guint8 *) data - G_STRUCT_OFFSET (SwfdecCached, handle)));
cached->handle.unload = NULL;
swfdec_cached_unload (cached);
diff --git a/libswfdec/swfdec_codec_adpcm.c b/libswfdec/swfdec_codec_adpcm.c
index 1fc17ee..0aa39ab 100644
--- a/libswfdec/swfdec_codec_adpcm.c
+++ b/libswfdec/swfdec_codec_adpcm.c
@@ -79,7 +79,7 @@ swfdec_audio_decoder_adpcm_decode_chunk (SwfdecBits *bits, guint n_bits, guint c
len = swfdec_bits_left (bits) / channels / n_bits;
len = MIN (len, 4095);
ret = swfdec_buffer_new_and_alloc ((len + 1) * sizeof (gint16) * channels);
- out = (gint16 *) ret->data;
+ out = (gint16 *) (void *) ret->data;
/* output initial value */
SWFDEC_LOG ("decoding %u samples", len + 1);
for (ch = 0; ch < channels; ch++)
diff --git a/libswfdec/swfdec_codec_audio.c b/libswfdec/swfdec_codec_audio.c
index 46e6d47..34edbe9 100644
--- a/libswfdec/swfdec_codec_audio.c
+++ b/libswfdec/swfdec_codec_audio.c
@@ -45,7 +45,7 @@ swfdec_audio_decoder_uncompressed_decode_8bit (SwfdecAudioDecoder *decoder,
return;
ret = swfdec_buffer_new_and_alloc (buffer->length * 2);
- out = (gint16 *) ret->data;
+ out = (gint16 *) (void *) ret->data;
in = buffer->data;
for (i = 0; i < buffer->length; i++) {
*out = ((gint16) *in << 8) ^ (-1);
diff --git a/libswfdec/swfdec_flash_security.c b/libswfdec/swfdec_flash_security.c
index 5f31d4a..03f15a4 100644
--- a/libswfdec/swfdec_flash_security.c
+++ b/libswfdec/swfdec_flash_security.c
@@ -217,6 +217,8 @@ swfdec_flash_security_allow_url (SwfdecSecurity *guard, const SwfdecURL *url,
break;
default:
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");
data = g_malloc0 (4 * image->width * image->height);
goto out;
}
- ptr = data = buffer->data;
+ data = buffer->data;
+ p = (void *) data;
/* image is stored in 0RGB format. We use ARGB/BGRA. */
for (j = 0; j < image->height; j++) {
for (i = 0; i < image->width; i++) {
- *((guint32 *) ptr) = GUINT32_FROM_BE (*((guint32 *) ptr));
- ptr += 4;
+ *p = GUINT32_FROM_BE (*p);
+ p++;
}
}
/* FIXME: this can fail if the returned buffer does not contain malloc'd
@@ -633,8 +636,8 @@ cairo_surface_t *
swfdec_image_create_surface_transformed (SwfdecImage *image, const SwfdecColorTransform *trans)
{
cairo_surface_t *surface, *source;
- guint8 *tdata;
- const guint8 *sdata;
+ guint32 *tdata;
+ const guint32 *sdata;
guint i, n;
gboolean has_alpha = FALSE;
@@ -653,15 +656,16 @@ swfdec_image_create_surface_transformed (SwfdecImage *image, const SwfdecColorTr
return NULL;
}
/* FIXME: This code assumes a rowstride of 4 * width */
- sdata = cairo_image_surface_get_data (source);
+ /* FIXME: This code assumes an alignment of 4 */
+ sdata = (void *) cairo_image_surface_get_data (source);
n = image->width * image->height;
for (i = 0; i < n; i++) {
- ((guint32 *) tdata)[i] = swfdec_color_apply_transform_premultiplied (((guint32 *) sdata)[i], trans);
+ tdata[i] = swfdec_color_apply_transform_premultiplied (sdata[i], trans);
/* optimization: check for alpha channel to speed up compositing */
has_alpha = tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF;
}
cairo_surface_destroy (source);
- surface = cairo_image_surface_create_for_data (tdata,
+ surface = cairo_image_surface_create_for_data ((unsigned char *) tdata,
has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24,
image->width, image->height, image->width * 4);
cairo_surface_set_user_data (surface, &key, tdata, g_free);
diff --git a/libswfdec/swfdec_interval.c b/libswfdec/swfdec_interval.c
index 1199290..59f3ea7 100644
--- a/libswfdec/swfdec_interval.c
+++ b/libswfdec/swfdec_interval.c
@@ -84,8 +84,8 @@ static void
swfdec_interval_trigger (SwfdecTimeout *timeout)
{
SwfdecAsValue ret;
- SwfdecInterval *interval = SWFDEC_INTERVAL (((guchar *) timeout)
- - G_STRUCT_OFFSET (SwfdecInterval, timeout));
+ SwfdecInterval *interval = SWFDEC_INTERVAL ((void *) (((guchar *) timeout)
+ - G_STRUCT_OFFSET (SwfdecInterval, timeout)));
SwfdecAsContext *context = SWFDEC_AS_OBJECT (interval)->context;
SwfdecPlayer *player = SWFDEC_PLAYER (context);
diff --git a/libswfdec/swfdec_net_stream.c b/libswfdec/swfdec_net_stream.c
index b822991..35c8c8e 100644
--- a/libswfdec/swfdec_net_stream.c
+++ b/libswfdec/swfdec_net_stream.c
@@ -159,7 +159,7 @@ swfdec_net_stream_video_goto (SwfdecNetStream *stream, guint timestamp)
static void
swfdec_net_stream_timeout (SwfdecTimeout *timeout)
{
- SwfdecNetStream *stream = SWFDEC_NET_STREAM ((guchar *) timeout - G_STRUCT_OFFSET (SwfdecNetStream, timeout));
+ SwfdecNetStream *stream = SWFDEC_NET_STREAM ((void *) ((guchar *) timeout - G_STRUCT_OFFSET (SwfdecNetStream, timeout)));
SWFDEC_LOG ("timeout fired");
stream->timeout.callback = NULL;
@@ -322,7 +322,7 @@ swfdec_net_stream_loader_target_init (SwfdecLoaderTargetInterface *iface)
static void
swfdec_net_stream_input_connect (SwfdecVideoMovieInput *input, SwfdecVideoMovie *movie)
{
- SwfdecNetStream *stream = SWFDEC_NET_STREAM ((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input));
+ SwfdecNetStream *stream = SWFDEC_NET_STREAM ((void *)((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input)));
stream->movies = g_list_prepend (stream->movies, movie);
g_object_ref (stream);
@@ -331,7 +331,7 @@ swfdec_net_stream_input_connect (SwfdecVideoMovieInput *input, SwfdecVideoMovie
static void
swfdec_net_stream_input_disconnect (SwfdecVideoMovieInput *input, SwfdecVideoMovie *movie)
{
- SwfdecNetStream *stream = SWFDEC_NET_STREAM ((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input));
+ SwfdecNetStream *stream = SWFDEC_NET_STREAM ((void *)((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input)));
stream->movies = g_list_remove (stream->movies, movie);
g_object_unref (stream);
@@ -340,7 +340,7 @@ swfdec_net_stream_input_disconnect (SwfdecVideoMovieInput *input, SwfdecVideoMov
static cairo_surface_t *
swfdec_net_stream_input_get_image (SwfdecVideoMovieInput *input)
{
- SwfdecNetStream *stream = SWFDEC_NET_STREAM ((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input));
+ SwfdecNetStream *stream = SWFDEC_NET_STREAM ((void *)((guchar *) input - G_STRUCT_OFFSET (SwfdecNetStream, input)));
return stream->surface;
}
diff --git a/libswfdec/swfdec_player.c b/libswfdec/swfdec_player.c
index 62c3e38..2c5f47c 100644
--- a/libswfdec/swfdec_player.c
+++ b/libswfdec/swfdec_player.c
@@ -507,7 +507,7 @@ swfdec_player_perform_external_actions (SwfdecPlayer *player)
static void
swfdec_player_trigger_external_actions (SwfdecTimeout *advance)
{
- SwfdecPlayer *player = SWFDEC_PLAYER ((guint8 *) advance - G_STRUCT_OFFSET (SwfdecPlayer, external_timeout));
+ SwfdecPlayer *player = SWFDEC_PLAYER ((void *) ((guint8 *) advance - G_STRUCT_OFFSET (SwfdecPlayer, external_timeout)));
player->external_timeout.callback = NULL;
swfdec_player_perform_external_actions (player);
@@ -1254,7 +1254,7 @@ swfdec_player_execute_on_load_init (SwfdecPlayer *player)
static void
swfdec_player_iterate (SwfdecTimeout *timeout)
{
- SwfdecPlayer *player = SWFDEC_PLAYER ((guint8 *) timeout - G_STRUCT_OFFSET (SwfdecPlayer, iterate_timeout));
+ SwfdecPlayer *player = SWFDEC_PLAYER ((void *) ((guint8 *) timeout - G_STRUCT_OFFSET (SwfdecPlayer, iterate_timeout)));
GList *walk;
/* add timeout again - do this first because later code can change it */
diff --git a/libswfdec/swfdec_shape_parser.c b/libswfdec/swfdec_shape_parser.c
index 90e09ef..4eba39a 100644
--- a/libswfdec/swfdec_shape_parser.c
+++ b/libswfdec/swfdec_shape_parser.c
@@ -272,8 +272,8 @@ swfdec_shape_parser_finish (SwfdecShapeParser *parser)
if (style->draw == NULL)
continue;
if (style->subpaths) {
- swfdec_style_finish (style, (SwfdecSubPath *) parser->subpaths->data,
- parser->subpaths2->len ? (SwfdecSubPath *) parser->subpaths->data : NULL, FALSE);
+ swfdec_style_finish (style, (SwfdecSubPath *) (void *) parser->subpaths->data,
+ parser->subpaths2->len ? (SwfdecSubPath *) (void *) parser->subpaths->data : NULL, FALSE);
parser->draws = g_slist_prepend (parser->draws, g_object_ref (style->draw));
} else if (parser->parse_fill) {
SWFDEC_WARNING ("fillstyle %u has no path", i);
@@ -286,8 +286,8 @@ swfdec_shape_parser_finish (SwfdecShapeParser *parser)
if (style->draw == NULL)
continue;
if (style->subpaths) {
- swfdec_style_finish (style, (SwfdecSubPath *) parser->subpaths->data,
- parser->subpaths2->len ? (SwfdecSubPath *) parser->subpaths->data : NULL, TRUE);
+ swfdec_style_finish (style, (SwfdecSubPath *) (void *) parser->subpaths->data,
+ parser->subpaths2->len ? (SwfdecSubPath *) (void *) parser->subpaths->data : NULL, TRUE);
parser->draws = g_slist_prepend (parser->draws, g_object_ref (style->draw));
} else {
SWFDEC_WARNING ("linestyle %u has no path", i);
diff --git a/libswfdec/swfdec_sound.c b/libswfdec/swfdec_sound.c
index dffe212..ef0641e 100644
--- a/libswfdec/swfdec_sound.c
+++ b/libswfdec/swfdec_sound.c
@@ -549,9 +549,9 @@ swfdec_sound_buffer_render (gint16 *dest, const SwfdecBuffer *source,
}
}
if (channels == 2) {
- swfdec_sound_buffer_render_stereo (dest, (const gint16 *) source->data, offset, n_samples, rate);
+ swfdec_sound_buffer_render_stereo (dest, (const void *) source->data, offset, n_samples, rate);
} else {
- swfdec_sound_buffer_render_mono (dest, (const gint16 *) source->data, offset, n_samples, rate);
+ swfdec_sound_buffer_render_mono (dest, (const void *) source->data, offset, n_samples, rate);
}
g_free (fixme);
}
diff --git a/libswfdec/swfdec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c
index 50b7a57..ab33f55 100644
--- a/libswfdec/swfdec_text_field_movie.c
+++ b/libswfdec/swfdec_text_field_movie.c
@@ -368,7 +368,7 @@ swfdec_text_field_movie_get_paragraphs (SwfdecTextFieldMovie *text, int *num)
if (text->text->password)
swfdec_text_field_movie_ensure_asterisks (text, max_length);
- return (SwfdecParagraph *)g_array_free (paragraphs, FALSE);
+ return (SwfdecParagraph *) (void *) g_array_free (paragraphs, FALSE);
}
static void
@@ -698,7 +698,7 @@ swfdec_text_field_movie_get_layouts (SwfdecTextFieldMovie *text, int *num,
if (num != NULL)
*num = layouts->len;
- return (SwfdecLayout *)g_array_free (layouts, FALSE);
+ return (SwfdecLayout *) (void *) g_array_free (layouts, FALSE);
}
static void
diff --git a/libswfdec/swfdec_text_field_movie_html.c b/libswfdec/swfdec_text_field_movie_html.c
index 1a007a9..d3907ff 100644
--- a/libswfdec/swfdec_text_field_movie_html.c
+++ b/libswfdec/swfdec_text_field_movie_html.c
@@ -516,6 +516,7 @@ swfdec_text_field_movie_html_text_align_to_string (SwfdecTextAlign align)
return "JUSTIFY";
default:
g_assert_not_reached ();
+ return "";
}
}
commit 193de9aa3a9bb0772fb7af32fcd7628e297c0d47
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Dec 10 22:36:08 2007 +0100
fix unaligned reads
diff --git a/libswfdec/swfdec_bits.c b/libswfdec/swfdec_bits.c
index edc79a8..5298012 100644
--- a/libswfdec/swfdec_bits.c
+++ b/libswfdec/swfdec_bits.c
@@ -359,9 +359,9 @@ swfdec_bits_get_bdouble (SwfdecBits * b)
SWFDEC_BYTES_CHECK (b, 8);
#if G_BYTE_ORDER == G_BIG_ENDIAN
- d = *((double *) b->ptr);
+ memcpy (&d, b->ptr, 8);
#elif G_BYTE_ORDER == G_LITTLE_ENDIAN
- tmp = *((guint64 *) b->ptr);
+ memcpy (&tmp, b->ptr, 8);
tmp = GUINT64_FROM_BE (tmp);
p = &tmp;
d = *((double *) p);
commit 66ec2cbf1f9c456306eb523a7d00921e6e646fb2
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Dec 10 22:35:57 2007 +0100
fix unaligned reads
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 0b48d67..975a447 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -1321,6 +1321,7 @@ swfdec_action_string_compare (SwfdecAsContext *cx, guint action, const guint8 *d
cond = strcmp (l, r) < 0;
break;
default:
+ cond = FALSE;
g_assert_not_reached ();
break;
}
commit b995903b20f0327f8d4845eea183b9aae0134d03
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Dec 10 21:52:53 2007 +0100
fix alignment warnings
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index c37b2bf..0b48d67 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -116,7 +116,7 @@ swfdec_action_goto_frame (SwfdecAsContext *cx, guint action, const guint8 *data,
SWFDEC_ERROR ("GotoFrame action length invalid (is %u, should be 2", len);
return;
}
- frame = GUINT16_FROM_LE (*((guint16 *) data));
+ frame = (data[0] | data[1] << 8);
if (SWFDEC_IS_SPRITE_MOVIE (cx->frame->target)) {
SwfdecSpriteMovie *movie = SWFDEC_SPRITE_MOVIE (cx->frame->target);
swfdec_sprite_movie_goto (movie, frame + 1);
@@ -225,7 +225,7 @@ swfdec_script_skip_actions (SwfdecAsContext *cx, guint jump)
if (*pc & 0x80) {
if (pc + 2 >= endpc)
break;
- pc += 3 + GUINT16_FROM_LE (*((guint16 *) (pc + 1)));
+ pc += 3 + (pc[1] | (pc[2] << 8));
} else {
pc++;
}
@@ -1086,11 +1086,14 @@ swfdec_action_not (SwfdecAsContext *cx, guint action, const guint8 *data, guint
static void
swfdec_action_jump (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
+ gint16 offset;
+
if (len != 2) {
SWFDEC_ERROR ("Jump action length invalid (is %u, should be 2", len);
return;
}
- cx->frame->pc += 5 + GINT16_FROM_LE (*((gint16*) data));
+ offset = data[0] | (data[1] << 8);
+ cx->frame->pc += 5 + (int) data;
}
static void
@@ -1100,8 +1103,10 @@ swfdec_action_if (SwfdecAsContext *cx, guint action, const guint8 *data, guint l
SWFDEC_ERROR ("Jump action length invalid (is %u, should be 2", len);
return;
}
- if (swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1)))
- cx->frame->pc += 5 + GINT16_FROM_LE (*((gint16*) data));
+ if (swfdec_as_value_to_boolean (cx, swfdec_as_stack_peek (cx, 1))) {
+ gint16 offset = data[0] | (data[1] << 8);
+ cx->frame->pc += 5 + (int) offset;
+ }
swfdec_as_stack_pop (cx);
}
@@ -2946,21 +2951,27 @@ swfdec_action_print_get_url (guint action, const guint8 *data, guint len)
static char *
swfdec_action_print_if (guint action, const guint8 *data, guint len)
{
+ gint16 offset;
+
if (len != 2) {
SWFDEC_ERROR ("If action length invalid (is %u, should be 2", len);
return NULL;
}
- return g_strdup_printf ("If %d", GINT16_FROM_LE (*((gint16*) data)));
+ offset = data[0] | (data[1] << 8);
+ return g_strdup_printf ("If %d", (int) offset);
}
static char *
swfdec_action_print_jump (guint action, const guint8 *data, guint len)
{
+ gint16 offset;
+
if (len != 2) {
SWFDEC_ERROR ("Jump action length invalid (is %u, should be 2", len);
return NULL;
}
- return g_strdup_printf ("Jump %d", GINT16_FROM_LE (*((gint16*) data)));
+ offset = data[0] | (data[1] << 8);
+ return g_strdup_printf ("Jump %d", (int) offset);
}
static char *
commit 2d1a6f8bcb285b461508efc1138cbc7de5cf052c
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Dec 10 21:26:54 2007 +0100
make all decoder functions use uint32_t
diff --git a/libswfdec/jpeg/jpeg.h b/libswfdec/jpeg/jpeg.h
index eff4c03..6c0ba41 100644
--- a/libswfdec/jpeg/jpeg.h
+++ b/libswfdec/jpeg/jpeg.h
@@ -155,7 +155,7 @@ int jpeg_decoder_get_component_subsampling(JpegDecoder *dec, int id,
int jpeg_decoder_get_component_ptr(JpegDecoder *dec, int id,
unsigned char **image, int *rowstride);
-unsigned char *jpeg_decoder_get_argb_image (JpegDecoder *dec);
+uint32_t *jpeg_decoder_get_argb_image (JpegDecoder *dec);
int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image,
int *width, int *height);
diff --git a/libswfdec/jpeg/jpeg_rgb_decoder.c b/libswfdec/jpeg/jpeg_rgb_decoder.c
index 6fc49c8..3c01914 100644
--- a/libswfdec/jpeg/jpeg_rgb_decoder.c
+++ b/libswfdec/jpeg/jpeg_rgb_decoder.c
@@ -29,10 +29,10 @@ static int16_t jfif_matrix[24] = {
};
-unsigned char * get_argb_444 (JpegDecoder *dec);
-unsigned char * get_argb_422 (JpegDecoder *dec);
-unsigned char * get_argb_422v (JpegDecoder *dec);
-unsigned char * get_argb_420 (JpegDecoder *dec);
+uint32_t * get_argb_444 (JpegDecoder *dec);
+uint32_t * get_argb_422 (JpegDecoder *dec);
+uint32_t * get_argb_422v (JpegDecoder *dec);
+uint32_t * get_argb_420 (JpegDecoder *dec);
#if 0
static void imagescale2h_u8 (unsigned char *dest, int d_rowstride,
@@ -66,7 +66,7 @@ int jpeg_decode_argb (uint8_t *data, int length, uint32_t **image,
return TRUE;
}
-unsigned char *
+uint32_t *
jpeg_decoder_get_argb_image (JpegDecoder *dec)
{
@@ -126,7 +126,7 @@ upsample (uint8_t *d, uint8_t *s, int n)
}
-unsigned char *
+uint32_t *
get_argb_444 (JpegDecoder *dec)
{
uint32_t *tmp;
@@ -151,10 +151,10 @@ get_argb_444 (JpegDecoder *dec)
argbp += dec->width;
}
free(tmp);
- return (unsigned char *)argb_image;
+ return argb_image;
}
-unsigned char *
+uint32_t *
get_argb_422 (JpegDecoder *dec)
{
uint32_t *tmp;
@@ -187,10 +187,10 @@ get_argb_422 (JpegDecoder *dec)
free(tmp);
free(tmp_u);
free(tmp_v);
- return (unsigned char *)argb_image;
+ return argb_image;
}
-unsigned char *
+uint32_t *
get_argb_422v (JpegDecoder *dec)
{
uint32_t *tmp;
@@ -232,10 +232,10 @@ get_argb_422v (JpegDecoder *dec)
free(tmp);
free(tmp_u);
free(tmp_v);
- return (unsigned char *)argb_image;
+ return argb_image;
}
-unsigned char *
+uint32_t *
get_argb_420 (JpegDecoder *dec)
{
uint32_t *tmp;
@@ -284,7 +284,7 @@ get_argb_420 (JpegDecoder *dec)
free(tmp_u);
free(tmp_v);
free(tmp1);
- return (unsigned char *)argb_image;
+ return argb_image;
}
#if 0
More information about the Swfdec
mailing list