Estimation of layer parameters for linear P- and S-wave velocity functions