summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2007-04-04 08:14:03 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2007-04-04 08:14:03 +0000
commitab9d654c861779bf25df51f13485734c246bffae (patch)
tree37ab3f1d5a83edb242b438a916695bbc950b7161
parentabd103c315540cbbb9897ae96985e756786c6ffd (diff)
downloadrockbox-ab9d654c861779bf25df51f13485734c246bffae.tar.gz
rockbox-ab9d654c861779bf25df51f13485734c246bffae.zip
add support for non 16x16 frame sizes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13016 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c4
-rw-r--r--apps/plugins/mpegplayer/video_out.h3
-rw-r--r--apps/plugins/mpegplayer/video_out_rockbox.c14
3 files changed, 12 insertions, 9 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index f4e2859e46..86145bb4b6 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -879,7 +879,9 @@ static void video_thread(void)
continue;
case STATE_SEQUENCE:
- vo_setup(info->sequence->width,
+ vo_setup(info->sequence->display_width,
+ info->sequence->display_height,
+ info->sequence->width,
info->sequence->height,
info->sequence->chroma_width,
info->sequence->chroma_height);
diff --git a/apps/plugins/mpegplayer/video_out.h b/apps/plugins/mpegplayer/video_out.h
index e29d0d775d..febb47e2ba 100644
--- a/apps/plugins/mpegplayer/video_out.h
+++ b/apps/plugins/mpegplayer/video_out.h
@@ -22,5 +22,6 @@
*/
void vo_draw_frame (uint8_t * const * buf);
-void vo_setup (unsigned int width, unsigned int height,
+void vo_setup (unsigned int display_width, unsigned int display_height,
+ unsigned int width, unsigned int height,
unsigned int chroma_width, unsigned int chroma_height);
diff --git a/apps/plugins/mpegplayer/video_out_rockbox.c b/apps/plugins/mpegplayer/video_out_rockbox.c
index c4a37a6558..627222ded9 100644
--- a/apps/plugins/mpegplayer/video_out_rockbox.c
+++ b/apps/plugins/mpegplayer/video_out_rockbox.c
@@ -213,7 +213,7 @@ void vo_draw_frame (uint8_t * const * buf)
#define SCREEN_HEIGHT LCD_WIDTH
#endif
-void vo_setup(unsigned int width, unsigned int height,
+void vo_setup(unsigned int display_width, unsigned int display_height, unsigned int width, unsigned int height,
unsigned int chroma_width, unsigned int chroma_height)
{
image_width=width;
@@ -221,19 +221,19 @@ void vo_setup(unsigned int width, unsigned int height,
image_chroma_x=image_width/chroma_width;
image_chroma_y=image_height/chroma_height;
- if (image_width >= SCREEN_WIDTH) {
+ if (display_width >= SCREEN_WIDTH) {
output_width = SCREEN_WIDTH;
output_x = 0;
} else {
- output_width = image_width;
- output_x = (SCREEN_WIDTH-image_width)/2;
+ output_width = display_width;
+ output_x = (SCREEN_WIDTH-display_width)/2;
}
- if (image_height >= SCREEN_HEIGHT) {
+ if (display_height >= SCREEN_HEIGHT) {
output_height = SCREEN_HEIGHT;
output_y = 0;
} else {
- output_height = image_height;
- output_y = (SCREEN_HEIGHT-image_height)/2;
+ output_height = display_height;
+ output_y = (SCREEN_HEIGHT-display_height)/2;
}
}