Contents Part I Prelude 1 Introduction... 3 1.1 Audio Coding... 4 1.2 Basic Idea... 6 1.3 Perceptual Irrelevance... 8 1.4 Statistical Redundancy... 9 1.5 Data Modeling... 9 1.6 Resolution Challenge... 11 1.7 Perceptual Models... 13 1.8 Global Bit Allocation... 13 1.9 Joint Channel Coding... 14 1.10 Basic Architecture... 14 1.11 Performance Assessment... 16 Part II Quantization 2 Scalar Quantization... 19 2.1 Scalar Quantization... 21 2.2 Re-Quantization... 23 2.3 Uniform Quantization... 24 2.3.1 Formulation... 24 2.3.2 Midtread and Midrise Quantizers... 25 2.3.3 Uniformly Distributed Signals... 27 2.3.4 Nonuniformly Distributed Signals... 28 2.4 Nonuniform Quantization... 33 2.4.1 Optimal Quantization and Lloyd-Max Algorithm... 35 2.4.2 Companding... 39 3 Vector Quantization... 43 3.1 The VQ Advantage... 43 3.2 Formulation... 46 3.3 Optimality Conditions... 48 xi
xii Contents 3.4 LBG Algorithm... 48 3.5 Implementation... 49 Part III Data Model 4 Linear Prediction... 53 4.1 Linear Prediction Coding... 53 4.2 Open-Loop DPCM... 55 4.2.1 Encoder and Decoder... 55 4.2.2 Quantization Noise Accumulation... 57 4.3 DPCM... 59 4.3.1 Quantization Error... 59 4.3.2 Coding Gain... 60 4.4 Optimal Prediction... 61 4.4.1 Optimal Predictor... 61 4.4.2 Levinson Durbin Algorithm... 63 4.4.3 Whitening Filter... 65 4.4.4 Spectrum Estimator... 68 4.5 Noise Shaping... 69 4.5.1 DPCM... 69 4.5.2 Open-Loop DPCM... 71 4.5.3 Noise-Feedback Coding... 71 5 Transform Coding... 73 5.1 Transform Coder... 73 5.2 Optimal Bit Allocation and Coding Gain... 76 5.2.1 Quantization Noise... 76 5.2.2 AM GM Inequality... 77 5.2.3 Optimal Conditions... 78 5.2.4 Coding Gain... 79 5.2.5 Optimal Bit Allocation... 80 5.2.6 Practical Bit Allocation... 81 5.2.7 Energy Compaction... 82 5.3 Optimal Transform... 82 5.3.1 Karhunen Loeve Transform... 83 5.3.2 Maximal Coding Gain... 84 5.3.3 Spectrum Flatness... 85 5.4 Suboptimal Transforms... 85 5.4.1 Discrete Fourier Transform... 86 5.4.2 DCT... 88 6 Subband Coding... 91 6.1 Subband Filtering... 91 6.1.1 Transform Viewed as Filter Bank... 92 6.1.2 DFT Filter Bank... 93 6.1.3 General Filter Banks... 94
Contents xiii 6.2 Subband Coder... 96 6.3 Reconstruction Error... 97 6.3.1 Decimation Effects... 98 6.3.2 Expansion Effects...100 6.3.3 Reconstruction Error...102 6.4 Polyphase Implementation...103 6.4.1 Polyphase Representation...103 6.4.2 Noble Identities...107 6.4.3 Efficient Subband Coder...109 6.4.4 Transform Coder...109 6.5 Optimal Bit Allocation and Coding Gain...110 6.5.1 Ideal Subband Coder...110 6.5.2 Optimal Bit Allocation and Coding Gain...111 6.5.3 Asymptotic Coding Gain...112 7 Cosine-Modulated Filter Banks...115 7.1 Cosine Modulation...115 7.1.1 Extended DFT Bank...116 7.1.2 2M -DFT Bank...117 7.1.3 Frequency-Shifted DFT Bank...119 7.1.4 CMFB...120 7.2 Design of NPR Filter Banks...122 7.3 Perfect Reconstruction...123 7.4 Design of PR Filter Banks...124 7.4.1 Lattice Structure...124 7.4.2 Linear Phase...127 7.4.3 Free Optimization Parameters...129 7.5 Efficient Implementation...131 7.5.1 Even m...131 7.5.2 Odd m...134 7.6 Modified Discrete Cosine Transform...136 7.6.1 Window Function...136 7.6.2 MDCT...137 7.6.3 Efficient Implementation...138 Part IV Entropy Coding 8 Entropy and Coding...145 8.1 Entropy Coding...146 8.2 Entropy...148 8.2.1 Entropy...148 8.2.2 Model Dependency...150 8.3 Uniquely and Instantaneously Decodable Codes...152 8.3.1 Uniquely Decodable Code...152 8.3.2 Instantaneous and Prefix-Free Code...153
xiv Contents 8.3.3 Prefix-Free Code and Binary Tree...154 8.3.4 Optimal Prefix-Free Code...155 8.4 Shannon s Noiseless Coding Theorem...156 8.4.1 Entropy as the Lower Bound...156 8.4.2 Upper Bound...158 8.4.3 Shannon s Noiseless Coding Theorem...159 9 Huffman Coding...161 9.1 Huffman s Algorithm...161 9.2 Optimality...163 9.2.1 Codeword Siblings...163 9.2.2 Proof of Optimality...165 9.3 Block Huffman Code...166 9.3.1 Efficiency Improvement...167 9.3.2 Block Encoding and Decoding...169 9.4 Recursive Coding...169 9.5 A Fast Decoding Algorithm...170 Part V Audio Coding 10 Perceptual Model...173 10.1 Sound Pressure Level...174 10.2 Absolute Threshold of Hearing...174 10.3 Auditory Subband Filtering...176 10.3.1 Subband Filtering...176 10.3.2 Auditory Filters...177 10.3.3 Bark Scale...179 10.3.4 Critical Bands...179 10.3.5 Critical Band Level...184 10.3.6 Equivalent Rectangular Bandwidth...184 10.4 Simultaneous Masking...185 10.4.1 Types of Masking...186 10.4.2 Spread of Masking...188 10.4.3 Global Masking Threshold...191 10.5 Temporal Masking...193 10.6 Perceptual Bit Allocation...194 10.7 Masked Threshold in Subband Domain...195 10.8 Perceptual Entropy...195 10.9 A Simple Perceptual Model...197 11 Transients...199 11.1 Resolution Challenge...199 11.1.1 Pre-Echo Artifacts...202 11.1.2 Fourier Uncertainty Principle...204 11.1.3 Adaptation of Resolution with Time...205
Contents xv 11.2 Switched-Window MDCT...207 11.2.1 Relaxed PR Conditions and Window Switching...207 11.2.2 Window Sequencing...209 11.3 Double-Resolution Switched MDCT...210 11.3.1 Primary and Transitional Windows...210 11.3.2 Look-Ahead and Window Sequencing...213 11.3.3 Implementation...214 11.3.4 Window Size Compromise...215 11.4 Temporal Noise Shaping...215 11.5 Transient-Localized MDCT...217 11.5.1 Brief Window and Pre-Echo Artifacts...217 11.5.2 Window Sequencing...220 11.5.3 Indication of Window Sequence to Decoder...222 11.5.4 Inverse TLM Implementation...223 11.6 Triple-Resolution Switched MDCT...224 11.7 Transient Detection...226 11.7.1 General Procedure...227 11.7.2 A Practical Example...228 12 Joint Channel Coding...231 12.1 M/S Stereo Coding...231 12.2 Joint Intensity Coding...232 12.3 Low-Frequency Effect Channel...234 13 Implementation Issues...235 13.1 Data Structure...235 13.1.1 Frame-Based Processing...236 13.1.2 Time Frequency Tiling...236 13.2 Entropy Codebook Assignment...238 13.2.1 Fixed Assignment...239 13.2.2 Statistics-Adaptive Assignment...240 13.3 Bit Allocation...241 13.3.1 Inter-Frame Allocation...241 13.3.2 Intra-Frame Allocation...242 13.4 Bit Stream Format...243 13.4.1 Frame Header...243 13.4.2 Audio Channels...244 13.4.3 Error Protection Codes...245 13.4.4 Auxiliary Data...245 13.5 Implementation on Microprocessors...246 13.5.1 Fitting to Low-Cost Microprocessors...246 13.5.2 Fixed-Point Arithmetic...247
http://www.springer.com/978-1-4419-1753-9