# HG changeset patch # User arpi # Date 1003458107 0 # Node ID 9ee34c6950e04e5e11a88ed36e4e1411f5f8e274 # Parent e407fc4562f1b28a01f45217ba147c19627a3044 xinc scaled by 16 instead of 8 diff -r e407fc4562f1 -r 9ee34c6950e0 libvo/vo_x11.c --- a/libvo/vo_x11.c Fri Oct 19 02:16:21 2001 +0000 +++ b/libvo/vo_x11.c Fri Oct 19 02:21:47 2001 +0000 @@ -178,11 +178,11 @@ image_width=vo_screenwidth; image_height=vo_screenheight; } else { - image_width=d_width&(~3); + image_width=d_width&(~7); image_height=d_height; } - scale_xinc=(width << 8) / image_width - 1; // -1 needed for proper rounding - scale_yinc=(height << 16) / image_height; + scale_xinc=(width << 16) / image_width - 2; // needed for proper rounding + scale_yinc=(height << 16) / image_height +2; SwScale_Init(); } diff -r e407fc4562f1 -r 9ee34c6950e0 postproc/swscale.c --- a/postproc/swscale.c Fri Oct 19 02:16:21 2001 +0000 +++ b/postproc/swscale.c Fri Oct 19 02:21:47 2001 +0000 @@ -71,7 +71,7 @@ // *** bilinear scaling and yuv->rgb conversion of yv12 slices: // *** Note: it's called multiple times while decoding a frame, first time y==0 // *** Designed to upscale, but may work for downscale too. -// s_xinc = (src_width << 8) / dst_width +// s_xinc = (src_width << 16) / dst_width // s_yinc = (src_height << 16) / dst_height void SwScale_YV12slice_brg24(unsigned char* srcptr[],int stride[], int y, int h, unsigned char* dstptr, int dststride, int dstw, int dstbpp, @@ -104,7 +104,7 @@ int canMMX2BeUsed; // we need that precission at least for the mmx2 code -s_xinc*= 256; +//s_xinc*= 256; s_xinc2=s_xinc>>1; canMMX2BeUsed= (s_xinc <= 0x10000 && (dstw&31)==0) ? 1 : 0; diff -r e407fc4562f1 -r 9ee34c6950e0 postproc/swscale_template.c --- a/postproc/swscale_template.c Fri Oct 19 02:16:21 2001 +0000 +++ b/postproc/swscale_template.c Fri Oct 19 02:21:47 2001 +0000 @@ -71,7 +71,7 @@ // *** bilinear scaling and yuv->rgb conversion of yv12 slices: // *** Note: it's called multiple times while decoding a frame, first time y==0 // *** Designed to upscale, but may work for downscale too. -// s_xinc = (src_width << 8) / dst_width +// s_xinc = (src_width << 16) / dst_width // s_yinc = (src_height << 16) / dst_height void SwScale_YV12slice_brg24(unsigned char* srcptr[],int stride[], int y, int h, unsigned char* dstptr, int dststride, int dstw, int dstbpp, @@ -104,7 +104,7 @@ int canMMX2BeUsed; // we need that precission at least for the mmx2 code -s_xinc*= 256; +//s_xinc*= 256; s_xinc2=s_xinc>>1; canMMX2BeUsed= (s_xinc <= 0x10000 && (dstw&31)==0) ? 1 : 0;