diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2001-11-29 20:19:17 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2001-11-29 20:19:17 +0000 |
commit | d1fac6cf5299eb6b2f628b95c5e9f02c0af35f48 (patch) | |
tree | 4c270ae11850c12419a72d0117f3e4e1e16e13e0 /postproc/swscale.c | |
parent | 6e9b48406c417947d65323fa12162cf3356eb82a (diff) | |
download | ffmpeg-d1fac6cf5299eb6b2f628b95c5e9f02c0af35f48.tar.gz |
swscaler cleanup
green line at bottom bugfix
green lines in yuv2yuv scaler bugfix
Originally committed as revision 3210 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale.c')
-rw-r--r-- | postproc/swscale.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index 156d6cc0d8..580fe53c3d 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -7,6 +7,7 @@ #include <inttypes.h> #include <string.h> +//#include <stdio.h> //FOR DEBUG ONLY #include "../config.h" #include "swscale.h" #include "../cpudetect.h" @@ -222,39 +223,34 @@ void in_asm_used_var_warning_killer() // *** bilinear scaling and yuv->rgb or yuv->yuv 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 << 16) / dst_width -// s_yinc = (src_height << 16) / dst_height // switching the cpu type during a sliced drawing can have bad effects, like sig11 -void SwScale_YV12slice(unsigned char* srcptr[],int stride[], int y, int h, - uint8_t* dstptr[], int dststride, int dstw, int dstbpp, - unsigned int s_xinc,unsigned int s_yinc){ +void SwScale_YV12slice(unsigned char* srcptr[],int stride[], int srcSliceY , + int srcSliceH, uint8_t* dstptr[], int dststride, int dstbpp, + int srcW, int srcH, int dstW, int dstH){ -// scaling factors: -//static int s_yinc=(vo_dga_src_height<<16)/vo_dga_vp_height; -//static int s_xinc=(vo_dga_src_width<<8)/vo_dga_vp_width; #ifdef RUNTIME_CPUDETECT #ifdef CAN_COMPILE_X86_ASM // ordered per speed fasterst first if(gCpuCaps.hasMMX2) - SwScale_YV12slice_MMX2(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_MMX2(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); else if(gCpuCaps.has3DNow) - SwScale_YV12slice_3DNow(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_3DNow(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); else if(gCpuCaps.hasMMX) - SwScale_YV12slice_MMX(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_MMX(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); else - SwScale_YV12slice_C(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_C(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #else - SwScale_YV12slice_C(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_C(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #endif #else //RUNTIME_CPUDETECT #ifdef HAVE_MMX2 - SwScale_YV12slice_MMX2(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_MMX2(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #elif defined (HAVE_3DNOW) - SwScale_YV12slice_3DNow(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_3DNow(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #elif defined (HAVE_MMX) - SwScale_YV12slice_MMX(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_MMX(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #else - SwScale_YV12slice_C(srcptr, stride, y, h, dstptr, dststride, dstw, dstbpp, s_xinc, s_yinc); + SwScale_YV12slice_C(srcptr, stride, srcSliceY, srcSliceH, dstptr, dststride, dstbpp, srcW, srcH, dstW, dstH); #endif #endif //!RUNTIME_CPUDETECT |