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

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

frac16_t MLIB_Add4_F16(frac16_t
f16Add4)
frac32_t MLIB_Add4_F32(frac32_t
f32Add4)

2.5.3 Function use

The use of the
MLIB_Add4
#include "mlib.h"
static
frac32_t
f32Result;
static
frac32_t
f32Add1, f32Add2, f32Add3, f32Add4;
void main(void)
{
f32Add1 = FRAC32(-0.3);
f32Add2 = FRAC32(0.5);
f32Add3 = FRAC32(-0.2);
f32Add4 = FRAC32(-0.4);
/* f32Result = f32Add1 + f32Add2 + f32Add3 + f32Add4 */
f32Result = MLIB_Add4_F32(f32Add1, f32Add2, f32Add3, f32Add4);
}

2.6 MLIB_Add4Sat

The
MLIB_Add4Sat
output. See the following equation:

2.6.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.
f16Add1,
frac16_t
f32Add1,
frac32_t
function is shown in the following example:
/* f32Add1 = -0.3 */
/* f32Add2 = 0.5 */
/* f32Add3 = -0.2 */
/* f32Add4 = -0.4 */
functions return the sum of four addends. The function saturates the
Equation 6. Algorithm formula
MLIB User's Guide, Rev. 2, 10/2015
Chapter 2 Algorithms in detail
f16Add2,
frac16_t
f16Add3,
f32Add2,
frac32_t
f32Add3,
frac16_t
frac32_t
29

Advertisement

Table of Contents
loading

Table of Contents