Improve output picture quality.
Make scaling a two-step process: Perform nearest neighbor integer scaling into an intermediate buffer and then scale to the screen resolution using linear filtering.