summaryrefslogtreecommitdiff
path: root/src/video_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_out')
-rw-r--r--src/video_out/alphablend.c24
-rw-r--r--src/video_out/video_out_xv.c8
2 files changed, 19 insertions, 13 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);