diff --git a/postproc/swscale.c b/postproc/swscale.c index dc52b2677e..7acdfbd074 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