<p> Subband coding</p><p>Extension of Nyquist theorem: If a signal is band limited to a frequency range (f1 to f2) and if f1 and f2 satisfy certain criteria then the signal can be recovered from the sampled data provided fs >= 2(f2 – f1) samples/sec. Filters: Section 14.3/Pg 428</p><p>Xn Yn</p><p> input output </p><p>1,0,0,0,…. hn</p><p> hn = Impulse Response</p><p>N M </p><p>Yn = ai Xn-i + biYn-i ………Eq 14.8</p><p> i = 0 i = 0</p><p>Infinite Impulse Response, IIR filter.</p><p>FIR: Finite Impulse Response, FIR filter.</p><p>N</p><p>Yn = ai Xn-i</p><p> i = 0</p><p>FIR Filter</p><p>Yn = a0Xn + a1Xn-1 + a2Xn-2 + …….. + aNXn-N </p><p>Unit impulse 1,0,0,0,0,…….,0</p><p>Y0 = a0 , Y1 = a1 , Y2 = a2 ,……….., YN = aN , </p><p>(YN+1 = YN+2 = YN+3 =………= 0) Finite Impulse Response</p><p>Xn Yn</p><p>Digital filter</p><p>M</p><p>Yn = hk Xn-k Discrete convolution </p><p> k = 0 M is finite – FIR filter M is infinite – IIR filter</p><p>Yn = h0Xn + h1Xn-1 + h2Xn-2 +……+ hMXn-M</p><p> hi , 0<=i<=M are taps or weights</p><p>(h0, h1, h2, …… ,hM) </p><p>14.3.1 Some filters used in Subband Coding</p><p>QMF – Quadrature Mirror filters</p><p> n LPF -> { hn}, HPF -> { (-1) hN-1-n}, </p><p>Let N = 8, LPF (h0, h1, h2, h3, h4, h5, h6, h7)</p><p>HPF (h7, -h6, h5, -h4, h3, -h2, h1,-h0) </p><p>Symmetric filters</p><p>LPF hN-1-n = hn n = 0,1,…., N -1 2 </p><p>Let N = 8, LPF symmetric (h0, h1, h2, h3, h4, h5, h6, h7)</p><p>(h0, h1, h2, h3, h3, h2, h1, h0) </p><p>These are linear phase filters QMF – Quadrature Mirror filters</p><p> n For QMF, HPF -> {(-1) hN-1-n} n {(-1) hLP,n}</p><p>HPF antisymmetric (h0, -h1, h2, -h3, h3, -h2, h1,-h0)</p><p>When LPF is symmetric, HPF is antisymmetric</p><p>See Tables 14.1, 14.2 on Pg433 & 14.3 on Pg 434</p><p>Johnston LPF, # of taps 8, 16 & 32</p><p>From these you can get the taps for HPF.</p><p>FIF Filter</p><p> xn yn</p><p>M yn = hkXn-k</p><p>K=0</p><p> hk k = 0,1,…,M are filter taps, weights or coefficients</p><p>Yn = h0Xn + h1Xn-1 + h2Xn-2 +……+ hMXn-M</p><p>Y0 = h0Xn + h1X-1 + h2X-2 +……+ hMX-M</p><p>Y1 = h0X1 + h1X0 + h2X-1 +……+ hMX1-M</p><p>Original pixels -> X0 X1 X2 X3 X4 X5 X6 ……… XnXn+1</p><p>Reflected pixels at the boundary -> X-7 X-6 X-5 X-4 X-3 X-2 X-1</p><p>………. X6 X5 X4 X2 X1 X0 </p><p>7 </p><p>Johnston LPF (Table 14.1/ Pg 433) yn = hkXn-k </p><p> k=0</p><p>Y0 = h0X0 + h1X-1 + h2X-2 + h3X-3 + …… + h7X-7</p><p>Y1 = h0X1 + h1X0 + h2X-1 + h3X-2 + …… + h7X-6</p><p>Y2 = h0X2 + h1X1 + h2X0 + h3X-1 + …… + h7X-5 </p><p>Let N = 8, LPF symmetric (h0, h1, h2, h3, h4, h5, h6, h7)</p><p>(h0, h1, h2, h3, h3, h2, h1, h0)</p><p>HPF antisymmetric (h0, -h1, h2, -h3, h3, -h2, h1, -h0)</p><p>When LPF is symmetric, HPF is antisymmetric</p><p>Symmetric filter = hLP,n hn = hN-1-n LPF n = 0,1,…..,N/2 -1</p><p> n HPF Antisymmetric (-1) hN-1-n n hHP,n = (-1) hLP,n</p><p>Two channels Filter Banks</p><p>LP DECIMATION INTERPOLATION LP</p><p>X(n) X(n)</p><p>HP HP</p><p>Decimation filters h0(n) = hLP(n)</p><p> h1(n) = hHP(n)</p><p>Interpolation filters g0(n) = gLP(n)</p><p> g1(n) = gHP(n)</p><p>QMF – Quadrature Mirror filters</p><p>H0(w) H1(w)</p><p>GAIN LPF HPF QMF</p><p>0 90 180 w</p><p>H1(w) = H0(w+180) n h1(n) = (-1) h0(n)</p><p>X(w) = A + B</p><p>= 0.5 [ G0(w)H0(w) + G1(w)H1(w)]X(w) + 0.5 [ G0(w)H0(w+180) + G1(w)H1(w+180)]X(w+180) </p><p>For X(w) = X(w) part B of the above equation should be zero.</p><p>PR : Perfect Reconstruction Ref 1. B.Porat, “A course in DSP”, Wiley, pages 465 – 469 and 488 – 492, 1997. 2. H.M.Hang and J.W.Woods (Eds), “Handbook of visual Communications” Academic press, Ch.8, 1995.</p><p>G0(z) = CH0(z), G1(z) =- CH1(z), G0(z) = CH1(-z), G1(z) = -CH1(z) , c = constant</p><p>G0(w) = C H1(w+180), G1(w) = -C H0(w+180) implies </p><p> g0(n) = n C(-1) h1(n) </p><p> g1(n) = n C(-1) h0(n)</p><p> h1(n) = (- n 1) h0(n)</p><p>OR</p><p> g0(n) = Ch0(n) = gLP(n) = ChLP(n)</p><p> g1(n) = -Ch1(n) = gHP(n) = -ChHP(n)</p><p>Linear phase QMF</p><p> hLP(n) = h0(n) = h0(N-1-n), n=0,1,…, N - 1 (symmetric) 2</p><p> n 2 2 hHP(n) = h1(n) = (-1) h0(N-1-n), n=0,1,…....,N-1 (antisymmetric) X(z) = C/2 [H0 (z) – H1 (z)]X(z) 2 X(z) = A + B</p><p>= C [G0(z) H0(z) + G1(z)H1(z)]X(z) + C [G0(z) H0(-z) + G1(z)H1(-z)]X(-z) 2 2 For PR the part B of the above equation should be zero</p><p>1:2 Interpolation</p><p>{X0 X1 X2 X3 X4…………} {X0 i0 X1 i1 X2 i2 X3 i3……….} </p><p>{X0 0 X1 0 X2 0 X3 0 X4…………}</p><p>Note that the original pels (samples) {X0 X1 X2 X3 X4…………} stay the same after interpolation. Interpolated pels are {i0 i1 i2 i3……} inserted between adjacent original pels.</p><p>2:1 Decimation</p><p>{X0 X2 </p><p>X4 X6 …………} {X0 X1 X2 X3 X4 X5 …………} {X0 X1 X2 X3 X4 X5 …………} </p><p>After applying the filter to the original samples {X0 X1 X2 X3 X4 X5 …………} just delete every other sample to get {X0 X2 X4 X6 </p><p>…………}</p><p>PCM, VQ, DPCM, ADPCM, transform etc. adaptive to the specific subband</p><p>Inverse operations based on the encoder</p><p>Quantization and Coding bit allocation among the M subbands based on the information content. Follow steps similar to SQ. M 2 2 Rk = R + 0.5 log2(theta0l ) – 0.5 M log2(theta0l )</p><p> l=1 M </p><p>Where R = (1/M) Rk is the average # of bits/sample </p><p> k=1 </p><p>Rk is # of bits assigned to sample k M:1 decimation or subsampling keep only every Mth sample. Delete the other samples.</p><p>1:M Interpolation or unsampling</p><p>Interpolate (Fill up) between adjacent two original samples by (M-1) zeros.</p><p>Original samples: X0 X1 X2 X3 X4……. </p><p>1:2 interpolation: X0 i0 X1 i1 X2 i2 X3 i3 X4………………..</p><p>M Band QMF filter bank Apply the above filter at every stage Aliasing between the bands 2 4 A(z) = HL(z) HL(z ) HL(z )</p><p>If HL(z) corresponds to 4 – tap filter A(z) corresponds to 3x6x12 = 216 tap filters See discussion on bottom of pg 434. </p><p>Application to Speech Coding – G.722 (64, 48, 56 Kbps)</p><p>Wideband coding of speech</p><p>Audio signal </p><p>6 bp sample</p><p>(can drop 1 or 2 LSB) </p><p> fs = 8KHz</p><p>2 bp sample</p><p> fs = 8KHz</p><p> fs = 16KHz 6 bp sample </p><p>Audio Signal out</p><p> fs = 16KHz 2 bp sample Quantizer in ADPCM : Variation of Jayant Quantizer</p><p>QMF , LPF symmetric hn = hN-1-n , n = 0, 1,2,…..,[(N/2) – 1] </p><p> n hHP,n = (-1) hLP,n </p><p>HPF is antisymmetric LPF</p><p>1] W.C.Chu, “Speech Coding Algorithms”, Hoboken, NJ: Wiley, 2003. 2] R.Goldberg, “A practical handbook of speech coders”, Boca Ratan, FL: CRC Press, 1999.</p><p>Application to audio coding (MPEG audio)</p><p>MPEG-1 audio Layer 1,2,3 Layer 1,2 bank of 32 filters (32 subbands) Psychoacoustic model assigns # of bits to code each subband (Masking properties of human ear) MP3 is MPEG-1 Layer-3 audio (www.mpeg.org) 3] M.Bosi and R.E.Goldberg, “Introduction to digital audio coding standards”, Norwell, MA, Kluwer, 2002.</p><p>Application to image compression</p><p>2-D filters implemented by 1-D separable [N x (N/2)] 3 IN 4 All at (N/2 X N/2) resolution </p><p>(NXN) </p><p>[N x (N/2)] 5</p><p>6 </p><p>Subband Encoder</p><p> fy fy</p><p>4 6 1 2 3 5</p><p> fx fx</p><p>R = Rows C = Columns</p><p>(NXN/2)</p><p>(NXN/2) </p><p>(NXN) </p><p>All at (N/2 X N/2) resolution </p><p>OUT (NXN) </p><p>(NXN/2) </p><p>(NXN)</p><p>(NXN/2) </p><p>SUBBAND DECODER</p><p>Use reflection at borders</p><p>LPF yn = (Xn + Xn-1)/0.5 HPF = (Xn - Xn-1)/0.5</p><p>Application to image compression</p><p>LPF = {h0 h1 h2 h3 h3 h2 h1 h0}</p><p>HPF = {h0 -h1 h2 -h3 h3 -h2 h1 -h0}</p><p>N-1 yn = hk Xn-k ; hN-1-n = hn n = 0,1,2….,N -1 Symmetric LPF</p><p>K=0 2</p><p>N = 8</p><p> y0 = [h0x0+ h1x-1 + h2x-2 + h3x-3 + ….. + h7x-7] y1 = [h0x1+ h1x-0 + h2x-1 + h3x-2 + ….. + h7x-6] y2 = [h0x2+ h1x1 + h2x0 + h3x-1 + ….. + h7x-5] </p><p> wx</p><p>(0,0) LOW HIGH</p><p>LOW LL LH </p><p>DPCM DISCARD wy</p><p>HL HH</p><p>HIGH </p><p>SQ DISCARD</p><p>8 - Tap Johnson filter (Table 14.1/ p433)</p><p>16 - Tap Johnson filter (Table 14.2/ p433) Decomposition of Sinan Image 8 - Tap Smith Barnwell filter (Table 14.4/ p434)</p><p>Decomposition of Sinan Image Sinan Image coded at 0.5bpp using 8 tap Johnston filter</p><p>DPCM (1bpp)</p><p> wx</p><p> wy LH LL</p><p>Discard HL HH</p><p>SQ (1bpp)</p><p>Sinan Image coded at 0.5bpp using 8 tap Smith - Barnwell filter 2bpp(DPCM)</p><p> wx </p><p> wy LL LH</p><p>HL HH</p><p>Discard Apply VQ to some of the bands.</p><p>Bit allocation among subbands: Given M equal bands (M subbands), assume filter outputs are scalar quantized.</p><p>M</p><p>R = 1 Rk = Avarage # of bits/sample ……………. Eq 13.51</p><p>M k=1</p><p>(Rk = # of bits/sample at the output of the kth filter)</p><p>Reconstruction error variance for kth Quantizer.</p><p>2 -2 Rk 2 tau Rk = tau k 2 tau yk ……………. Eq 13.52</p><p>Lagrange Variable technique is very powerful. Total error in reconstruction M M 2 2 -2 Rk 2 tau Rk = tau Rk = alpha 2 tau yk ……………. Eq 13.53</p><p> k=1 k=1</p><p>(Assume alphak = alpha, a constant for all k)</p><p>M</p><p>Minimize Eq 13.53 subject to ( R – 1 Rk ) = 0</p><p>M k=1 </p><p>Lagrange Variable</p><p>Minimize WRT Rk constraint</p><p>M -2 Rk 2 J = alpha 2 tau yk - ( R – 1 Rk) ……………. Eq 13.54</p><p> k=1 M k=1</p><p>Set dJ = 0 to get</p><p> dRl</p><p>2 -2 Rl alpha dj (tau yl 2 ) + = 0</p><p> dRl M</p><p>2 2Rl alpha tauyl d (1) + = 0</p><p> dRl 2 M</p><p> u u d(a ) = a (logea)du</p><p>Hence, 2 2Rl alpha tauyl (0.5) [loge0.5] 2 + = 0 M</p><p>2 -2Rl (ln 2)* (2 alpha tauyl ) * 2 = …………………Eq 13.58 M</p><p>2 log2[(2 * alpha * tauyl ) ln 2 ] – 2Rl = log2 ( ) …………………Eq 12.55 M</p><p>M M 2 R = 1 Rk = 1 log2[ 2 alpha tauyk ln2] - 1 log2( ) K=1 M K=1 2M 2 M</p><p>M 2 log2 ( ) = 1 log2 [2 * alpha * tauyk ln2]</p><p>M M K=1 </p><p>M 2 1/M -2R = (2 alpha tauyk ln2) 2 …………………Eq 13.56</p><p>M K=1</p><p>Substitute 11.38 in 11.37</p><p>M 2 2 1/M -2R Rk = 1 log2 [2 alpha tauyk ln2] - 1 log2[ (2 alpha tauyl ln2) 2 ] 2 2 l=1</p><p>M 2 2 Rk = 0.5 log2[2 alpha tauyk ln2] – 1 log2(2 alpha tauyl ln2) + R 2M l=1</p><p>LPF : 8 – tap Johnston LPF</p><p>Let N = 8, LPF symmetric (h0, h1, h2, h3, h4, h5, h6, h7)</p><p>(h0, h1, h2, h3, h3, h2, h1, h0) 7</p><p>-jnw Symmetric filter frequency response is hn e n=0</p><p>(h0 = hN-1-n) (Assume T = 1)</p><p>HPF = (h0, -h1, h2, -h3, h3, -h2, h1, -h0) jw -j7w -jw -j6w -j2w -j5w -j3w -j4w For Symmetric filter H(e ) is [ h0 + h7e + h1e + h6e + h2e + h5e + h3e + h4e ] j(7/2)w -j(7/2)w j(5/2)w -j(5/2)w j(3/2)w -j(3/2)w -j(1/2)w -j(1/2)w = [ (h0)(e + e ) + (h1)(e + e ) + (h2)(e + e ) + (h3)(e + e )</p><p>For symmetric filter h0 = h7, h1 = h6, h2 = h5, h3 = h4</p><p> jw -j(7w/2) LPF H(e ) = 2[h0 cos(7w/2) + h1 cos(5w/2) + h2 cos(3w/2) + h3 cos(w/2)]e</p><p>Linear Phase Filter: FIR filter</p><p> jw -j(7w/2) HPF(antisymmetric): H(e ) = 2[h0sin(7w/2) – h1sin(5w/2) – h2sin(3w/2) – h3sin(w/2) ]je</p><p> hn = impulse response</p><p>N-1 jwt -jwnT H(e ) = hn e</p><p> n= 0 T = Sampling interval, normalize this to one</p><p>N = 0 jwT jwnT H(e ) = hn e = H(w)</p><p> n= 0</p><p>Frequency Response H(ejw) = H(ejw+2 ) , periodic with a period of 2 </p><p> jw when hn is real, |H(e )| vs w magnitude response is an even function at w=0 and phase response is an odd function at w = 0</p>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages22 Page
-
File Size-