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

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Msu4RndSat

frac16_t MLIB_Msu4Rnd_F16(frac16_t
frac16_t
f16SubMult2)
frac32_t MLIB_Msu4Rnd_F32(frac32_t
frac32_t
f32SubMult2)

2.28.3 Function use

The use of the
MLIB_Msu4Rnd
#include "mlib.h"
static
frac16_t
f16Result, f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2;
void main(void)
{
f16MinMult1 = FRAC16(0.256);
f16MinMult2 = FRAC16(-0.724);
f16SubMult1 = FRAC16(0.365);
f16SubMult2 = FRAC16(-0.25);
/* f32Result = round(f16MinMult1 * f16MinMult2 - f16SubMult1 * f16SubMult2) */
f16Result = MLIB_Msu4Rnd_F16(f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2);
}
2.29 MLIB_Msu4RndSat
The
MLIB_Msu4RndSat
pairs of multiplicands. The round method is the round to nearest. The function saturates
the output. See the following equation:

2.29.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.
62
f16MinMult1,
frac16_t
f32MinMult1,
frac32_t
function is shown in the following example:
/* f16MinMult1 = 0.256 */
/* f16MinMult2 = -0.724*/
/* f16SubMult1 = 0.365 */
/* f16SubMult2 = -0.25 */
functions return the rounded subtraction of two products of two
Equation 27. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
f16MinMult2,
frac16_t
f32MinMult2,
frac32_t
Freescale Semiconductor, Inc.
f16SubMult1,
f32SubMult1,

Advertisement

Table of Contents
loading

Table of Contents