From: Michael Niedermayer Date: Tue, 29 Jan 2002 01:43:15 +0000 (+0000) Subject: area averageing scaling support (-sws 5) (is identical to bilinear for upscale) X-Git-Tag: v0.5~18055 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8863d37e2a266820b1faffcb19f9bd385a0ecee;p=platform%2Fupstream%2Flibav.git area averageing scaling support (-sws 5) (is identical to bilinear for upscale) Originally committed as revision 4403 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc --- diff --git a/postproc/swscale.c b/postproc/swscale.c index dc52b26..7acdfbd 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -604,6 +604,7 @@ void SwScale_YV12slice(unsigned char* src[], int srcStride[], int srcSliceY , case 2: flags|= SWS_BICUBIC; break; case 3: flags|= SWS_X; break; case 4: flags|= SWS_POINT; break; + case 5: flags|= SWS_AREA; break; default:flags|= SWS_BILINEAR; break; } @@ -666,7 +667,7 @@ static inline void initFilter(int16_t **outFilter, int16_t **filterPos, int *out int xDstInSrc; if (flags&SWS_BICUBIC) filterSize= 4; else if(flags&SWS_X ) filterSize= 4; - else filterSize= 2; + else filterSize= 2; // SWS_BILINEAR / SWS_AREA // printf("%d %d %d\n", filterSize, srcW, dstW); filter= (double*)memalign(8, dstW*sizeof(double)*filterSize); @@ -705,6 +706,7 @@ static inline void initFilter(int16_t **outFilter, int16_t **filterPos, int *out } else { + //Bilinear upscale / linear interpolate / Area averaging for(j=0; j