From 50f29760f6a8c99167f92c55f6732d4c99a8d017 Mon Sep 17 00:00:00 2001 From: Andreas Auras Date: Wed, 2 Mar 2011 15:06:42 +0100 Subject: Fixes two issues of video out standard cropping feature. Resulting left and right cropping parameters should be multiple of 2. Left cropping offset calculation to YUY2 frames fixed. --- src/xine-engine/video_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index bd7333a0b..4d23b1b39 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -533,8 +533,8 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { xine_list_iterator_t ite; /* add cropping requested by frontend */ - img->crop_left += this->crop_left; - img->crop_right += this->crop_right; + img->crop_left = (img->crop_left + this->crop_left) & ~1; + img->crop_right = (img->crop_right + this->crop_right) & ~1; img->crop_top += this->crop_top; img->crop_bottom += this->crop_bottom; @@ -1757,7 +1757,7 @@ static vo_frame_t * crop_frame( xine_video_port_t *this_gen, vo_frame_t *img ) { yuy2_to_yuy2( /* src */ img->base[0] + img->crop_top * img->pitches[0] + - img->crop_left/2, img->pitches[0], + img->crop_left*2, img->pitches[0], /* dst */ dupl->base[0], dupl->pitches[0], /* width x height */ -- cgit v1.2.3