Table of Contents

NAME

squniform - make uniform scalar quantizer

SYNOPSIS

squniform [-max max_value] [-min min_value] [-u u] [-A A] [-nl num_levels] [-q stepsize] [-d deadzone] quantizer_file

OPTIONS

-max max_value
Float. Maximum value of the range of the quantizer. Default value = 255.
-min min_value
Float. Minimum value of the range of the quantizer. Default value = 0.
-u u
Float. Apply a u-law compander to the uniform quantizer.
-A A
Float. Apply a A-law compander to the uniform quantizer.
-nl num_levels
Integer. Number of quantizer intervals. Default = 255.
-q stepsize
Float. Stepsize of uniform quantizer.
-d deadzone
Float. Deadzone of quantizer.

DESCRIPTION

squniform designs scalar quantizers based on the uniform scalar quantizer. squniform supports simple uniform scalar quantization, uniform scalar quantization with a dead zone about zero, and u-law and A-law companding.

A uniform scalar quantizer can be created in two ways. The first way is to specify the scalar quantizer stepsize with the -q option; this type of quantizer will be called hereafter the "simple" uniform scalar quantizer. Encoding using this simple quantizer (i.e., with sqencode(1) ) is merely a division by the stepsize; i.e., index= rint( value/stepsize).

The second form of uniform quantizer supported by squniform is a "general" uniform scalar quantizer. In this type of quantizer, the reproduction levels and boundaries are explicitly given in the output file. The range of the general quantizer is min_value through max_value and the number of quantization levels is num_levels. squniform constructs num_levels equally-sized quantizer bins between min_value and max_value. Note: the key difference between the simple and general uniform scalar quantizers is that the range of the simple quantizer is implied to be infinite while the range of the general scalar quantizer is finite. However, the first and last quantizer bins of the general quantizer are considered to be "overload" regions. Note: quantizing with the general uniform scalar quantizer (via, for example, sqencode(1) ) requires a nearest-neighbor search and is thus slower than using a simple quantizer.

A dead-zone quantizer can be constructed by giving both the stepsize of the quantizer (via the -q option) and the deadzone bin size (via the -d option). For a dead-zone quantizer, deadzone is the size of the quantizer bin centered at zero; that is, all values between -deadzone and deadzone are quantized to zero. Beyond this dead zone about zero, the rest of the quantizer is uniform, with bins of size stepsize. Note: the simple uniform scalar quantizer can be considered to be a deadzone quantizer with deadzone=stepsize.

Companding may be applied to the general uniform scalar quantizer to produce u-law and A-law scalar quantizers. With the -u or -A options, logarithmic companders with u-law or A-law characteristics, respectively, are applied to the general quantizer before it is output (in effect making the quantizer nonuniform). One of u-law or A-law, but not both, may be specified. The value u must be nonnegative; A must be 1.0 or greater. Options -u and -A may not be used in conjunction with the -q option.

SEE ALSO

sqlloyd(1) , sqencode(1) , QccPackSQ(3) , QccPack(3)

A. Gersho and R. Gray, Vector Quantization and Signal Compression. Norwell, MA: Kluwer Academic Publishers, 1992, pp. 151-161.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads