diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2003-11-10 18:40:08 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2003-11-10 18:40:08 +0000 |
commit | 158b24c049a24c0b56b570ba16e1b8710619dadd (patch) | |
tree | 8d272a9093d301895ce0c52508846646124116fd /src | |
parent | 4b444b68f9f75bde65708f70a1dd2f88e7448eca (diff) | |
download | xine-lib-158b24c049a24c0b56b570ba16e1b8710619dadd.tar.gz xine-lib-158b24c049a24c0b56b570ba16e1b8710619dadd.tar.bz2 |
fix yuy2 output on mga_vid
CVS patchset: 5717
CVS date: 2003/11/10 18:40:08
Diffstat (limited to 'src')
-rw-r--r-- | src/video_out/vidix/drivers/mga_vid.c | 21 |
1 files changed, 16 insertions, 5 deletions
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); |