diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-09-04 05:49:10 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-04 05:50:46 +0400 |
commit | bb8b752553f88e6285e8e4c7e15853eed865dc28 (patch) | |
tree | 13a66180ed7b683aeaa3d2b6be38dee84bed35d5 /libpostproc/postprocess.c | |
parent | 17ad5fbb8af3ea3fad689064bc84ecfdfe52f0c2 (diff) |
postproc: use FFMIN/FFMAX where appropriate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libpostproc/postprocess.c')
-rw-r--r-- | libpostproc/postprocess.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c index a557fb8e69..01ec0f9867 100644 --- a/libpostproc/postprocess.c +++ b/libpostproc/postprocess.c @@ -318,13 +318,13 @@ static inline void doHorizDefFilter_C(uint8_t dst[], int stride, const PPContext if(q>0) { - d= d<0 ? 0 : d; - d= d>q ? q : d; + d = FFMAX(d, 0); + d = FFMIN(d, q); } else { - d= d>0 ? 0 : d; - d= d<q ? q : d; + d = FFMIN(d, 0); + d = FFMAX(d, q); } dst[3]-= d; @@ -515,11 +515,11 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step, d*= FFSIGN(-middleEnergy); if(q>0){ - d= d<0 ? 0 : d; - d= d>q ? q : d; + d = FFMAX(d, 0); + d = FFMIN(d, q); }else{ - d= d>0 ? 0 : d; - d= d<q ? q : d; + d = FFMIN(d, 0); + d = FFMAX(d, q); } src[3*step]-= d; |