diff options
author | Simon Farnsworth <simon.farnsworth@onelan.co.uk> | 2007-05-04 18:25:14 +0100 |
---|---|---|
committer | Simon Farnsworth <simon.farnsworth@onelan.co.uk> | 2007-05-04 18:25:14 +0100 |
commit | 213eac661441a9c482f280c5cb5ec63240c8d29e (patch) | |
tree | 628c61a35643d862b214879486958f8b69e355a5 | |
parent | 111fe67b6395937ba487602d3bb28a809dceff71 (diff) | |
download | xine-lib-213eac661441a9c482f280c5cb5ec63240c8d29e.tar.gz xine-lib-213eac661441a9c482f280c5cb5ec63240c8d29e.tar.bz2 |
[PATCH] Fix deinterlacing in video_out_xv.c
Xv drivers are permitted to return a bigger image than we asked for, to
work around hardware constraints. If this happens, 1.1.6's video_out_xv
cannot deinterlace properly. Fix this by deinterlacing based on the
width of the Xv image; the Xv driver will discard the extra horizontal data.
Without this patch, you get a barber-pole effect if the input video is
interlaced *and* the Xv driver chooses to round up the width of the
requested image.
--
Simon Farnsworth
-rw-r--r-- | src/video_out/video_out_xv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 2cba3c2b6..dde15fb0f 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -512,17 +512,17 @@ static void xv_deinterlace_frame (xv_driver_t *this) { else recent_bitmaps[i] = NULL; - deinterlace_yuv( this->deinterlace_frame.image->data+frame->width*frame->height, - recent_bitmaps, frame->width/2, frame->height/2, this->deinterlace_method ); + deinterlace_yuv( this->deinterlace_frame.image->data+this->deinterlace_frame.image->width*frame->height, + recent_bitmaps, this->deinterlace_frame.image->width/2, frame->height/2, this->deinterlace_method ); for( i = 0; i < VO_NUM_RECENT_FRAMES; i++ ) if( this->recent_frames[i] && this->recent_frames[i]->width == frame->width && this->recent_frames[i]->height == frame->height ) - recent_bitmaps[i] = this->recent_frames[i]->image->data + frame->width*frame->height*5/4; + recent_bitmaps[i] = this->recent_frames[i]->image->data + this->deinterlace_frame.image->width*frame->height*5/4; else recent_bitmaps[i] = NULL; - deinterlace_yuv( this->deinterlace_frame.image->data+frame->width*frame->height*5/4, - recent_bitmaps, frame->width/2, frame->height/2, this->deinterlace_method ); + deinterlace_yuv( this->deinterlace_frame.image->data+this->deinterlace_frame.image->width*frame->height*5/4, + recent_bitmaps, this->deinterlace_frame.image->width/2, frame->height/2, this->deinterlace_method ); #else @@ -541,7 +541,7 @@ static void xv_deinterlace_frame (xv_driver_t *this) { recent_bitmaps[i] = NULL; deinterlace_yuv( this->deinterlace_frame.image->data, recent_bitmaps, - frame->width, frame->height, this->deinterlace_method ); + this->deinterlace_frame.image->width, frame->height, this->deinterlace_method ); } else { /* |