use X265_MIN/X265_MAX to avoid GCC warnings
tpyo