MAX_SAMPLING_DOWN_FACTOR
if (ret || input > MAX_SAMPLING_DOWN_FACTOR || input < 1)
if (ret != 1 || input > MAX_SAMPLING_DOWN_FACTOR || input < 1)