Function Use; Mlib_Sh1R; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Sh1R

2.44.3 Function use

The use of the
MLIB_Sh1LSat
#include "mlib.h"
static
frac16_t
f16Result, f16Val;
void main(void)
{
f16Val = FRAC16(0.354);
/* f16Result = sat(f16Val << 1) */
f16Result = MLIB_Sh1LSat_F16(f16Val);
}
2.45 MLIB_Sh1R
The
MLIB_Sh1R
functions return the arithmetically one-time-shifted value to the right.
See the following equation:

2.45.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 <-0.5 ; 0.5).
The available versions of the
Function name
Input type
MLIB_Sh1R_F16
frac16_t
MLIB_Sh1R_F32
frac32_t
84
function is shown in the following example:
/* f16Val = 0.354 */
Equation 43. Algorithm formula
MLIB_Sh1R
function are shown in the following table.
Table 2-45. Function versions
Result type
frac16_t
Shift of a 16-bit fractional value by one time to the right. The output is
within the range <-0.5 ; 0.5).
frac32_t
Shift of a 32-bit fractional value by one time to the right. The output is
within the range <-0.5 ; 0.5).
MLIB User's Guide, Rev. 2, 10/2015
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents