diff options
author | Luca Abeni <lucabe72@email.it> | 2006-12-26 18:08:40 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2006-12-26 18:08:40 +0000 |
commit | b2afecbe02824109300d82c3da1cdb722cda5b28 (patch) | |
tree | 356e2935a7ea08d51d7f130e8a2a157259e4f511 /libswscale/swscale.c | |
parent | 789237cad0fe4344d8c0e32b9508b0601df23dd2 (diff) | |
download | ffmpeg-b2afecbe02824109300d82c3da1cdb722cda5b28.tar.gz |
change all the occurrences of "FFMIN(FFMAX())" to clip_uint8() or clip()
Originally committed as revision 21776 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 6bd80235b5..ecb5f7a7ee 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -308,7 +308,7 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt for(j=0; j<lumFilterSize; j++) val += lumSrc[j][i] * lumFilter[j]; - dest[i]= FFMIN(FFMAX(val>>19, 0), 255); + dest[i]= clip_uint8(val>>19); } if(uDest != NULL) @@ -323,8 +323,8 @@ static inline void yuv2yuvXinC(int16_t *lumFilter, int16_t **lumSrc, int lumFilt v += chrSrc[j][i + 2048] * chrFilter[j]; } - uDest[i]= FFMIN(FFMAX(u>>19, 0), 255); - vDest[i]= FFMIN(FFMAX(v>>19, 0), 255); + uDest[i]= clip_uint8(u>>19); + vDest[i]= clip_uint8(v>>19); } } @@ -341,7 +341,7 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil for(j=0; j<lumFilterSize; j++) val += lumSrc[j][i] * lumFilter[j]; - dest[i]= FFMIN(FFMAX(val>>19, 0), 255); + dest[i]= clip_uint8(val>>19); } if(uDest == NULL) @@ -359,8 +359,8 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil v += chrSrc[j][i + 2048] * chrFilter[j]; } - uDest[2*i]= FFMIN(FFMAX(u>>19, 0), 255); - uDest[2*i+1]= FFMIN(FFMAX(v>>19, 0), 255); + uDest[2*i]= clip_uint8(u>>19); + uDest[2*i+1]= clip_uint8(v>>19); } else for(i=0; i<chrDstW; i++) @@ -374,8 +374,8 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil v += chrSrc[j][i + 2048] * chrFilter[j]; } - uDest[2*i]= FFMIN(FFMAX(v>>19, 0), 255); - uDest[2*i+1]= FFMIN(FFMAX(u>>19, 0), 255); + uDest[2*i]= clip_uint8(v>>19); + uDest[2*i+1]= clip_uint8(u>>19); } } @@ -1458,7 +1458,7 @@ static void globalInit(void){ // generating tables: int i; for(i=0; i<768; i++){ - int c= FFMIN(FFMAX(i-256, 0), 255); + int c= clip_uint8(i-256); clip_table[i]=c; } } |