changeset 31371:a6cb957ad186

Disable only G200 support when compiling against dynamic libswscale instead of disabling mga support completely.
author reimar
date Wed, 16 Jun 2010 19:40:26 +0000
parents d005a8241dec
children 204f1f103f73
files configure libvo/mga_template.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Jun 16 19:09:06 2010 +0000
+++ b/configure	Wed Jun 16 19:40:26 2010 +0000
@@ -7431,8 +7431,6 @@
 if test "$_mga" = auto ; then
   _mga=no
   test -c /dev/mga_vid && _mga=yes
-  test "$_libswscale_a" = no && _mga=no &&
-    res_comment="mga requires libswscale.a"
 fi
 if test "$_mga" = yes ; then
   def_mga='#define CONFIG_MGA 1'
--- a/libvo/mga_template.c	Wed Jun 16 19:09:06 2010 +0000
+++ b/libvo/mga_template.c	Wed Jun 16 19:40:26 2010 +0000
@@ -67,6 +67,7 @@
 }
 
 
+#ifdef CONFIG_LIBSWSCALE_A
 static void
 draw_slice_g200(uint8_t *image[], int stride[], int width,int height,int x,int y)
 {
@@ -84,6 +85,7 @@
 		width, height,
 		stride[1], stride[2], bespitch);
 }
+#endif
 
 static void
 draw_slice_g400(uint8_t *image[], int stride[], int w,int h,int x,int y)
@@ -126,9 +128,11 @@
 	    w,h,x,y);
 #endif
 
+#ifdef CONFIG_LIBSWSCALE_A
 	if (mga_vid_config.card_type == MGA_G200)
             draw_slice_g200(src,stride,w,h,x,y);
 	else
+#endif
             draw_slice_g400(src,stride,w,h,x,y);
 	return 0;
 }
@@ -429,6 +433,12 @@
 			return -1;
 		}
 	}
+#ifndef CONFIG_LIBSWSCALE_A
+	if (mga_vid_config.card_type == MGA_G200) {
+		mp_msg(MSGT_VO, MSGL_FATAL, "G200 cards are only support with static libswscale\n");
+		return -1;
+	}
+#endif
 
 	mp_msg(MSGT_VO,MSGL_V,"[MGA] Using %d buffers.\n",mga_vid_config.num_frames);