Fix integer scale,custom aspect ratio

maybe max_width max_height need to be clamped to rtwi/he as well