From 44af65bce79cbae1eedd49c13989306d1a5c3ccf Mon Sep 17 00:00:00 2001 From: Zhao Halley Date: Wed, 5 Sep 2012 17:23:19 +0800 Subject: [PATCH] test: refine loadsurface.h, conveninent for new format support --- test/loadsurface.h | 93 ++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 49 deletions(-) diff --git a/test/loadsurface.h b/test/loadsurface.h index e775927..e991fc2 100755 --- a/test/loadsurface.h +++ b/test/loadsurface.h @@ -39,10 +39,10 @@ static int scale_2dimage(unsigned char *src_img, int src_imgw, int src_imgh, static int YUV_blend_with_pic(int width, int height, - unsigned char *Y_start, int Y_pitch, - unsigned char *U_start, int U_pitch, - unsigned char *V_start, int V_pitch, - int UV_interleave, int fixed_alpha) + unsigned char *Y_start, int Y_pitch, + unsigned char *U_start, int U_pitch, + unsigned char *V_start, int V_pitch, + unsigned int fourcc, int fixed_alpha) { /* PIC YUV format */ unsigned char *pic_y_old = yuvga_pic; @@ -96,33 +96,31 @@ static int YUV_blend_with_pic(int width, int height, *p = *p * (100 - alpha) / 100 + *q * alpha/100; } - if (UV_interleave == 0) { - for (row=0; row