DSPF_sp_minerr
Special Requirements
Implementation Notes
Benchmarks
DSPF_sp_minerr
Function
Arguments
4-76
{
a = floor(32768 * x[i]);
// saturate to 16-bit //
if (a>32767)
if (a<-32768) a = -32768;
r[i] = (short) a;
}
}
-
No special alignment requirements.
-
The value of nx must be > 0.
-
SSHL has been used to saturate the output of the instruction SPINT.
-
There are no write buffer fulls because one STH occurs per cycle.
-
Endianess: This implementation is endian neutral.
-
Interruptibility: This code is interrupt-tolerant but not interruptible.
Cycles
nx + 17
e.g., nx = 512, cycles = 529
Code size
384
(in bytes)
VSELP vocoder code book search algorithm
float DSPF_sp_minerr (const float* GSP0_TABLE, const float* errCoefs, int
*restrict max_index)
GSP0_TABLE[256*9]
errCoefs[9]
max_index
a =
32767;
GSP0 terms array.
Array of error coefficients. Must be double-word
aligned.
Index to GSP0_TABLE[max_index], the first ele-
ment of the 9-element vector that resulted in the
maximum dot product.
Need help?
Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?
Questions and answers