SLAA361A July 2007 – August 2018 MSP430F169 , MSP430F169 , MSP430FG4618 , MSP430FG4618
DPCM encodes the analog audio input signal based on the difference between the current sample and the previous sample. Figure 1 shows a DPCM encoder and decoder block diagram. In this example, the signal difference, d(n), is determined using a signal estimate, Se(n), rather than the previous input. This method makes sure that the encoder uses the same information available to the decoder. If the true previous input sample were used by the encoder, an accumulation of quantization errors could occur. This accumulation would lead to a drift of the reconstructed signal from the original input signal. Use of the signal estimate in Figure 1 prevents drift from the original input signal in the reconstructed signal, Sr(n). The reconstructed signal, Sr(n), is the input to the predictor, which determines the next signal estimate, Se(n+1).
Figure 2 shows a small part of a recorded audio stream. Analog audio input samples (PCM values) and the differences between successive samples (DPCM values) are compared in the two diagrams.
The range of the PCM values is between 26 and 203, with a delta of 177 steps. The encoded DPCM values are within a range of –44 to 46, with a delta of 90 steps. Despite a quantizer step size of one, this DPCM encoding already shows a compression of the input data. The range of the encoded DPCM values could be further decreased by selecting a higher quantizer step size.