Pat Farrell;182627 Wrote: > Muggy wrote: > > The upsampling involves simply adding zeros after each data point to > > pad the data out - 146 zeros after every data point. This leaves > the > > frequency content unmolested over the bandwidth of the original > > signal. > > I don't think this is correct. > I'm not even sure where you would "add zeros" to anything. > > There are two approaches to upsampling. I'll take an easy example. > Assume you have a 44.1khz signal and want to to be 88.2kHz. Also assume > > that the PCM data looks like > 0, 2, 4, 6, 7 for the first samples. > To upsample it, you first double the number of data points. > 0, 0, 2, 2, 4, 4, 6, 6, 7, 7 > Then you can decide if you want to leave the data 'as is' with > duplication, or if you want to do some interpolation. > You could, for example, do simple linear interpolation, giving > 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, > Or you could do a higher order quadratic or other functional > smoothing. > > Then to reduce the sample rate, you just throw away data. So to go from > > this 88.2 to 44.1, you just pick every other sample. > this would give you, tada, 0, 2, 4, 6, 7 > > Now, if you want to widen the data, say from 16 bits to 24, the crude > approach is to just add 8 bits of zeros to each value. But adding zeros > > doesn't address the sample rate.
I think that both those method would change the frequency content of the signal. By adding zeros between samples, the frequency content is mirrored/repeated at higher frequencies and this can then be removed by filtering leaving an upsampled signal with the same frequency content as the original. Taking your example:- 0, 2, 4, 6, 7 @44.1kHz becomes 0, 0, 2, 0, 4, 0, 6, 0, 7, 0 @88.2kHz this is then passed through a low-pass digital filter with a cut-off frequency set to the bandwidth of the original signal. The result will be an upsampled signal with the same spectral content as the original. -- Muggy ------------------------------------------------------------------------ Muggy's Profile: http://forums.slimdevices.com/member.php?userid=2258 View this thread: http://forums.slimdevices.com/showthread.php?t=32958 _______________________________________________ audiophiles mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/audiophiles
