swscale: refactor vertical scaler