LIBML  Version 3.2.4
LIBML DSP Software Library
Functions
tpt_scale_u8.c File Reference
#include "tpt_math.h"
Include dependency graph for tpt_scale_u8.c:

Functions

static uint32_t sat_u32_to_u8 (q31_t src)
 To multiply a u8 vectors by a q7 scale. More...
 
void tpt_scale_u8 (uint8_t *__restrict aOutData, const uint8_t *__restrict aInData, q7_t aScaleFract, int8_t aShift, uint32_t aCount)
 To multiply a u8 vectors by a q7 scale. More...
 

Function Documentation

◆ sat_u32_to_u8()

static uint32_t sat_u32_to_u8 ( q31_t  src)
inlinestatic

To multiply a u8 vectors by a q7 scale.

Parameters
[out]aOutDatapoints to the output vector
[in]aInDatapoints to the input vector
[in]aScaleFractfractional portion of the scale value
[in]aShiftnumber of bits to shift
[in]aCountnumber of samples in the vector
Returns
none
The inputs are multiplied to yield a 1.15 output and then are
shift with saturation to 8-bit formats.