We establish the higher differentiability of solutions to a class of obstacle
problems for integral functionals where the convex integrand f satisfies
p-growth conditions with respect to the gradient variable. We derive that the
higher differentiability property of the weak solution v is related to the
regularity of the assigned , under a suitable Sobolev assumption on the partial
map that measures the oscillation of f with respect to the x variable. The main
novelty is that such assumption is independent of the dimension n and that, in
the case p<=n-2, improves previous known results