diff options
author | uid32519 <none@none> | 2001-07-04 20:32:29 +0000 |
---|---|---|
committer | uid32519 <none@none> | 2001-07-04 20:32:29 +0000 |
commit | 733a94dbd41f79c4a1b7e137bd8e032eebfaf043 (patch) | |
tree | 676ede9ee4bb316870ca7cba71aafab4a8dad864 | |
parent | 6140dca53aa5cc3d72b851f66360eecee72430e4 (diff) | |
download | xine-lib-733a94dbd41f79c4a1b7e137bd8e032eebfaf043.tar.gz xine-lib-733a94dbd41f79c4a1b7e137bd8e032eebfaf043.tar.bz2 |
latest overlay patches from James, simple overlays should work
CVS patchset: 254
CVS date: 2001/07/04 20:32:29
-rw-r--r-- | src/libspudec/spu.c | 9 | ||||
-rw-r--r-- | src/libspudec/spu.h | 4 | ||||
-rw-r--r-- | src/libspudec/xine_decoder.c | 7 | ||||
-rw-r--r-- | src/video_out/alphablend.c | 14 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 3 | ||||
-rw-r--r-- | src/xine-engine/spu_decoder.c | 4 | ||||
-rw-r--r-- | src/xine-engine/spu_decoder.h | 4 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 8 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 3 |
9 files changed, 36 insertions, 20 deletions
diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c index 13d9c92c8..bb8717142 100644 --- a/src/libspudec/spu.c +++ b/src/libspudec/spu.c @@ -1,6 +1,9 @@ /***** * -* This file is part of the OMS program. + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * + * This file is part of xine + * This file was originally part of the OMS program. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,10 +21,8 @@ * *****/ -#define DENT_TEST - /* - * subpic_decode.c - converts DVD subtitles to an XPM image + * spu.c - converts DVD subtitles to an XPM image * * Mostly based on hard work by: * diff --git a/src/libspudec/spu.h b/src/libspudec/spu.h index 844010243..09cfd32ee 100644 --- a/src/libspudec/spu.h +++ b/src/libspudec/spu.h @@ -1,6 +1,8 @@ /* * Copyright (C) 2000-2001 the xine project * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * This file is part of xine, a free video player. * * xine is free software; you can redistribute it and/or modify @@ -17,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: spu.h,v 1.1 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: spu.h,v 1.2 2001/07/04 20:32:29 uid32519 Exp $ * * This file was originally part of the OMS program. * diff --git a/src/libspudec/xine_decoder.c b/src/libspudec/xine_decoder.c index bcbcbb4ce..8f9acdeb6 100644 --- a/src/libspudec/xine_decoder.c +++ b/src/libspudec/xine_decoder.c @@ -1,6 +1,8 @@ /* * Copyright (C) 2000-2001 the xine project * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * This file is part of xine, a unix video player. * * xine is free software; you can redistribute it and/or modify @@ -17,7 +19,7 @@ * 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.1 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: xine_decoder.c,v 1.2 2001/07/04 20:32:29 uid32519 Exp $ * * stuff needed to turn libspu into a xine decoder plugin */ @@ -82,6 +84,7 @@ void spudec_init (spu_decoder_t *this_gen, vo_instance_t *vo_out) { } +/* overlay_txt is just for test purposes */ u_int *overlay_txt (vo_overlay_t *spu, float o1) { u_int x, y; @@ -141,7 +144,7 @@ void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { printf("X=%d Y=%d w=%d h=%d\n", this->spu->x,this->spu->y, this->spu->width,this->spu->height); - /* overlay_txt(this->spu,1.0); ??? */ + /* overlay_txt(this->spu,1.0); Just for test purposes */ this->spu->PTS = buf->PTS; this->vo_out->queue_overlay (this->vo_out, this->spu); this->spu = NULL; diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c index ac77fbbce..134c8aac3 100644 --- a/src/video_out/alphablend.c +++ b/src/video_out/alphablend.c @@ -4,6 +4,8 @@ /* * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * Copyright (C) 2000 Thomas Mirlacher * * This program is free software; you can redistribute it and/or modify @@ -249,15 +251,15 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, int src_width = img_overl->width; int src_height = img_overl->height; uint8_t *src_data = img_overl->data; - + int step=dst_width - src_width; int x_off = img_overl->x; int y_off = img_overl->y; uint8_t *dst_y = dst_img + dst_width * y_off + x_off; uint8_t *dst_cr = dst_img + dst_width * dst_height + - (y_off / 2) * (dst_width / 2) + (x_off / 2); + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; uint8_t *dst_cb = dst_img + (dst_width * dst_height * 5) / 4 + - (y_off / 2) * (dst_width / 2) + (x_off / 2); + (y_off / 2) * (dst_width / 2) + (x_off / 2) + 1; int x, y; @@ -298,11 +300,11 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl, src_data++; } - dst_y += dst_width - src_width; + dst_y += step; if (y & 1) { - dst_cr += (dst_width - src_width) / 2; - dst_cb += (dst_width - src_width) / 2; + dst_cr += (step + 1) / 2; + dst_cb += (step + 1) / 2; } } } diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index ed49b6324..38bdca7e3 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.48 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: video_out_xv.c,v 1.49 2001/07/04 20:32:29 uid32519 Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -28,6 +28,7 @@ * * xine-specific code by Guenter Bartsch <bartscgr@studbox.uni-stuttgart.de> * + * overlay support by James Courtier-Dutton <James@superbug.demon.co.uk> - July 2001 */ #ifdef HAVE_CONFIG_H diff --git a/src/xine-engine/spu_decoder.c b/src/xine-engine/spu_decoder.c index 0878bf06a..047f9b90d 100644 --- a/src/xine-engine/spu_decoder.c +++ b/src/xine-engine/spu_decoder.c @@ -1,6 +1,8 @@ /* * Copyright (C) 2000-2001 the xine project * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * This file is part of xine, a unix video player. * * xine is free software; you can redistribute it and/or modify @@ -17,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: spu_decoder.c,v 1.3 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: spu_decoder.c,v 1.4 2001/07/04 20:32:29 uid32519 Exp $ * * functions that implement spu decoding diff --git a/src/xine-engine/spu_decoder.h b/src/xine-engine/spu_decoder.h index 7ece22335..267a7fbaa 100644 --- a/src/xine-engine/spu_decoder.h +++ b/src/xine-engine/spu_decoder.h @@ -1,6 +1,8 @@ /* * Copyright (C) 2000-2001 the xine project * + * Copyright (C) James Courtier-Dutton James@superbug.demon.co.uk - July 2001 + * * This file is part of xine, a unix video player. * * xine is free software; you can redistribute it and/or modify @@ -17,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: spu_decoder.h,v 1.1 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: spu_decoder.h,v 1.2 2001/07/04 20:32:29 uid32519 Exp $ */ #ifndef HAVE_SPU_OUT_H #define HAVE_SPU_OUT_H diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index f778f99f3..d3b354ce6 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -1,4 +1,4 @@ - /* +/* * Copyright (C) 2000, 2001 the xine project * * This file is part of xine, a unix video player. @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.29 2001/07/04 18:12:12 uid32519 Exp $ + * $Id: video_out.c,v 1.30 2001/07/04 20:32:29 uid32519 Exp $ * */ @@ -491,12 +491,13 @@ static int vo_frame_draw (vo_frame_t *img) { static vo_overlay_t *vo_get_overlay (vo_instance_t *this) { /* FIXME: implement */ - return NULL; + return this->overlay; } static void vo_queue_overlay (vo_instance_t *this, vo_overlay_t *overlay) { /* FIXME: implement */ + this->driver->set_overlay (this->driver, overlay); } vo_instance_t *vo_new_instance (vo_driver_t *driver, metronom_t *metronom) { @@ -505,6 +506,7 @@ vo_instance_t *vo_new_instance (vo_driver_t *driver, metronom_t *metronom) { int i; this = xmalloc (sizeof (vo_instance_t)) ; + this->overlay = xmalloc (sizeof (vo_overlay_t)) ; this->driver = driver; this->metronom = metronom; diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index a4826c61f..30ffddd78 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.h,v 1.9 2001/07/04 17:10:24 uid32519 Exp $ + * $Id: video_out.h,v 1.10 2001/07/04 20:32:29 uid32519 Exp $ * * * xine version of video_out.h @@ -125,6 +125,7 @@ struct vo_instance_s { /* private stuff */ vo_driver_t *driver; + vo_overlay_t *overlay; metronom_t *metronom; img_buf_fifo_t *free_img_buf_queue; |