From bb8b752553f88e6285e8e4c7e15853eed865dc28 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 4 Sep 2014 03:49:10 +0200 Subject: [PATCH] postproc: use FFMIN/FFMAX where appropriate Signed-off-by: Michael Niedermayer --- libpostproc/postprocess.c | 16 ++++++++-------- libpostproc/postprocess_template.c | 8 ++++---- 2 files changed, 12 insertions(+), 12 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= d0){ - 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= d0){ - 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