User`s guide
Uniform Decoder
5-466
5Uniform Decoder
Purpose Decode an integer input to a floating-point output.
Library Quantizers
Description The Uniform Decoder block performs the inverse operation of the Uniform
Encoder block, and reconstructs quantized floating-point values from encoded
integer input. The block adheres to the definition for uniform decoding
specified in ITU-T Recommendation G.701.
Inputs can be real or complex values of the following six integer data types:
uint8, uint16, uint32, int8, int16, or int32.
The block first casts the integer input values to floating-point values, and then
uniquely maps (decodes) them to one of 2
B
uniformly spaced floating point
values in the range [-V, (1-2
1-B
)V], where B is specified by the Bits parameter
(as an integer between 2 and 32) and V is a floating-point value specified by the
Peak parameter. The smallest input value representable by B bits (0 for an
unsigned input data type; -2
B-1
for a signed input data type) is mapped to the
value -V. The largest input value representable by B bits (2
B
-1 for an unsigned
input data type; 2
B-1
-1 for a signed input data type) is mapped to the value
(1-2
1-B
)V. Intermediate input values are linearly mapped to the intermediate
values in the range [-V, (1-2
1-B
)V].
To correctly decode values encoded by the Uniform Encoder block, the
Bits and
Peak parameters of the Uniform Decoder block should be set to the same
values as the
Bits and Peak parameters of the Uniform Encoder block. The
Overflow mode parameter specifies the Uniform Decoder block’s behavior
when the integer input is outside the range representable by B bits. If
Saturate is selected, unsigned input values greater than 2
B
-1 saturate at 2
B
-1;
signed input values greater than 2
B-1
-1 or less than -2
B-1
saturate at those
limits. The real and imaginary components of complex inputs saturate
independently.
If
Wrap is selected, unsigned input values, u, greater than 2
B
-1 are wrapped
back into the range [0, 2
B
-1] using mod-2
B
arithmetic.
u = mod(u,2^B) % Equivalent MATLAB code