From e497eb1f9172f0e620e807a99b3379b7348d6410 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Fri, 20 Dec 2002 01:35:49 +0000 Subject: MNG demuxer added CVS patchset: 3591 CVS date: 2002/12/20 01:35:49 --- src/demuxers/Makefile.am | 33 +++++++++++++-------------------- src/libxinevdec/rgb.c | 9 +++++---- 2 files changed, 18 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index f8cca61fb..fd7ed203b 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -10,34 +10,23 @@ if HAVE_VORBIS ogg_module = xineplug_dmx_ogg.la endif -#if HAVE_ZLIB -#qt_modules = xineplug_dmx_qt.la -#endif - if BUILD_ASF asf_module = xineplug_dmx_asf.la endif +if HAVE_LIBMNG +mng_module = xineplug_dmx_mng.la +endif + ## # IMPORTANT: # --------- # All of xine demuxer plugins should be named like the scheme "xineplug_dmx_" -#lib_LTLIBRARIES = $(ogg_module) $(asf_module) $(qt_modules) xineplug_dmx_avi.la\ -# xineplug_dmx_mpeg_block.la xineplug_dmx_mpeg.la \ -# xineplug_dmx_mpeg_elem.la xineplug_dmx_mpeg_audio.la \ -# xineplug_dmx_cda.la xineplug_dmx_film.la \ -# xineplug_dmx_roq.la xineplug_dmx_fli.la \ -# xineplug_dmx_smjpeg.la xineplug_dmx_wav.la \ -# xineplug_dmx_idcin.la xineplug_dmx_wc3movie.la \ -# xineplug_dmx_vqa.la xineplug_dmx_voc.la \ -# xineplug_dmx_aiff.la xineplug_dmx_snd.la \ -# xineplug_dmx_yuv4mpeg2.la xineplug_dmx_real.la -# xineplug_dmx_mpeg_pes.la xineplug_dmx_mpeg_ts.la - XINELIB = $(top_builddir)/src/xine-engine/libxine.la -lib_LTLIBRARIES = $(ogg_module) $(asf_module) xineplug_dmx_avi.la\ +lib_LTLIBRARIES = $(ogg_module) $(asf_module) $(mng_module) \ + xineplug_dmx_avi.la\ xineplug_dmx_mpeg_block.la \ xineplug_dmx_mpeg.la \ xineplug_dmx_mpeg_audio.la \ @@ -59,11 +48,11 @@ lib_LTLIBRARIES = $(ogg_module) $(asf_module) xineplug_dmx_avi.la\ xineplug_dmx_real.la \ xineplug_dmx_realaudio.la \ xineplug_dmx_eawve.la \ - xineplug_dmx_mpeg_ts.la + xineplug_dmx_mpeg_ts.la \ + xineplug_dmx_mng.la xineplug_dmx_ogg_la_SOURCES = demux_ogg.c -xineplug_dmx_ogg_la_LIBADD = $(OGG_LIBS) $(VORBIS_LIBS)\ - $(XINELIB) +xineplug_dmx_ogg_la_LIBADD = $(OGG_LIBS) $(VORBIS_LIBS) $(XINELIB) xineplug_dmx_ogg_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ xineplug_dmx_avi_la_SOURCES = demux_avi.c @@ -166,6 +155,10 @@ xineplug_dmx_eawve_la_SOURCES = demux_eawve.c xineplug_dmx_eawve_la_LIBADD = $(XINELIB) xineplug_dmx_eawve_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ +xineplug_dmx_mng_la_SOURCES = demux_mng.c +xineplug_dmx_mng_la_LIBADD = $(XINELIB) $(ZLIB_LIBS) $(MNG_LIBS) +xineplug_dmx_mng_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ + include_HEADERS = demux.h noinst_HEADERS = asfheader.h qtpalette.h diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c index addf45efe..2a13fb068 100644 --- a/src/libxinevdec/rgb.c +++ b/src/libxinevdec/rgb.c @@ -21,7 +21,7 @@ * Actually, this decoder just converts a raw RGB image to a YUY2 map * suitable for display under xine. * - * $Id: rgb.c,v 1.14 2002/12/18 21:35:42 esnel Exp $ + * $Id: rgb.c,v 1.15 2002/12/20 01:35:50 komadori Exp $ */ #include @@ -153,9 +153,8 @@ static void rgb_decode_data (video_decoder_t *this_gen, /* iterate through each row */ buf_ptr = 0; - row_ptr = this->yuv_planes.row_width * - (this->yuv_planes.row_count - 1); - for (; row_ptr >= 0; row_ptr -= this->yuv_planes.row_width) { + + for (row_ptr = 0; row_ptr < this->yuv_planes.row_width * this->yuv_planes.row_count; row_ptr += this->yuv_planes.row_width) { for (pixel_ptr = 0; pixel_ptr < this->width; pixel_ptr++) { if (this->bytes_per_pixel == 1) { @@ -188,6 +187,8 @@ static void rgb_decode_data (video_decoder_t *this_gen, g = this->buf[buf_ptr++]; r = this->buf[buf_ptr++]; + buf_ptr += this->bytes_per_pixel - 3; + this->yuv_planes.y[row_ptr + pixel_ptr] = COMPUTE_Y(r, g, b); this->yuv_planes.u[row_ptr + pixel_ptr] = -- cgit v1.2.3