DOC PREVIEW
UCSB ECE 160 - Multimedia

This preview shows page 1-2-15-16-31-32 out of 32 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 1 ECE160 Multimedia Lecture 7: Spring 2011 Lossless Compression Algorithms No Lectures next weekECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 2 Quantization and Transmission of Audio • Coding of Audio: Quantization and transformation of data are collectively known as coding of the data. a) For audio, the µ-law technique for companding audio signals is usually combined with an algorithm that exploits the temporal redundancy present in audio signals. b) Differences in signals between the present and a past time can reduce the size of signal values and also concentrate the histogram of pixel values (differences, now) into a much smaller range.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 3 Quantization and Transmission of Audio c) The result of reducing the variance of values is that lossless compression methods produce a bitstream with shorter bit lengths for more likely values • In general, producing quantized sampled output for audio is called PCM (Pulse Code Modulation). The differences version is called DPCM (and a crude but simple variant is called DM). The adaptive version is called ADPCM.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 4 Pulse Code Modulation • The basic techniques for creating digital signals from analog signals are sampling and quantization. • Quantization consists of selecting breakpoints in magnitude, and then re-mapping any value within an interval to one of the representative output levels.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 5 Pulse Code Modulation a) The set of interval boundaries are called decision boundaries, and the representative values are called reconstruction levels. b) The boundaries for quantizer input intervals that will all be mapped into the same output level form a coder mapping. c) The representative values that are the output values from a quantizer are a decoder mapping. • d) Finally, we may wish to compress the data, by assigning a bit stream that uses fewer bits for the most prevalent signal valuesECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 6 Pulse Code Modulation Every compression scheme has three stages: A. The input data is transformed to a new representation that is easier or more efficient to compress. B. We may introduce loss of information. Quantization is the main lossy step => we use a limited number of reconstruction levels, fewer than in the original signal. C. Coding. Assign a codeword (thus forming a binary bitstream) to each output level or symbol. This could be a fixed-length code, or a variable length code such as Huffman codingECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 7 PCM in Speech Compression Assuming a bandwidth for speech from about 50 Hz to about 10 kHz, the Nyquist rate would dictate a sampling rate of 20 kHz. (a) Using uniform quantization without companding, the minimum sample size we could get away with would likely be about 12 bits. For mono speech transmission the bit-rate would be 240 kbps. (b) With companding, we can reduce the sample size down to about 8 bits with the same perceived level of quality, and thus reduce the bit-rate to 160 kbps. (c) However, the standard approach to telephony in fact assumes that the highest-frequency audio signal we want to reproduce is only about 4 kHz. Therefore the sampling rate is only 8 kHz, and the companded bit-rate thus reduces this to 64 kbps. (d) Since only sounds up to 4 kHz are to be considered, all other frequency content must be noise. Therefore, we remove this high-frequency content from the analog input signal using a band-limiting filter that blocks out high, as well as very low, frequencies.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 8 PCM in Speech CompressionECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 9 PCM in Speech Compression • The complete scheme for encoding and decoding telephony signals is shown below. As a result of the low-pass filtering, the output becomes smoothed.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 10 Differential Coding of Audio • Audio is often stored in a form that exploits differences - which are generally smaller numbers, needing fewer bits to store them. (a) If a signal has some consistency over time (“temporal redundancy"), the difference signal, subtracting the current sample from the previous one, will have a more peaked histogram, with a maximum near zero. (b) For example, as an extreme case the histogram for a linear ramp signal that has constant slope is flat, whereas the histogram for the derivative of the signal (i.e., the differences from sampling point to sampling point) consists of a spike at the slope value. (c) If we assign codewords to differences, we can assign short codes to prevalent values and long codewords to rare ones.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 11 Differential Coding of Audio • Differencing concentrates the histogram. (a): Digital speech signal. (b): Histogram of digital speech signal values. (c): Histogram of digital speech signal differences.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 12 Differential Coding of Audio • One problem: suppose our integer sample values are in the range 0..255. Then differences could be as much as -255..255 - we've increased our dynamic range (ratio of maximum to minimum) by a factor of two and need more bits to transmit some differences. (a) A clever solution for this: define two new codes, denoted SU and SD, standing for Shift-Up and Shift-Down. Special code values are reserved for these. (b) We use codewords for only a limited set of signal differences, say only the range −15::16. Differences in the range are coded as is, a value outside the range −15::16 is transmitted as a series of shifts, followed by a value that is inside the range −15::16. (c) For example, 100 is transmitted as: SU, SU, SU, 4.ECE160 Spring 2011 Lecture 7 Lossless Compression Algorithms 13 Lossless Predictive Coding • Predictive coding: simply means transmitting differences - predict the next sample as being equal to the current sample; send not the sample itself but the difference between previous and next. (a) Predictive coding consists of finding differences, and


View Full Document

UCSB ECE 160 - Multimedia

Download Multimedia
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Multimedia and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Multimedia 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?