comparison postproc/swscale_template.c @ 9921:61057de81510

mplayer idependant (not really yet) swscale example
author michael
date Thu, 17 Apr 2003 19:32:46 +0000
parents bc5b87370cd1
children 9deb7e948fa6
comparison
equal deleted inserted replaced
9920:cf5ae3f6175c 9921:61057de81510
2003 // Bilinear / Bicubic scaling 2003 // Bilinear / Bicubic scaling
2004 static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW, int xInc, 2004 static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW, int xInc,
2005 int16_t *filter, int16_t *filterPos, int filterSize) 2005 int16_t *filter, int16_t *filterPos, int filterSize)
2006 { 2006 {
2007 #ifdef HAVE_MMX 2007 #ifdef HAVE_MMX
2008 assert(filterSize % 4 == 0 && filterSize>0);
2008 if(filterSize==4) // allways true for upscaling, sometimes for down too 2009 if(filterSize==4) // allways true for upscaling, sometimes for down too
2009 { 2010 {
2010 int counter= -2*dstW; 2011 int counter= -2*dstW;
2011 filter-= counter*2; 2012 filter-= counter*2;
2012 filterPos-= counter/2; 2013 filterPos-= counter/2;