d applying some simple math leads us to (4.31) (4.32) Source Coding and Decoding: Making it Digital mse-12 (4.33) mse== (4.34) As we'll now see, once you've got the mse of the quantizer, it's easy to get the SQNR. In what follows, we compute the SQNR assuming that the interval of [a,b] (shown in Figure 4.16(a)) corresponds to [-A, A]. Starting with the basic SQNR equation, we have f(x-xm)p(x) dx (4.35) [(x)2 p(x) dx (4.36) SQNR= (4.37) Next, we'll get a new value for A that allows us to simplify this equation even further. Referring to Figure 4.16(b), we see N steps of size A between [a,b] = [-A,A]. It follows that NA = 2A, or, equivalently A = 2A/N. Plugging this into the SQNR equation leads to SQNR = N2 (4.38) Creating the Good Quantizer Very simply, we can compute the mse or SQNR of a quantizer, and if the mse is small or the SQNR is large, then we can say we've got a good quantizer! In this section, we'll talk about how to build the very best quantizers for any given input. First off, let me explain what I mean by building a good quantizer. We'll use Figure 4.17 to help us out. Notice that you know everything about a quantizer, if you know two things: (1) the codewords y1,Y2,... ,Yn; that is, the N values that the quantizer allows as output; and (2) the cells R1,R2,...,RN in other words, the values of input X that are mapped by the quantizer to y1, the values of input X mapped to Y2, and SO on. Specifying these values is what I mean by building a quantizer. Chapter Four To help us in building the best quantizer, we'll assume that the amplitude distribution of the quantizer input X is given. That is, if X (t) is the quantizer input, we'll assume we know the likelihood that x(t) has a particular amplitude x at any time t. Mathematically, we're assuming we know Px (x), , the likelihood that x(t) has R1 R2 R3 R 4 amplitude x at any given time. The First Method: Two Rules and an Algorithm This method for building the best quantizer is SO easy you' 'll whop yourself on the head and say "I could have thought of that