| |||
| Home > Compiler Features > Compiler support for European Telecommunications Standards Institute (ETSI) basic operations | |||
ARM Compiler 4.1 and later provide support for the ETSI basic
operations through the header file dspfns.h.
The dspfns.h header file contains definitions
of the ETSI basic operations as a combination of C code and intrinsics.
See dspfns.h for a complete list of the
ETSI basic operations supported in ARM Compiler 4.1 and later.
ARM Compiler 4.1 and later support the original ETSI family of basic operations as described in the ETSI G.729 recommendation Coding of speech at 8 kbit/s using conjugate-structure algebraic-code-excited linear prediction (CS-ACELP), including:
16-bit and 32-bit saturated arithmetic
operations, such as add and sub.
For example, add(v1, v2) adds two 16-bit numbers v1 and v2 together,
with overflow control and saturation, returning a 16-bit result.
16-bit and 32-bit multiplication operations, such
as mult and L_mult. For
example, mult(v1, v2) multiplies two 16-bit
numbers v1 and v2 together, returning
a scaled 16-bit result.
16-bit arithmetic shift operations, such as shl and shr.
For example, the saturating left shift operation shl(v1,
v2) arithmetically shifts the 16-bit input v1 left v2 positions.
A negative shift count shifts v1 right v2 positions.
16-bit data conversion operations, such as extract_l, extract_h,
and round. For example, round(L_v1) rounds
the lower 16 bits of the 32-bit input L_v1 into
the most significant 16 bits with saturation.
Beware that both the dspfns.h header
file and the ISO C99 header file math.h both
define (different versions of) the function round().
Take care to avoid this potential conflict.
Compiler Reference: