search for: rowstride

Displaying 20 results from an estimated 35 matches for "rowstride".

2007 Oct 14
0
4 commits - libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_sound.c
...layer->error) { swfdec_cond_wait (player->cond, player->mutex); @@ -376,12 +377,12 @@ swfdec_video_decoder_gst_decode (SwfdecVideoDecoder *dec, SwfdecBuffer *buffer, break; case SWFDEC_VIDEO_FORMAT_I420: image->plane[0] = player->out->data; - image->rowstride[0] = player->width; - image->plane[1] = image->plane[0] + player->width * player->height; - image->rowstride[1] = (player->width + 1) / 2; - image->plane[2] = image->plane[1] + image->rowstride[1] * ((player->height + 1) / 2); + image->rowstri...
2007 Feb 13
0
libswfdec/jpeg libswfdec/swfdec_image.c
...= { /* misc helper function declarations */ static void dumpbits (bits_t * bits); -#if 0 -static char *sprintbits (char *str, unsigned int bits, int n); -#endif static void huffman_table_load_std_jpeg (JpegDecoder * dec); @@ -219,7 +223,7 @@ jpeg_decoder_sof_baseline_dct (JpegDecod int rowstride; int max_h_oversample = 0, max_v_oversample = 0; - JPEG_DEBUG ("start of frame (baseline DCT)"); + OIL_DEBUG ("start of frame (baseline DCT)"); length = get_be_u16 (bits); bits->end = bits->ptr + length - 2; @@ -229,8 +233,9 @@ jpeg_decoder_sof_baseline_dct...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...>raw_data); + image->surface = cairo_image_surface_create_from_png_stream ( + swfdec_image_png_read, &bits); } cairo_surface_t * commit c13bbaaf453acdab1f5189990fe2ff91ed887bc8 Author: Benjamin Otte <otte at gnome.org> Date: Sun Nov 11 00:15:38 2007 +0100 get rid of rowstride and data members and decode directly to a surface This prepares loading PNG files, as we can do this directly with cairo, and cairo only hands out surfaces diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 7dcb879..bff9fa6 100644 --- a/libswfdec/swfdec_image.c +++...
2007 Mar 19
0
7 commits - libswfdec/jpeg libswfdec/swfdec_button_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_video.c player/swfdec_debug_movies.c
...-git a/libswfdec/jpeg/jpeg.c b/libswfdec/jpeg/jpeg.c index 06c60c5..7c9086d 100644 --- a/libswfdec/jpeg/jpeg.c +++ b/libswfdec/jpeg/jpeg.c @@ -805,7 +805,7 @@ jpeg_decoder_get_image_size (JpegDecoder int jpeg_decoder_get_component_ptr (JpegDecoder * dec, int id, - unsigned char **image, int *rowstride) + const unsigned char **image, int *rowstride) { int i; diff --git a/libswfdec/jpeg/jpeg.h b/libswfdec/jpeg/jpeg.h index fac03bc..f9fd194 100644 --- a/libswfdec/jpeg/jpeg.h +++ b/libswfdec/jpeg/jpeg.h @@ -15,7 +15,7 @@ int jpeg_decoder_get_component_size(Jpeg int jpeg_decoder_get_compone...
2008 Jan 10
0
8 commits - libswfdec/swfdec_as_date.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_bits.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_text_field_movie_html.c test/trace
...1) & (~((n) - 1))) GstBuffer *buf; GstCaps *caps; GstStructure *structure; @@ -542,17 +542,18 @@ swfdec_video_decoder_gst_decode (SwfdecVideoDecoder *dec, SwfdecBuffer *buffer, break; case SWFDEC_VIDEO_FORMAT_I420: image->plane[0] = buf->data; - image->rowstride[0] = ALIGN (image->width, 4); - image->plane[1] = image->plane[0] + image->rowstride[0] * ALIGN (image->height, 2); - image->rowstride[1] = ALIGN (image->width, 8) / 2; - image->plane[2] = image->plane[1] + image->rowstride[1] * ALIGN (image->height,...
2007 Oct 28
1
9 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_object.c libswfdec/swfdec_codec_gst.c test/trace
...image->width = player->width; - image->height = player->height; + } image->mask = NULL; + buf = player->last; switch (swfdec_video_codec_get_format (dec->codec)) { case SWFDEC_VIDEO_FORMAT_RGBA: - image->plane[0] = player->out->data; - image->rowstride[0] = player->width * 4; + image->plane[0] = buf->data; + image->rowstride[0] = image->width * 4; break; case SWFDEC_VIDEO_FORMAT_I420: - image->plane[0] = player->out->data; - image->rowstride[0] = ALIGN (player->width, 4); - image-...
2007 Apr 17
0
8 commits - configure.ac doc/Makefile.am libswfdec/jpeg libswfdec/swfdec_debug.h libswfdec/swfdec_image.c
...0; -} -int -jpeg_decoder_eoi (JpegDecoder * dec, bits_t * bits) -{ - return 0; -} -int -jpeg_decoder_sof_baseline_dct (JpegDecoder * dec, bits_t * bits) +static void +jpeg_decoder_verify_header (JpegDecoder *dec) { + int max_quant_table = 0; int i; - int length; - int image_size; - int rowstride; - int max_h_oversample = 0, max_v_oversample = 0; - OIL_DEBUG ("start of frame (baseline DCT)"); + if (dec->sof_type != JPEG_MARKER_SOF_0) { + SWFDEC_ERROR("only handle baseline DCT"); + dec->error = TRUE; + } - length = get_be_u16 (bits); - bits->end =...
2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) { static const cairo_user_data_key_t key; g_assert (image->surface == NULL); image->surface = cairo_image_surface_create_for_data (data, - CAIRO_FORMAT_ARGB32, image->width, image->height, - image->rowstride); + has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, + image->width, image->height, image->rowstride); cairo_surface_set_user_data (image->surface, &key, data, g_free); } @@ -220,7 +220,7 @@ swfdec_image_jpeg_load (SwfdecImage *ima jpeg_rgb_decoder_get_...
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
...swfdec_bits_init (&bits, image->raw_data); jpeg_length = swfdec_bits_get_u32 (&bits); + buffer = swfdec_bits_get_buffer (&bits, jpeg_length); + if (buffer == NULL) + return; dec = jpeg_rgb_decoder_new (); @@@ -318,15 -316,13 +294,13 @@@ &image->rowstride, &image->width, &image->height); jpeg_rgb_decoder_free (dec); - bits.ptr += jpeg_length; - - alpha_data = lossless (bits.ptr, bits.end - bits.ptr, &len); + buffer = swfdec_bits_get_buffer (&bits, -1); + alpha_data = lossless (buffer->data, buffer->length,...
2007 Apr 06
0
3 commits - libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_codec.c libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_gst.c libswfdec/swfdec_codec.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_codec_video.c
...- *height = ctx->height; - - return TRUE; -} +} SwfdecVideoDecoderFFMpeg; SwfdecBuffer * -swfdec_codec_ffmpeg_video_decode (gpointer codec_data, SwfdecBuffer *buffer) +swfdec_video_decoder_ffmpeg_decode (SwfdecVideoDecoder *dec, SwfdecBuffer *buffer, + guint *width, guint *height, guint *rowstride) { - SwfdecCodecFFMpegVideo *codec = codec_data; + SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec; int got_image; SwfdecBuffer *ret; AVPicture picture; @@ -270,23 +227,50 @@ swfdec_codec_ffmpeg_video_decode (gpoint img_convert (&picture, PIX_FMT_RGB32,...
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
...e, guint8 *data) { static const cairo_user_data_key_t key; + gboolean has_alpha = swfdec_image_has_alpha (image); g_assert (image->surface == NULL); @@ -204,7 +212,7 @@ swfdec_image_jpeg_load (SwfdecImage *ima jpeg_rgb_decoder_get_image (dec, &image_data, &image->rowstride, NULL, NULL); jpeg_rgb_decoder_free (dec); - swfdec_image_create_surface (image, image_data, FALSE); + swfdec_image_create_surface (image, image_data); SWFDEC_LOG (" width = %d", image->width); SWFDEC_LOG (" height = %d", image->height); @@ -252,7 +260,7 @@...
2007 Sep 05
0
5 commits - libswfdec/swfdec_codec_ffmpeg.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_player.c libswfdec/swfdec_video.c
...int sws_width; /* width used in resampler */ + int sws_height; /* height used in resampler */ } SwfdecVideoDecoderFFMpeg; +#define ALIGNMENT 31 static SwfdecBuffer * swfdec_video_decoder_ffmpeg_decode (SwfdecVideoDecoder *dec, SwfdecBuffer *buffer, guint *width, guint *height, guint *rowstride) { SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec; - int got_image; + int got_image = 0; SwfdecBuffer *ret; AVPicture picture; + guchar *tmp, *aligned; + /* fullfill alignment and padding requirements */ + tmp = g_try_malloc (buffer->length + ALIGNMENT + FF_I...
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
...HA] / 255; - data[SWFDEC_COLOR_INDEX_BLUE] = (guint) data[SWFDEC_COLOR_INDEX_BLUE] * data[SWFDEC_COLOR_INDEX_ALPHA] / 255; - } - } -} - static gboolean swfdec_image_has_alpha (SwfdecImage *image) { @@ -635,7 +617,6 @@ swfdec_image_create_surface (SwfdecImage /* FIXME: only works if rowstride == image->width * 4 */ data = cairo_image_surface_get_data (surface); memcpy (data, image->data, image->width * image->height * 4); - swfdec_image_premultiply (data, image->width * image->height); return surface; } else { image->surface = cairo_image_s...
2007 Nov 07
1
thumbnailer/swfdec-thumbnailer.c
thumbnailer/swfdec-thumbnailer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a31d0686b78df2da96b9d8d1e3220e63978bba30 Author: Benjamin Otte <otte at gnome.org> Date: Wed Nov 7 20:02:04 2007 +0100 s/swfdec_player_get_image_size/swfdec_player_get_default_size/ diff --git a/thumbnailer/swfdec-thumbnailer.c b/thumbnailer/swfdec-thumbnailer.c index
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
...ecoder * s) { @@ -267,7 +226,6 @@ static void swfdec_image_jpeg3_load (SwfdecImage *image) { JpegRGBDecoder *dec; - unsigned char *alpha_data; SwfdecBits bits; SwfdecBuffer *buffer; int jpeg_length; @@ -294,12 +252,13 @@ swfdec_image_jpeg3_load (SwfdecImage *im &image->rowstride, &image->width, &image->height); jpeg_rgb_decoder_free (dec); - 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-&gt...
2007 Feb 14
0
7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
...++++++++++++++++++++++++++++++++++++++++ 12 files changed, 418 insertions(+), 7 deletions(-) New commits: diff-tree 98049e91f2ff8cd1cc2ad5b9ae5952653d065ad7 (from 0a2ba5fca5d5cd32a0161d2c6815166e4a35721c) Author: Benjamin Otte <otte@gnome.org> Date: Wed Feb 14 15:58:21 2007 +0100 fix rowstride computation in jpeg3 case diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 4d59b99..dc96fb6 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -249,7 +249,7 @@ swfdec_image_jpeg3_load (SwfdecImage *im } swfdec_cached_load (SWFDEC_CACHED (image), 4 *...
2007 Jun 26
0
2 commits - libswfdec/swfdec_codec_ffmpeg.c
...x_fmt, - codec->ctx->width, codec->ctx->height); + sws_scale (codec->sws, codec->frame->data, codec->frame->linesize, 0, codec->ctx->height, + picture.data, picture.linesize); *width = codec->ctx->width; *height = codec->ctx->height; *rowstride = codec->ctx->width * 4; @@ -238,6 +247,9 @@ swfdec_video_decoder_ffmpeg_free (Swfdec { SwfdecVideoDecoderFFMpeg *codec = (SwfdecVideoDecoderFFMpeg *) dec; + if (codec->sws) { + sws_freeContext (codec->sws); + }; avcodec_close (codec->ctx); av_free (codec->ctx);...
2007 Nov 08
0
configure.ac libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_playback_alsa.c libswfdec/swfdec_as_date.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_types.c libswfdec/swfdec_audio_flv.c libswfdec/swfdec_audio_flv.h
...(SwfdecAudioCodec type, SwfdecAudioFormat format) +swfdec_audio_decoder_gst_new (guint type, SwfdecAudioFormat format) { SwfdecGstAudio *player; GstCaps *srccaps, *sinkcaps; @@ -549,12 +549,14 @@ swfdec_video_decoder_gst_decode (SwfdecVideoDecoder *dec, SwfdecBuffer *buffer, image->rowstride[2] = image->rowstride[1]; g_assert (image->plane[2] + image->rowstride[2] * ALIGN (image->height, 2) / 2 == image->plane[0] + buf->size); break; + default: + g_return_val_if_reached (FALSE); } return TRUE; } static GstCaps * -swfdec_video_decoder_ge...
2012 Jul 06
0
[PATCH] dri/nouveau: Add AllocTextureImageBuffer() implementation
...reImageBuffer(ctx, ti); + + assert(!nti->base.ImageOffsets); + nti->base.ImageOffsets = malloc(sizeof(GLuint)); + _swrast_init_texture_image(ti, width, height, depth); + + nouveau_surface_alloc(ctx, s, LINEAR, get_teximage_placement(ti), + ti->TexFormat, width, height); + nti->base.RowStride = s->pitch / s->cpp; + + return GL_TRUE; +} + static void -nouveau_teximage_free(struct gl_context *ctx, struct gl_texture_image *ti) +nouveau_free_texture_image_buffer(struct gl_context *ctx, + struct gl_texture_image *ti) { struct nouveau_teximage *nti = to_nouveau_teximage(ti);...
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
...ource; - 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_appl...