Quantizer Design
Versión 3.0 (1,6 MB) por
Peter Kabal
Routines to design/evaluate MMSE scalar quantizers, and an efficient quantizer routine.
Quantizer Design 2026-03
This group of routines designs and evaluates scalar quantizers. Scalar quantizers are specified by a set of decision (threshold) values and a set of output values. The Lloyd-Max algorithms are used to design minimummean-square error scalar quantizers based on a given probability density functions.
Quantizer design routines:
QuantOpt to design non-uniformly spaced quantizers,
QuantUnif to design quantizers with uniformly spaced output levels,
QuantUnifThr to design quantizers with uniformly spaced threshold levels.
For each, the number of quantizer levels and the triplet of functions to evaluate pdf integrals are specified. Additionally, the quantizer design can be constrained to have symmetrically spaced levels.
The routine PDFFn returns the required triplet of pdf integral functions. The following probability density functions are supported.
Uniform: Uniform pdf leading to a uniform quantizer
Gaussian: Gaussian pdf
Laplace: Two-sided Laplace pdf
Exp: One-sided exponential pdf
Sine: pdf for a sinusoid with random phase
Gamma: Gamma pdf (generalized gamma distribution with parameter 1/2)
Generalized Gamma: Generalized gamma pdf specified with an additional parameter
Tabulated: A pdf specified by a set of points. The points are (x,pdf(x)) 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, or by supplying smoothed histogram values.
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. These procedures are described in
P. Kabal, Minimum Mean-Square Error Quantizers, Technical Report 80-09, INRS-Telecommunications, University of Quebec, May 1980, on-line document http://www-mmsp.ece.mcgill.ca/MMSP/Documents/Reports.
Quantizer Evaluation
The quantizer is evaluated by calculating the resulting mean-square error (and SNR in dB), and the quantizer entropy. The evaluation routine QuantSNR can be used to evaluate the performance of a quantizer (whether designed by the design routines described above or not) for an input signal with a given pdf.
Log-PCM Quantizers
The routines QuantALawTables and QuantMuLawTables generate quantizer tables for log-PCM quantization as specified by the ITU-T Recommendation G.711.
Quantization
The routine QuantIndex efficiently carries out quantization for a vector of input values. Internally it uses the Matlab routine discretize. QuantIndex has an option for specifying whether input values which lie exactly at the decision boundaries round up or round down. If quantization is carried out for a single input value at a time, the binary search used in QuantIndexBS may be more efficient.
Test Routines
The test folder contains scripts to exercise the design routines.
Citar como
Peter Kabal (2026). Quantizer Design (https://la.mathworks.com/matlabcentral/fileexchange/24333-quantizer-design), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2024a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Más información sobre Elementary Polygons en Help Center y MATLAB Answers.
Etiquetas
Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
