1.4.4.55 libq_q31_ShiftLeft_q31_i16 Function

Arithmetic Shift of the 32-bit value.

Description

Function libq_q31_ShiftLeft_q31_i16:

Performs an Arithmetic Shift of the 32-bit input argument a left by the input argument b bit positions. If b is a positive number, a 32-bit left shift is performed with zeros inserted to the right of the shifted bits. If b is a negative number, a 32-bit right shift by b bit positions with sign extention:

positive value: # of bits to left shift (zeros inserted at LSBs)

negative value: # of bits to right shift (sign extend)

Saturation is applied if shifting causes an overflow or an underflow.

This function relates to the ETSI L_shl function.

Parameters

q31 a 32-bit signed integer value to be shifted

i16 16-bit signed integer shift index

Returns

q31 result - arithmetically shifted 32-bit signed integer output

C

q31 libq_q31_ShiftLeft_q31_i16 (q31, i16);