Inelastic 1 GeV proton scattering from carbon and oxygen