Package: dsp
Convert each index value into quantized output value
The ScalarQuantizerDecoder
object converts
each index value into a quantized output value. The specified codebook
defines the set of all possible quantized output values or codewords.
Input index values less than 0 are set to 0 and index values greater N –
1 are set to N – 1. N is
the length of the codebook vector.
To convert an index value into a quantized output value:
Define and set up your scalar quantizer decoder. See Construction.
Call step
to convert the index value
according to the properties of dsp.ScalarQuantizerDecoder
.
The behavior of step
is specific to each object in
the toolbox.
Note:
Starting in R2016b, instead of using the |
H = dsp.ScalarQuantizerDecoder
returns
a scalar quantizer decoder System object, H
,
that transforms zero-based input index values into quantized output
values.
H = dsp.ScalarQuantizerDecoder('
returns
a scalar quantizer decoder object, PropertyName
',PropertyValue
,...)H
, with each specified
property set to the specified value.
|
How to specify codebook values Specify how to determine the codebook values as |
|
Codebook Specify the codebook as a vector of quantized output values
that correspond to each index value. The default is |
|
Data type of codebook and quantized output Specify the data type of the codebook and quantized output values
as |
clone | Create scalar quantizer decoder object with same property values |
getNumInputs | Number of expected inputs to step method |
getNumOutputs | Number of outputs of step method |
isLocked | Locked status for input attributes and nontunable properties |
release | Allow property value and input characteristics changes |
step | Decode using scalar quantization |
This object implements the algorithm, inputs, and outputs described on the Scalar Quantizer Decoder block reference page. The object properties correspond to the block parameters, except:
There is no object property that directly corresponds to the Action
for out of range index value block parameter. The object
sets any index values less than 0 to 0 and
any index values greater than or equal to N to N –
1. |