ARM Compiler 4.1 and later provide support for the ETSI basic
operations through the header file
dspfns.h header file contains definitions
of the ETSI basic operations as a combination of C code and intrinsics.
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
sub. For example,
add(v1, v2)adds two 16-bit numbers
v2together, with overflow control and saturation, returning a 16-bit result.
16-bit and 32-bit multiplication operations, such as
L_mult. For example,
mult(v1, v2)multiplies two 16-bit numbers
v2together, returning a scaled 16-bit result.
16-bit arithmetic shift operations, such as
shr. For example, the saturating left shift operation
shl(v1, v2)arithmetically shifts the 16-bit input
v2positions. A negative shift count shifts
16-bit data conversion operations, such as
round. For example,
round(L_v1)rounds the lower 16 bits of the 32-bit input
L_v1into the most significant 16 bits with saturation.
Beware that both the
dspfns.hheader file and the ISO C99 header file
math.hboth define (different versions of) the function
round(). Take care to avoid this potential conflict.