(gfx/scaler) Get rid of some unnecessary ifs
This commit is contained in:
parent
46b6b112b8
commit
8fdf7299f6
|
@ -25,8 +25,7 @@ static inline uint8_t clamp_8bit(int val)
|
||||||
return 255;
|
return 255;
|
||||||
else if (val < 0)
|
else if (val < 0)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
return (uint8_t)val;
|
||||||
return (uint8_t)val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -101,8 +101,7 @@ static inline double filter_sinc(double phase)
|
||||||
{
|
{
|
||||||
if (fabs(phase) < 0.0001)
|
if (fabs(phase) < 0.0001)
|
||||||
return 1.0;
|
return 1.0;
|
||||||
else
|
return sin(phase) / phase;
|
||||||
return sin(phase) / phase;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gen_filter_sinc_sub(struct scaler_filter *filter, int len, int pos, int step, double phase_mul)
|
static void gen_filter_sinc_sub(struct scaler_filter *filter, int len, int pos, int step, double phase_mul)
|
||||||
|
|
Loading…
Reference in New Issue