summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-26 15:15:50 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-26 15:15:50 +0000
commite4bb2bbb05b92d17c503d1458da904baa1ce8ad6 (patch)
treeea1ab8d9cf2e83c285be0089eac7e610d3ad5310
parentf8709ac7e25386017cee762666c12e2ac6d71a7a (diff)
downloadrockbox-e4bb2bbb05b92d17c503d1458da904baa1ce8ad6.tar.gz
rockbox-e4bb2bbb05b92d17c503d1458da904baa1ce8ad6.zip
mpegplayer: make sure 'floating' videos are even-aligned on color displays or else clipping the image could have dead lines while the WVS is shown. Throw in a couple misc cleanups to vo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16172 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/mpegplayer/video_out_rockbox.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c
index 5a479858f1..86a18cde2d 100644
--- a/apps/plugins/mpegplayer/video_out_rockbox.c
+++ b/apps/plugins/mpegplayer/video_out_rockbox.c
@@ -36,7 +36,6 @@ struct vo_data
36 int output_y; 36 int output_y;
37 int output_width; 37 int output_width;
38 int output_height; 38 int output_height;
39 bool visible;
40 unsigned flags; 39 unsigned flags;
41 struct vo_rect rc_vid; 40 struct vo_rect rc_vid;
42 struct vo_rect rc_clip; 41 struct vo_rect rc_clip;
@@ -226,7 +225,7 @@ bool vo_rect_union(struct vo_rect *rc_dst,
226 225
227 return true; 226 return true;
228 } 227 }
229 else if (!vo_rect_empty(rc2)) 228 else if (!vo_rect_empty_inl(rc2))
230 { 229 {
231 *rc_dst = *rc2; 230 *rc_dst = *rc2;
232 return true; 231 return true;
@@ -430,6 +429,9 @@ void vo_setup(const mpeg2_sequence_t * sequence)
430 else 429 else
431 { 430 {
432 vo.rc_vid.l = (SCREEN_WIDTH - sequence->display_width) / 2; 431 vo.rc_vid.l = (SCREEN_WIDTH - sequence->display_width) / 2;
432#ifdef HAVE_LCD_COLOR
433 vo.rc_vid.l &= ~1;
434#endif
433 vo.rc_vid.r = vo.rc_vid.l + sequence->display_width; 435 vo.rc_vid.r = vo.rc_vid.l + sequence->display_width;
434 } 436 }
435 437
@@ -441,6 +443,9 @@ void vo_setup(const mpeg2_sequence_t * sequence)
441 else 443 else
442 { 444 {
443 vo.rc_vid.t = (SCREEN_HEIGHT - sequence->display_height) / 2; 445 vo.rc_vid.t = (SCREEN_HEIGHT - sequence->display_height) / 2;
446#ifdef HAVE_LCD_COLOR
447 vo.rc_vid.t &= ~1;
448#endif
444 vo.rc_vid.b = vo.rc_vid.t + sequence->display_height; 449 vo.rc_vid.b = vo.rc_vid.t + sequence->display_height;
445 } 450 }
446 451