summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Auras <yak54@inkennet.de>2011-03-02 15:06:42 +0100
committerAndreas Auras <yak54@inkennet.de>2011-03-02 15:06:42 +0100
commit50f29760f6a8c99167f92c55f6732d4c99a8d017 (patch)
tree54d0a044652ffe5e888848d2bc487dd5ed2fcb66
parente2578cc0b9f8fb9b1eac1439ebe29bf3771cfefa (diff)
downloadxine-lib-50f29760f6a8c99167f92c55f6732d4c99a8d017.tar.gz
xine-lib-50f29760f6a8c99167f92c55f6732d4c99a8d017.tar.bz2
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.
-rw-r--r--src/xine-engine/video_out.c6
1 files 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 */