[MPlayer-cvslog] r31310 - trunk/libvo/vo_yuv4mpeg.c

siretart subversion at mplayerhq.hu
Thu Jun 3 19:37:58 CEST 2010


Author: siretart
Date: Thu Jun  3 19:37:58 2010
New Revision: 31310

Log:
vo_yuv4mpeg: disable RGB support when compiling against a shared libswscale

This avoids using swscale internals when compiling against a shared libswscale.

Patch inspired by Uoti Urpala's work in his git branch:
http://repo.or.cz/w/mplayer.git/commitdiff/cd4e8dc1fa2863dcce62a44dd9ea105f9f9288f4

Modified:
   trunk/libvo/vo_yuv4mpeg.c

Modified: trunk/libvo/vo_yuv4mpeg.c
==============================================================================
--- trunk/libvo/vo_yuv4mpeg.c	Thu Jun  3 10:17:51 2010	(r31309)
+++ trunk/libvo/vo_yuv4mpeg.c	Thu Jun  3 19:37:58 2010	(r31310)
@@ -56,7 +56,9 @@
 
 #include "fastmemcpy.h"
 #include "libswscale/swscale.h"
+#ifdef CONFIG_LIBSWSCALE_A
 #include "libswscale/rgb2rgb.h"
+#endif
 #include "libmpcodecs/vf_scale.h"
 #include "libavutil/rational.h"
 
@@ -228,6 +230,7 @@ static void draw_osd(void)
     vo_draw_text(image_width, image_height, draw_alpha);
 }
 
+#ifdef CONFIG_LIBSWSCALE_A
 static void deinterleave_fields(uint8_t *ptr, const int stride,
 							  const int img_height)
 {
@@ -258,6 +261,7 @@ static void deinterleave_fields(uint8_t 
 	}
 	free(line_state);
 }
+#endif
 
 static void vo_y4m_write(const void *ptr, const size_t num_bytes)
 {
@@ -318,14 +322,15 @@ static int write_last_frame(void)
 
 static void flip_page (void)
 {
-	uint8_t *upper_y, *upper_u, *upper_v, *rgb_buffer_lower;
-	int rgb_stride, uv_stride, field_height;
-	unsigned int i, low_ofs;
-
 	fprintf(yuv_out, "FRAME\n");
 
+#ifdef CONFIG_LIBSWSCALE_A
 	if (using_format != IMGFMT_YV12)
 	{
+		uint8_t *upper_y, *upper_u, *upper_v, *rgb_buffer_lower;
+		int rgb_stride, uv_stride, field_height;
+		unsigned int i, low_ofs;
+
 		rgb_stride = image_width * 3;
 		uv_stride = image_width / 2;
 
@@ -374,6 +379,7 @@ static void flip_page (void)
 					image_width, image_height,
 					image_width, uv_stride, rgb_stride);
 	}
+#endif
 
 	/* Write progressive frame */
 	vo_y4m_write(image, write_bytes);


More information about the MPlayer-cvslog mailing list