Optimal Vortex Pinning in YBa2Cu3O7-x Superconducting Films Up to Very High Magnetic Fields