diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-29 20:19:17 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-29 20:19:17 +0000 |
commit | 5a26f2776048526226fd3aac82af9731fff166f3 (patch) | |
tree | a99c8f77dc8ecac61ef0f723ac40a990f73ab7dd /libvo/vo_x11.c | |
parent | 25486c1da7801b6dcf89058d5c1b9ff11054f66f (diff) | |
download | mpv-5a26f2776048526226fd3aac82af9731fff166f3.tar.bz2 mpv-5a26f2776048526226fd3aac82af9731fff166f3.tar.xz |
swscaler cleanup
green line at bottom bugfix
green lines in yuv2yuv scaler bugfix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3210 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r-- | libvo/vo_x11.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 04a34430b5..8dd0fe9b11 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -133,8 +133,9 @@ static void draw_alpha_15(int x0,int y0, int w,int h, unsigned char* src, unsign static void draw_alpha_null(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride){ } -static unsigned int scale_xinc=0; -static unsigned int scale_yinc=0; +static unsigned int scale_srcW=0; +static unsigned int scale_srcH=0; + static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d_height,uint32_t flags,char *title,uint32_t format ) { @@ -179,8 +180,8 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d image_width=d_width&(~7); image_height=d_height; } - scale_xinc=(width << 16) / image_width - 2; // needed for proper rounding - scale_yinc=(height << 16) / image_height +2; + scale_srcW=width; + scale_srcH=height; SwScale_Init(); } @@ -481,11 +482,11 @@ static void flip_page( void ){ static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y ) { -if(scale_xinc){ +if(scale_srcW){ uint8_t *dst[3] = {ImageData, NULL, NULL}; SwScale_YV12slice(src,stride,y,h, - dst, image_width*((bpp+7)/8), image_width, ( depth == 24 ) ? bpp : depth, - scale_xinc, scale_yinc); + dst, image_width*((bpp+7)/8), ( depth == 24 ) ? bpp : depth, + scale_srcW, scale_srcH, image_width, image_height); } else { uint8_t *dst=ImageData + ( image_width * y + x ) * ( bpp/8 ); yuv2rgb( dst,src[0],src[1],src[2],w,h,image_width*( bpp/8 ),stride[0],stride[1] ); |