Mlib_Mac4Sat; Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Mac4Sat

#include "mlib.h"
static
frac32_t
f32Result;
static
frac16_t
f16Add1Mult1, f16Add1Mult2, f16Add2Mult1, f16Add2Mult2;
void main(void)
{
f16Add1Mult1 = FRAC16(0.2);
f16Add1Mult2 = FRAC16(-0.7);
f16Add2Mult1 = FRAC16(0.3);
f16Add2Mult2 = FRAC16(-0.25);
/* f32Result = f16Add1Mult1 * f16Add1Mult2 + f16Add2Mult1 * f16Add2Mult2*/
f32Result = MLIB_Mac4_F32ssss(f16Add1Mult1, f16Add1Mult2, f16Add2Mult1, f16Add2Mult2);
}
2.19 MLIB_Mac4Sat
The
MLIB_Mac4Sat
multiplicands. The function saturates the output. See the following equation:

2.19.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.
The available versions of the
Function name
MLIB_Mac4Sat_F32ssss
48
/* f16Add1Mult1 = 0.2 */
/* f16Add1Mult2 = -0.7 */
/* f16Add2Mult1 = 0.3 */
/* f16Add2Mult2 = -0.25 */
functions return the sum of two products of two pairs of
Equation 17. Algorithm formula
MLIB_Mac4Sat
Table 2-19. Function versions
Input type
Product 1
Mult. 1
Mult. 2
Mult. 1
frac16_t
frac16_t
frac16_t
MLIB User's Guide, Rev. 2, 10/2015
function are shown in the following table.
Result
type
Product 2
Mult. 2
frac16_t
frac32_t
Addition of two 32-bit fractional
products (of two 16-bit fractional
multiplicands). The output is within
the range <-1 ; 1).
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents