summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 02:21:47 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-19 02:21:47 +0000
commit793efa116b6b61193dc13f8847a37424e13e1112 (patch)
tree82165a44eaa877a9882c496976934603665fe36c /postproc
parent2a680c8d21deddedeafac3cdb380a8c2ff7fcd22 (diff)
downloadmpv-793efa116b6b61193dc13f8847a37424e13e1112.tar.bz2
mpv-793efa116b6b61193dc13f8847a37424e13e1112.tar.xz
xinc scaled by 16 instead of 8
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2275 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale.c4
-rw-r--r--postproc/swscale_template.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 02e9650892..3b0e7b9e15 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -71,7 +71,7 @@ static uint8_t funnyUVCode[10000];
// *** 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 @@ static int s_xinc2_diff=0;
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 --git a/postproc/swscale_template.c b/postproc/swscale_template.c
index 02e9650892..3b0e7b9e15 100644
--- a/postproc/swscale_template.c
+++ b/postproc/swscale_template.c
@@ -71,7 +71,7 @@ static uint8_t funnyUVCode[10000];
// *** 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 @@ static int s_xinc2_diff=0;
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;