Available Versions - Freescale Semiconductor DSP56800E User Manual

Mlib
Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

MLIB_Conv
The
MLIB_Conv
functions return the input value, converted to the output type.

2.8.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 available versions of the
Function name
Input type
MLIB_Conv_F16l
frac32_t
MLIB_Conv_F32s
frac16_t
2.8.2 Declaration
The available
MLIB_Conv
frac16_t MLIB_Conv_F16l(frac32_t
frac32_t MLIB_Conv_F32s(frac16_t
2.8.3 Function use
The use of the
MLIB_Conv
#include "mlib.h"
static
frac32_t
f32Result;
static
frac16_t
f16Val;
void main(void)
{
f16Val = FRAC16(-0.354);
/* f32Result = (frac32_t)f16Val << 16 */
f32Result = MLIB_Conv_F32s(f16Val);
}
32
MLIB_Conv
function are shown in the following table.
Table 2-8. Function versions
Result type
frac16_t
Conversion of a 32-bit fractional value to a 16-bit fractional value. The
output is within the range <-1 ; 1).
frac32_t
Conversion of a 16-bit fractional value to a 32-bit fractional value. The
output is within the range <-1 ; 1).
functions have the following declarations:
f32Val)
f16Val)
function is shown in the following example:
/* f16Val = -0.354 */
MLIB User's Guide, Rev. 2, 10/2015
Description
Freescale Semiconductor, Inc.

Advertisement

Table of Contents
loading

Table of Contents