diff options
author | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-08-08 20:48:32 +0000 |
---|---|---|
committer | Guenter Bartsch <guenter@users.sourceforge.net> | 2001-08-08 20:48:32 +0000 |
commit | e4a7511a146f618c9dced24a7218f75917c2e06b (patch) | |
tree | 7c0f3be88a4e1bed86fac6482d052668a018bcb4 /src | |
parent | 4c0836e8f1504db9bbb329a1351050a8ff2cf469 (diff) | |
download | xine-lib-e4a7511a146f618c9dced24a7218f75917c2e06b.tar.gz xine-lib-e4a7511a146f618c9dced24a7218f75917c2e06b.tar.bz2 |
fixes for ffmpeg using xshm
CVS patchset: 401
CVS date: 2001/08/08 20:48:32
Diffstat (limited to 'src')
-rw-r--r-- | src/libffmpeg/config.h | 2 | ||||
-rw-r--r-- | src/libffmpeg/libavcodec/dsputil_mmx.c | 2 | ||||
-rw-r--r-- | src/libffmpeg/xine_decoder.c | 22 |
3 files changed, 14 insertions, 12 deletions
diff --git a/src/libffmpeg/config.h b/src/libffmpeg/config.h index 674150a19..52fb2dff8 100644 --- a/src/libffmpeg/config.h +++ b/src/libffmpeg/config.h @@ -5,5 +5,7 @@ #include "../../config.h" #ifdef ARCH_X86 +/* #define HAVE_MMX +*/ #endif diff --git a/src/libffmpeg/libavcodec/dsputil_mmx.c b/src/libffmpeg/libavcodec/dsputil_mmx.c index a4d40eb72..29a069566 100644 --- a/src/libffmpeg/libavcodec/dsputil_mmx.c +++ b/src/libffmpeg/libavcodec/dsputil_mmx.c @@ -990,7 +990,7 @@ void dsputil_init_mmx(void) pix_abs16x16_x2 = pix_abs16x16_x2_mmx; pix_abs16x16_y2 = pix_abs16x16_y2_mmx; pix_abs16x16_xy2 = pix_abs16x16_xy2_mmx; - av_fdct = fdct_mmx; + /* av_fdct = fdct_mmx; */ put_pixels_tab[0] = put_pixels_mmx; put_pixels_tab[1] = put_pixels_x2_mmx; diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index 3a8de9a02..9d4e20747 100644 --- a/src/libffmpeg/xine_decoder.c +++ b/src/libffmpeg/xine_decoder.c @@ -17,17 +17,22 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.2 2001/08/07 13:14:09 guenter Exp $ + * $Id: xine_decoder.c,v 1.3 2001/08/08 20:48:32 guenter Exp $ * * xine decoder plugin using ffmpeg * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <string.h> +#include "cpu_accel.h" #include "video_out.h" #include "buffer.h" #include "metronom.h" @@ -198,6 +203,9 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { len = avcodec_decode_video (&this->context, &this->av_picture, &got_picture, this->buf, this->size); +#ifdef ARCH_X86 + emms (); +#endif img = this->video_out->get_frame (this->video_out, /* this->av_picture.linesize[0], */ @@ -242,14 +250,6 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { su += this->av_picture.linesize[1]; sv += this->av_picture.linesize[2]; } - /* - memcpy (img->base[0], this->av_picture.data[0], - this->context.height * this->av_picture.linesize[0]); - memcpy (img->base[1], this->av_picture.data[1], - this->context.height * this->av_picture.linesize[1]/2); - memcpy (img->base[2], this->av_picture.data[2], - this->context.height * this->av_picture.linesize[2]/2); - */ if (img->copy) { @@ -258,8 +258,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { uint8_t* src[3]; src[0] = img->base[0]; - src[2] = src[0] + height * this->bih.biWidth; - src[1] = src[2] + height * this->bih.biWidth / 4; + src[1] = img->base[1]; + src[2] = img->base[2]; while ((height -= 16) >= 0) { img->copy(img, src); src[0] += 16 * stride; |