summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/video_out/vidix/drivers/mga_vid.c21
2 files changed, 17 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3550f11eb..44bbec0a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@ xine-lib (1-rc3)
* updated win32 port
* default to menu button 1, if an invalid button is set
(fixes main menu of "Alice in Wonderland" RC2)
+ * fix yuy2 output on mga_vid vidix driver
xine-lib (1-rc2)
* XvMC support for hardware accelerated mpeg2 playback (-V xvmc)
diff --git a/src/video_out/vidix/drivers/mga_vid.c b/src/video_out/vidix/drivers/mga_vid.c
index b9500e494..43eab455a 100644
--- a/src/video_out/vidix/drivers/mga_vid.c
+++ b/src/video_out/vidix/drivers/mga_vid.c
@@ -755,9 +755,6 @@ int VIDIX_NAME(vixConfigPlayback)(vidix_playback_t *config)
dw = config->dest.w;
dh = config->dest.h;
- config->dest.pitch.y=32;
- config->dest.pitch.u=config->dest.pitch.v=32;
-
if (mga_verbose) printf(MGA_MSG" Setting up a %dx%d-%dx%d video window (src %dx%d) format %X\n",
dw, dh, x, y, sw, sh, config->fourcc);
@@ -778,11 +775,14 @@ int VIDIX_NAME(vixConfigPlayback)(vidix_playback_t *config)
case IMGFMT_IYUV:
case IMGFMT_YV12:
sh+=sh&1;
+ config->dest.pitch.y=config->dest.pitch.u=config->dest.pitch.v=32;
config->frame_size = ((sw + 31) & ~31) * sh + (((sw + 31) & ~31) * sh) / 2;
break;
case IMGFMT_YUY2:
case IMGFMT_UYVY:
- config->frame_size = ((sw + 31) & ~31) * sh * 2;
+ config->dest.pitch.y=16;
+ config->dest.pitch.u=config->dest.pitch.v=0;
+ config->frame_size = ((sw + 8) & ~8) * sh * 2;
break;
default:
printf(MGA_MSG" Unsupported pixel format: %x\n", config->fourcc);
@@ -881,7 +881,18 @@ int VIDIX_NAME(vixConfigPlayback)(vidix_playback_t *config)
//Setup source dimensions
regs.beshsrclst = (sw - 1) << 16;
- regs.bespitch = (sw + 31) & ~31 ;
+ switch(config->fourcc)
+ {
+ case IMGFMT_YV12:
+ case IMGFMT_I420:
+ case IMGFMT_IYUV:
+ regs.bespitch = (sw + 31) & ~31;
+ break;
+ case IMGFMT_YUY2:
+ case IMGFMT_UYVY:
+ regs.bespitch = (sw + 8) & ~8;
+ break;
+ }
//Setup horizontal scaling
ifactor = ((sw-1)<<14)/(dw-1);