3 * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
4 * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
6 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
7 * See http://libmpeg2.sourceforge.net/ for updates.
9 * mpeg2dec is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * mpeg2dec is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * libmpeg2 sync history:
25 * 2008-07-01 - CVS revision 1.22
31 #if LCD_WIDTH >= LCD_HEIGHT
32 #define SCREEN_WIDTH LCD_WIDTH
33 #define SCREEN_HEIGHT LCD_HEIGHT
35 #else /* Assume the screen is rotated on portrait LCDs */
36 #define SCREEN_WIDTH LCD_HEIGHT
37 #define SCREEN_HEIGHT LCD_WIDTH
41 /* Structure to hold width and height values */
47 /* Structure that defines a rectangle by its edges */
53 void vo_draw_frame (uint8_t * const * buf
);
54 bool vo_draw_frame_thumb (uint8_t * const * buf
,
55 const struct vo_rect
*rc
);
57 bool vo_show (bool show
);
58 bool vo_is_visible(void);
59 void vo_setup (const mpeg2_sequence_t
* sequence
);
60 void vo_set_clip_rect(const struct vo_rect
*rc
);
61 void vo_dimensions(struct vo_ext
*sz
);
62 void vo_cleanup (void);
68 static inline void vo_lock(void) {}
69 static inline void vo_unlock(void) {}
72 /* Sets all coordinates of a vo_rect to 0 */
73 void vo_rect_clear(struct vo_rect
*rc
);
74 /* Returns true if left >= right or top >= bottom */
75 bool vo_rect_empty(const struct vo_rect
*rc
);
76 /* Initializes a vo_rect using upper-left corner and extents */
77 void vo_rect_set_ext(struct vo_rect
*rc
, int x
, int y
,
78 int width
, int height
);
79 /* Query if two rectangles intersect
80 * If either are empty returns false */
81 bool vo_rects_intersect(const struct vo_rect
*rc1
,
82 const struct vo_rect
*rc2
);
84 /* Intersect two rectangles
85 * Resulting rectangle is placed in rc_dst.
86 * rc_dst is set to empty if they don't intersect.
87 * Empty source rectangles do not intersect any rectangle.
88 * rc_dst may be the same structure as rc1 or rc2.
89 * Returns true if the resulting rectangle is not empty. */
90 bool vo_rect_intersect(struct vo_rect
*rc_dst
,
91 const struct vo_rect
*rc1
,
92 const struct vo_rect
*rc2
);
94 bool vo_rect_union(struct vo_rect
*rc_dst
,
95 const struct vo_rect
*rc1
,
96 const struct vo_rect
*rc2
);
98 void vo_rect_offset(struct vo_rect
*rc
, int dx
, int dy
);
100 #endif /* VIDEO_OUT_H */