diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2007-04-04 22:51:57 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2007-04-04 22:51:57 +0000 |
commit | 4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259 (patch) | |
tree | b7342d21dbb0606559945028b53f6f890f5f69e4 /apps/plugins/mpegplayer/video_out_rockbox.c | |
parent | c6fce6cad3e259d4ea4d92ea9022298204125669 (diff) | |
download | rockbox-4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259.tar.gz rockbox-4d9c0012d42b35ed5e0a8f2280d1ea2ba220b259.zip |
just pass the struct to vo_setup instead of multiple arguments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13022 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/video_out_rockbox.c')
-rw-r--r-- | apps/plugins/mpegplayer/video_out_rockbox.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c index 627222ded9..e3f8ba0264 100644 --- a/apps/plugins/mpegplayer/video_out_rockbox.c +++ b/apps/plugins/mpegplayer/video_out_rockbox.c | |||
@@ -213,27 +213,26 @@ void vo_draw_frame (uint8_t * const * buf) | |||
213 | #define SCREEN_HEIGHT LCD_WIDTH | 213 | #define SCREEN_HEIGHT LCD_WIDTH |
214 | #endif | 214 | #endif |
215 | 215 | ||
216 | void vo_setup(unsigned int display_width, unsigned int display_height, unsigned int width, unsigned int height, | 216 | void vo_setup(const mpeg2_sequence_t * sequence) |
217 | unsigned int chroma_width, unsigned int chroma_height) | ||
218 | { | 217 | { |
219 | image_width=width; | 218 | image_width=sequence->width; |
220 | image_height=height; | 219 | image_height=sequence->height; |
221 | image_chroma_x=image_width/chroma_width; | 220 | image_chroma_x=image_width/sequence->chroma_width; |
222 | image_chroma_y=image_height/chroma_height; | 221 | image_chroma_y=image_height/sequence->chroma_height; |
223 | 222 | ||
224 | if (display_width >= SCREEN_WIDTH) { | 223 | if (sequence->display_width >= SCREEN_WIDTH) { |
225 | output_width = SCREEN_WIDTH; | 224 | output_width = SCREEN_WIDTH; |
226 | output_x = 0; | 225 | output_x = 0; |
227 | } else { | 226 | } else { |
228 | output_width = display_width; | 227 | output_width = sequence->display_width; |
229 | output_x = (SCREEN_WIDTH-display_width)/2; | 228 | output_x = (SCREEN_WIDTH-sequence->display_width)/2; |
230 | } | 229 | } |
231 | 230 | ||
232 | if (display_height >= SCREEN_HEIGHT) { | 231 | if (sequence->display_height >= SCREEN_HEIGHT) { |
233 | output_height = SCREEN_HEIGHT; | 232 | output_height = SCREEN_HEIGHT; |
234 | output_y = 0; | 233 | output_y = 0; |
235 | } else { | 234 | } else { |
236 | output_height = display_height; | 235 | output_height = sequence->display_height; |
237 | output_y = (SCREEN_HEIGHT-display_height)/2; | 236 | output_y = (SCREEN_HEIGHT-sequence->display_height)/2; |
238 | } | 237 | } |
239 | } | 238 | } |