1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

postproc: use FFMIN/FFMAX where appropriate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-09-04 03:49:10 +02:00
parent 17ad5fbb8a
commit bb8b752553
2 changed files with 12 additions and 12 deletions

View File

@ -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;

View File

@ -1073,11 +1073,11 @@ static inline void RENAME(doVertDefFilter)(uint8_t src[], int stride, PPContext
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[l4]-= d;