summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_out/alphablend.c24
-rw-r--r--src/video_out/video_out_xv.c8
-rw-r--r--src/xine-engine/video_out.c23
3 files changed, 37 insertions, 18 deletions
diff --git a/src/video_out/alphablend.c b/src/video_out/alphablend.c
index 65f96e5c0..a9f373832 100644
--- a/src/video_out/alphablend.c
+++ b/src/video_out/alphablend.c
@@ -240,9 +240,14 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl,
int dst_width, int dst_height)
{
/* FIXME: my_clut should disappear once I find out how to get the clut from the MPEG2 stream. */
-/* This happens to work with "The Matrix" using 0(black), 8(white) and 9(edges) */
+/* It looks like it comes from the ,IFO file, so will have to wait for IFO parser in xine.
+ * Here is an extract of another DVD player (oms)
+ * clut = ifoGetCLUT (priv->pgci);
+ * codec->ctrl (codec, CTRL_SPU_SET_CLUT, clut);
+ */
+/* This happens to work with "The Matrix" using 0(edges), 8(white) */
clut_t my_clut[] = {
- {y: 0x51, cr: 0xef, cb:0x5a},
+ {y: 0x00, cr: 0x80, cb:0x80},
{y: 0xbf, cr: 0x80, cb:0x80},
{y: 0x10, cr: 0x80, cb:0x80},
{y: 0x28, cr: 0x6d, cb:0xef},
@@ -251,7 +256,8 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl,
{y: 0x36, cr: 0x80, cb:0x80},
{y: 0x28, cr: 0x6d, cb:0xef},
{y: 0xbf, cr: 0x80, cb:0x80},
- {y: 0x5c, cr: 0x80, cb:0x80},
+ {y: 0x51, cr: 0x80, cb:0x80},
+ {y: 0xbf, cr: 0x80, cb:0x80},
{y: 0x10, cr: 0x80, cb:0x80},
{y: 0x28, cr: 0x6d, cb:0xef},
{y: 0x5c, cr: 0x80, cb:0x80},
@@ -273,24 +279,24 @@ void blend_yuv (uint8_t * dst_img, vo_overlay_t * img_overl,
uint8_t *dst_cb = dst_img + (dst_width * dst_height * 5) / 4 +
(y_off / 2) * (dst_width / 2) + (x_off / 2) + 1;
- int x,
- y;
-
+ int x, y;
for (y = 0; y < src_height; y++) {
for (x = 0; x < src_width; x++) {
uint8_t clr;
+ uint8_t mask;
uint8_t o;
+ mask = (*src_data) >> 4 ;
+
+ if (mask) {
clr = img_overl->clut[*src_data & 0x03];
o = img_overl->trans[*src_data & 0x03];
-
- if (clr) {
*dst_y = BLEND_YUV (*dst_y, my_clut[clr].y, o);
}
dst_y++;
if (y & x & 1) {
- if (clr) {
+ if (mask) {
*dst_cr = BLEND_YUV (*dst_cr, my_clut[clr].cr, o);
*dst_cb = BLEND_YUV (*dst_cb, my_clut[clr].cb, o);
}
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index ce0b74e4c..154cf2381 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.50 2001/07/08 18:15:54 guenter Exp $
+ * $Id: video_out_xv.c,v 1.51 2001/07/09 16:13:11 guenter Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -578,9 +578,9 @@ static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) {
xv_calc_format (this, frame->width, frame->height, frame->ratio_code);
}
// Alpha Blend here
- if (this->overlay) {
- blend_yuv( frame->image->data, this->overlay, frame->width, frame->height);
- }
+// if (this->overlay) {
+// blend_yuv( frame->image->data, this->overlay, frame->width, frame->height);
+// }
XLockDisplay (this->display);
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index aaa02bf4d..f573670ac 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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.c,v 1.31 2001/07/08 18:15:54 guenter Exp $
+ * $Id: video_out.c,v 1.32 2001/07/09 16:13:12 guenter Exp $
*
*/
@@ -285,12 +285,12 @@ static void *video_out_loop (void *this_gen) {
}
this->driver->display_frame (this->driver, img);
- /* Control Overlay SHOW/HIDE based on PTS */
- /* FIXME: Not implemented: These all need to be put to FREE state if the slider gets moved or STOP is pressed. */
+/* Control Overlay SHOW/HIDE based on PTS */
+/* FIXME: Not implemented: These all need to be put to FREE state if the slider gets moved or STOP is pressed. */
overlay=this->first_overlay;
count=1;
while (overlay) {
- count++;
+// count++;
switch(overlay->state) {
case OVERLAY_FREE:
break;
@@ -329,8 +329,12 @@ static void *video_out_loop (void *this_gen) {
}
overlay=overlay->next;
}
+
}
+
+
+
/*
* throw away undisplayed frames
*/
@@ -358,9 +362,18 @@ static uint32_t vo_get_capabilities (vo_instance_t *this) {
}
static void vo_open (vo_instance_t *this) {
-
+ printf("vo_open\n");
if (!this->video_loop_running) {
this->video_loop_running = 1;
+ if(this->first_overlay) {
+ vo_overlay_t *overlay;
+ overlay=this->first_overlay;
+ while (overlay) {
+ overlay->state=OVERLAY_FREE;
+ overlay=overlay->next;
+ }
+ }
+
pthread_create (&this->video_thread, NULL, video_out_loop, this) ;
printf ("video_out: thread created\n");
} else