Be the first to rate this file! 43 downloads (last 30 days) File Size: 263.69 KB File ID: #24333

Quantizers

by Peter Kabal

 

02 Jun 2009 (Updated 19 Jun 2009)

Code covered by the BSD License  

Routines to design/evaluate MMSE scalar quantizers, and an efficient quantizer routine.

Download Now | Watch this File

File Information
Description

Quantizers

Quantizer Design
This group of routines designs and evaluates scalar quantizers. A scalar quantizer is defined by a set of decision values and a set of output values. The Lloyd-Max algorithms are used to design minimum-mean-square error scalar quantizers based on a given probability density functions.
There are two basic design routines: QuantOpt to design general non-uniformly spaced quantizers, and QuantUnif to design uniformly spaced quantizers. For each, the quantizer can additionally be constrained to have symmetrically spaced levels. A number of different probability density functions are supported.
1. Uniform: Uniform pdf leading to a uniform quantizer
2. Gaussian: Gaussian pdf
3. Laplace: Two-sided laplace pdf
4. Sine: pdf for a sinusoid with random phase
5. Gamma: Gamma pdf (generalized gamma distribution with parameter 1/2)
6. Generalized Gamma: Generalized gamma pdf specified with an additional parameter
7. Tabulated: A pdf specified by a set of points. The points are (x,p) pairs. The pdf is assumed to be linear between the given points and zero outside the points. For sufficiently smooth pdf’s, the tabulated option can be used to design minimum mean-square error quantizers for arbitrary pdf’s by supplying samples of the pdf.

Design Strategy
The initial search for a quantizer which satisfies the necessary conditions for minimum mean-square error is done using a one-dimensional search (Lloyd algorithm). A refinement step using the Lloyd-Max iteration is then carried out.

Quantizer Evaluation
The quantizer is evaluated by calculating the resulting mean-square error (and SNR in dB), and the quantizer entropy. The evaluation routines QuantSNR can be used for any quantizer (whether designed by the design routines described above or not).

Log-PCM Quantizers
The routines QuantALawTables and QuantMuLawTables generate quantizer tables for log-PCM quantization as per ITU-T Recommendation G.711.

Quantization
The routine Quant efficiently carries out quantization. Internally it uses the Matlab routine histc. This routine is more efficient than the Matlab function quantiz (Communications Toolbox). Quant has an option for having input values which lie exactly at the decision boundaries round up or round down.

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files
license.txt,
Quantizer/Documentation/Quantizers.docx,
Quantizer/Documentation/Quantizers.pdf,
Quantizer/PDFFn.m,
Quantizer/private/Gamma1aCCDF.m,
Quantizer/private/Gamma2aCCDF.m,
Quantizer/private/GammaGenPDF.m,
Quantizer/private/GammaPDF.m,
Quantizer/private/GaussPDF.m,
Quantizer/private/LaplacePDF.m,
Quantizer/private/LogGamma.m,
Quantizer/private/SinePDF.m,
Quantizer/private/TabulatedPDF.m,
Quantizer/private/test/tGammaCCDF.m,
Quantizer/private/test/tLogGamma.m,
Quantizer/private/UniformPDF.m,
Quantizer/Quant.m,
Quantizer/QuantALawTables.m,
Quantizer/QuantEntropy.m,
Quantizer/QuantLloyd.m,
Quantizer/QuantMSE.m,
Quantizer/QuantMuLawTables.m,
Quantizer/QuantOpt.m,
Quantizer/QuantRefine.m,
Quantizer/QuantSNR.m,
Quantizer/QuantUnif.m,
Quantizer/test/lin2pcma.m,
Quantizer/test/pcma2lin.m,
Quantizer/test/TestPDF.m,
Quantizer/test/tLogQuant.m,
Quantizer/test/tQuantOpt.m,
Quantizer/test/tQuantUnif.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
19 Jun 2009

Update BSD license - no file changes

Tag Activity for this File
Tag Applied By Date/Time
quantizer design Peter Kabal 02 Jun 2009 16:11:59
quantization Peter Kabal 02 Jun 2009 16:11:59
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com