aptx: simplify by pre-calculating factor_max