Declaration; Function Use; Mlib_Shrbisat; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

2.51.2 Declaration

The available
MLIB_ShRBi
frac16_t MLIB_ShRBi_F16(frac16_t
frac32_t MLIB_ShRBi_F32(frac32_t

2.51.3 Function use

The use of the
MLIB_ShRBi
#include "mlib.h"
static
frac32_t
f32Result, f32Val;
static
int16_t
i16Sh;
void main(void)
{
f32Val = FRAC32(0.354);
i16Sh = 8;
/* f32Result = f32Val >> i16Sh */
f32Result = MLIB_ShRBi_F32(f32Val, i16Sh);
}

2.52 MLIB_ShRBiSat

The
MLIB_ShRBiSat
specified number of times. If the number of shifts is positive, the shift is performed to the
right; if negative, to the left. The function saturates the output. See the following
equation:

2.52.1 Available versions

This function is available in the following versions:
• Fractional output - the output is the fractional portion of the result; the result is
within the range <-1 ; 1). The result may saturate.
Freescale Semiconductor, Inc.
functions have the following declarations:
f16Val,
int16_t
f32Val,
int16_t
function is shown in the following example:
/* f32In = 0.354 */
/* i16Sh = 8 */
functions return the arithmetically shifted value to the right a
Equation 50. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
i16Sh)
i16Sh)
93

Advertisement

Table of Contents
loading

Table of Contents