1.4.4.29 libq_q15_Abs_q15 Function

Saturated Absolute value.

Description

Function libq_q15_Abs_q15:

Creates a saturated Absolute value. It takes the absolute value of the 16-bit 2s-complement fractional input with saturation. The saturation is for handling the case where taking the absolute value of MINFRACT16 is greater than MAXFRACT16, or the allowable range of 16-bit values. This function relates to the ETSI abs function.

Parameters

q15 a input argument

Returns

q15 result - abs(input) <= MAXFRACT16

C

q15 libq_q15_Abs_q15 (q15);