Quantize and encode floating-point input into integer output
The UniformEncoder
object quantizes floating-point input,
using the precision you specify in the NumBits
property, and
encodes the quantized input into integer output. The operations of the uniform encoder
adhere to the definition for uniform encoding specified in ITU-T Recommendation
G.701.
To quantize and encode a floating-point input into an integer output:
Define and set up your uniform encoder. See Construction.
Call step
to encode the input according
to the properties of dsp.UniformEncoder
. The behavior
of step
is specific to each object in the toolbox.
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System
object™, you can
call the object with arguments, as if it were a function. For example, y
= step(obj,x)
and y = obj(x)
perform
equivalent operations.
ue = dsp.UniformEncoder
returns
a uniform encoder, ue
, that quantizes floating-point
input samples and encodes them as integers using 2N-level
quantization, where N is an integer.
ue = dsp.UniformEncoder('
returns
an uniform encoder, PropertyName
',PropertyValue
,...)ue
, with each specified property
set to the specified value.
ue = dsp.UniformEncoder(peakvalue,numbits,
returns a uniform encoder,
'PropertyName
',PropertyValue
,...)ue
, with the
PeakValue
property set to peakvalue
, the
NumBits
property set to numbits
, and other
specified properties set to the specified values.
|
Largest input amplitude to be encoded Specify the largest input amplitude to be encoded, as a nonnegative numeric scalar. If the
real or imaginary input are outside of the interval
[–P,(1 – 2(1 – B))P],
where P is the peak value and B is the
value of the |
|
Number of bits needed to represent output Specify the number of bits needed to represent the integer output
as an integer value between |
|
Data type of output Specify the data type of the output as |
step | Quantize and encode input |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithm, inputs, and outputs described on the Uniform Encoder block reference page. The object properties correspond to the block parameters.