Move check for source image dimensions behind padding to allow ConformanceWindowMode=2 to be used
ConformanceWindowMode=2 allows specifying padding manually. Without moving the check, it would not only be possible to add padding, if the specified image with/height is already a multiple of the minimum CU size.