Ray amplitudes are computed in a one-dimensional velocity structure where the quality factor Q varies continuously with depth. An iterative process is then proposed to derive the quality factor distribution in the upper crust from deep sounding data. Results for compressional waves in the French Massif Central and for a signal frequency close to 20 Hz show that Q increases in a rather linear way from about 40 in surface up to 600 at 7 km depth. Q seems to be higher in the Central Alps: 180 in surface, 1600 at 5 km depth (at 20 Hz). Using proper signal processing, the frequency dependence of Q is finally investigated in the frequency range 10-25 Hz. The results indicate a dependence of the form Q = QofQ, where a! = 0.25 k 0.1.