ScaleAndCenter computes scale factors and centering offsets to fit a
display-sized image (displayW x displayH) from a source (sourceW x sourceH)
into the screen (screenW x screenH).
Size computes the display dimensions for the given aspect ratio mode,
fitting within screenW x screenH while preserving the chosen ratio.
sourceW/sourceH are the native pixel dimensions and par is the pixel aspect
ratio (used only for "dar" mode).