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
This commit is contained in:
parent
f8709ac7e2
commit
e4bb2bbb05
1 changed files with 7 additions and 2 deletions
|
@ -36,7 +36,6 @@ struct vo_data
|
||||||
int output_y;
|
int output_y;
|
||||||
int output_width;
|
int output_width;
|
||||||
int output_height;
|
int output_height;
|
||||||
bool visible;
|
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
struct vo_rect rc_vid;
|
struct vo_rect rc_vid;
|
||||||
struct vo_rect rc_clip;
|
struct vo_rect rc_clip;
|
||||||
|
@ -226,7 +225,7 @@ bool vo_rect_union(struct vo_rect *rc_dst,
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (!vo_rect_empty(rc2))
|
else if (!vo_rect_empty_inl(rc2))
|
||||||
{
|
{
|
||||||
*rc_dst = *rc2;
|
*rc_dst = *rc2;
|
||||||
return true;
|
return true;
|
||||||
|
@ -430,6 +429,9 @@ void vo_setup(const mpeg2_sequence_t * sequence)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vo.rc_vid.l = (SCREEN_WIDTH - sequence->display_width) / 2;
|
vo.rc_vid.l = (SCREEN_WIDTH - sequence->display_width) / 2;
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
vo.rc_vid.l &= ~1;
|
||||||
|
#endif
|
||||||
vo.rc_vid.r = vo.rc_vid.l + sequence->display_width;
|
vo.rc_vid.r = vo.rc_vid.l + sequence->display_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,6 +443,9 @@ void vo_setup(const mpeg2_sequence_t * sequence)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vo.rc_vid.t = (SCREEN_HEIGHT - sequence->display_height) / 2;
|
vo.rc_vid.t = (SCREEN_HEIGHT - sequence->display_height) / 2;
|
||||||
|
#ifdef HAVE_LCD_COLOR
|
||||||
|
vo.rc_vid.t &= ~1;
|
||||||
|
#endif
|
||||||
vo.rc_vid.b = vo.rc_vid.t + sequence->display_height;
|
vo.rc_vid.b = vo.rc_vid.t + sequence->display_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue