Declaration; Function Use - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

The available versions of the
table.
Function name
MLIB_Msu4RndSat_F16
MLIB_Msu4RndSat_F32

2.29.2 Declaration

The available
MLIB_Msu4RndSat
frac16_t MLIB_Msu4RndSat_F16(frac16_t
f16SubMult1,
frac16_t
frac32_t MLIB_Msu4RndSat_F32(frac32_t
f32SubMult1,
frac32_t

2.29.3 Function use

The use of the
MLIB_Msu4RndSat
#include "mlib.h"
static
frac32_t
;
static
frac16_t
f16Result, f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2;
void main(void)
{
f16MinMult1 = FRAC16(0.8);
f16MinMult2 = FRAC16(-0.9);
f16SubMult1 = FRAC16(0.7);
f16SubMult2 = FRAC16(0.9);
/* f16Result = sat(round(f16MinMult1 * f16MinMult2 - f16SubMult1 * f16SubMult2)) */
f16Result = MLIB_Msu4RndSat_F16(f16MinMult1, f16MinMult2, f16SubMult1, f16SubMult2);
}
Freescale Semiconductor, Inc.
MLIB_Msu4RndSat
Table 2-29. Function versions
Input type
Minuend product
Mult. 1
Mult. 2
Mult. 1
frac16_t
frac16_t
frac16_t
frac32_t
frac32_t
frac32_t
functions have the following declarations:
f16MinMult1,
f16SubMult2)
f32MinMult1,
f32SubMult2)
function is shown in the following example:
/* f16MinMult1 = 0.8 */
/* f16MinMult2 = -0.9 */
/* f16SubMult1 = 0.7 */
/* f16SubMult2 = 0.9 */
MLIB User's Guide, Rev. 2, 10/2015
function are shown in the following
Result
type
Subtrahend product
Mult. 2
frac16_t
frac16_t
frac32_t
frac32_t
frac16_t
f16MinMult2,
frac32_t
f32MinMult2,
Chapter 2 Algorithms in detail
Description
Subtraction of two 16-bit
fractional products (of two 16-
bit fractional multiplicands),
rounded to the upper 16 bits.
The output is within the range
<-1 ; 1).
Subtraction of two 32-bit
fractional products (of two 32-
bit fractional multiplicands),
rounded to the upper 32 bits.
The output is within the range
<-1 ; 1).
frac16_t
frac32_t
63

Advertisement

Table of Contents
loading

Table of Contents