DOC PREVIEW
UCSB ECE 160 - Lec7

This preview shows page 1-2-3-18-19-36-37-38 out of 38 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 38 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 38 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 38 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 38 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 38 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 38 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 38 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 38 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 38 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ECE160Spring 2007Lecture 7Lossy Compression Algorithms1ECE160 / CMPS182MultimediaLecture 7: Spring 2007Lossless CompressionAlgorithmsECE160Spring 2007Lecture 7Lossy Compression Algorithms2Quantization and Transmission of Audio• Coding of Audio: Quantization andtransformation of data are collectively known ascoding of the data.a) For audio, the µ-law technique forcompanding audio signals is usually combinedwith an algorithm that exploits the temporalredundancy present in audio signals.b) Differences in signals between the presentand a past time can reduce the size of signalvalues and also concentrate the histogram ofpixel values (differences, now) into a muchsmaller range.ECE160Spring 2007Lecture 7Lossy Compression Algorithms3Quantization and Transmission of Audioc) The result of reducing the variance of valuesis that lossless compression methods produce abitstream with shorter bit lengths for more likelyvalues• In general, producing quantized sampled outputfor audio is called PCM (Pulse CodeModulation). The differences version is calledDPCM (and a crude but efficient variant is calledDM). The adaptive version is called ADPCM.ECE160Spring 2007Lecture 7Lossy Compression Algorithms4Pulse Code Modulation• The basic techniques for creating digital signals fromanalog signals are sampling and quantization.• Quantization consists of selecting breakpoints inmagnitude, and then re-mapping any value within aninterval to one of the representative output levels.ECE160Spring 2007Lecture 7Lossy Compression Algorithms5Pulse Code Modulationa) The set of interval boundaries are calleddecision boundaries, and the representativevalues are called reconstruction levels.b) The boundaries for quantizer input intervalsthat will all be mapped into the same output levelform a coder mapping.c) The representative values that are the outputvalues from a quantizer are a decodermapping.• d) Finally, we may wish to compress the data,by assigning a bit stream that uses fewer bits forthe most prevalent signal valuesECE160Spring 2007Lecture 7Lossy Compression Algorithms6Pulse Code ModulationEvery compression scheme has three stages:A. The input data is transformed to a newrepresentation that is easier or more efficient tocompress.B. We may introduce loss of information.Quantization is the main lossy step => we use alimited number of reconstruction levels, fewerthan in the original signal.C. Coding. Assign a codeword (thus forming abinary bitstream) to each output level or symbol.This could be a fixed-length code, or a variablelength code such as Huffman codingECE160Spring 2007Lecture 7Lossy Compression Algorithms7PCM in Speech CompressionAssuming 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 minimumsample 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 about8 bits with the same perceived level of quality, and thus reduce thebit-rate to 160 kbps.(c) However, the standard approach to telephony in fact assumesthat the highest-frequency audio signal we want to reproduce is onlyabout 4 kHz. Therefore the sampling rate is only 8 kHz, and thecompanded bit-rate thus reduces this to 64 kbps.(d) Since only sounds up to 4 kHz are to be considered, all otherfrequency content must be noise. Therefore, we remove this high-frequency content from the analog input signal using a band-limitingfilter that blocks out high, as well as very low, frequencies.ECE160Spring 2007Lecture 7Lossy Compression Algorithms8PCM in Speech CompressionECE160Spring 2007Lecture 7Lossy Compression Algorithms9PCM in Speech Compression• The complete scheme for encoding anddecoding telephony signals is shownbelow. As a result of the low-pass filtering,the output becomes smoothed.ECE160Spring 2007Lecture 7Lossy Compression Algorithms10Differential Coding of Audio• Audio is often stored in a form that exploits differences -which are generally smaller numbers, needing fewer bitsto store them.(a) If a signal has some consistency over time (“temporalredundancy"), the difference signal, subtracting thecurrent sample from the previous one, will have a morepeaked histogram, with a maximum near zero.(b) For example, as an extreme case the histogramfor 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 samplingpoint) consists of a spike at the slope value.(c) If we assign codewords to differences, we can assignshort codes to prevalent values and long codewords torare ones.ECE160Spring 2007Lecture 7Lossy Compression Algorithms11Lossless Predictive Coding• Predictive coding: simply means transmittingdifferences - predict the next sample as being equal tothe current sample; send not the sample itself but thedifference between previous and next.(a) Predictive coding consists of finding differences, andtransmitting these using a PCM system.(b) Note that differences of integers will be integers.Denote the integer input signal as the set of values fn.Then we predict values fn as simply the previous value,and define the error en as the difference between theactual and the predicted signal:ECE160Spring 2007Lecture 7Lossy Compression Algorithms12Lossless Predictive Coding• (c) But it is often the case that somefunction of a few of the previous values,fn− 1, fn− 2, fn−3, etc., provides a betterprediction. Typically, a linear predictorfunction is used:ECE160Spring 2007Lecture 7Lossy Compression Algorithms13Differential 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.ECE160Spring 2007Lecture 7Lossy Compression Algorithms14Differential Coding of Audio• One problem: suppose our integer sample values are inthe range 0..255. Then differences could be as much as-255..255 - we've increased our dynamic range (ratio ofmaximum to minimum) by a factor of two and need morebits 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 signaldifferences, say only the range − 15::16. Differences inthe range are


View Full Document

UCSB ECE 160 - Lec7

Download Lec7
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 Lec7 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 Lec7 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?