[MPlayer-cvslog] r35222 - trunk/libvo/vo_corevideo.m

reimar subversion at mplayerhq.hu
Fri Sep 28 19:51:27 CEST 2012


Author: reimar
Date: Fri Sep 28 19:51:27 2012
New Revision: 35222

Log:
corevideo: simplify draw_alpha function.

Modified:
   trunk/libvo/vo_corevideo.m

Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m	Fri Sep 28 18:49:37 2012	(r35221)
+++ trunk/libvo/vo_corevideo.m	Fri Sep 28 19:51:27 2012	(r35222)
@@ -89,22 +89,9 @@ LIBVO_EXTERN(corevideo)
 static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src, unsigned char *srca, int stride)
 {
 	unsigned char *dst = image_data + image_bytes * (y0 * image_width + x0);
-	switch (image_format)
-	{
-		case IMGFMT_RGB24:
-			vo_draw_alpha_rgb24(w,h,src,srca,stride,dst,image_stride);
-			break;
-		case IMGFMT_ARGB:
-		case IMGFMT_BGRA:
-			vo_draw_alpha_rgb32(w,h,src,srca,stride,dst,image_stride);
-			break;
-		case IMGFMT_YUY2:
-			vo_draw_alpha_yuy2(w,h,src,srca,stride,dst,image_stride);
-			break;
-		case IMGFMT_UYVY:
-			vo_draw_alpha_uyvy(w,h,src,srca,stride,dst,image_stride);
-			break;
-	}
+	vo_draw_alpha_func draw = vo_get_draw_alpha(image_format);
+	if (!draw) return;
+	draw(w,h,src,srca,stride,dst,image_stride);
 }
 
 static void free_file_specific(void)


More information about the MPlayer-cvslog mailing list