LIBML
Version 3.2.4
LIBML DSP Software Library
|
Functions | |
void | tpt_shift_q15 (q15_t *aOutData, const q15_t *aInData, int8_t aShiftBits, uint32_t aCount) |
Shifts the elements of a Q15 vector a specified number of bits. More... | |
void | tpt_shift_q31 (q31_t *aOutData, const q31_t *aInData, int8_t aShiftBits, uint32_t aCount) |
Shifts the elements of a Q15 vector a specified number of bits. More... | |
void | tpt_shift_q7 (q7_t *aOutData, const q7_t *aInData, int8_t aShiftBits, uint32_t aCount) |
Shifts the elements of a Q7 vector a specified number of bits. More... | |
Shifts the elements of a fixed-point vector by a specified number of bits. There are separate functions for Q7, Q15, and Q31 data types. The underlying algorithm used is:
aOutData[n] = aInData[n] << aShiftBits, 0 <= n < aCount.
If aShiftBits
is positive then the elements of the vector are shifted to the left. If aShiftBits
is negative then the elements of the vector are shifted to the right.
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer.
Shifts the elements of a Q15 vector a specified number of bits.
[out] | aOutData | points to the output vector. |
[in] | aInData | points to the input vector. |
[in] | aShiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[in] | aCount | number of samples in each vector |
Shifts the elements of a Q15 vector a specified number of bits.
[out] | aOutData | points to the output vector |
[in] | aInData | points to the input vector |
[in] | aShiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[in] | aCount | number of samples in each vector |
Shifts the elements of a Q7 vector a specified number of bits.
[out] | aOutData | points to the output vector |
[in] | aInData | points to the input vector |
[in] | aShiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[in] | aCount | number of samples in each vector |