Developer Reference for Intel® Integrated Performance Primitives 2019

Convert

Converts the data type of a vector and stores the results in a second vector.

Syntax

IppStatus ippsConvert_8s16s(const Ipp8s* pSrc,Ipp16s* pDst, int len);

IppStatus ippsConvert_8s32f(const Ipp8s* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_8u32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_8u8s_Sfs(const Ipp8u* pSrc, Ipp8s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_8s8u(const Ipp8s* pSrc, Ipp8u* pDst, int len);

IppStatus ippsConvert_16s8s_Sfs(const Ipp16s* pSrc, Ipp8s* pDst, Ipp32u len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_16s32s(const Ipp16s* pSrc, Ipp32s* pDst, int len);

IppStatus ippsConvert_16s32f(const Ipp16s* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_16u32f(const Ipp16u* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_32s16s(const Ipp32s* pSrc, Ipp16s* pDst, int len);

IppStatus ippsConvert_32s32f(const Ipp32s* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_32s64f(const Ipp32s* pSrc, Ipp64f* pDst, int len);

IppStatus ippsConvert_32f64f(const Ipp32f* pSrc, Ipp64f* pDst, int len);

IppStatus ippsConvert_64s64f(const Ipp64s* pSrc, Ipp64f* pDst, Ipp32u len);

IppStatus ippsConvert_64f32f(const Ipp64f* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_16s32f_Sfs(const Ipp16s* pSrc, Ipp32f* pDst, int len, int scaleFactor);

IppStatus ippsConvert_16s64f_Sfs(const Ipp16s* pSrc, Ipp64f* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32s16s_Sfs(const Ipp32s* pSrc, Ipp16s* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32s32f_Sfs(const Ipp32s* pSrc, Ipp32f* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32s64f_Sfs(const Ipp32s* pSrc, Ipp64f* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32f8s_Sfs(const Ipp32f* pSrc, Ipp8s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_32f8u_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_32f16s_Sfs(const Ipp32f* pSrc, Ipp16s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_32f16u_Sfs(const Ipp32f* pSrc, Ipp16u* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_32f32s_Sfs(const Ipp32f* pSrc, Ipp32s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f8s_Sfs(const Ipp64f* pSrc, Ipp8s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f8u_Sfs(const Ipp64f* pSrc, Ipp8u* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f16u_Sfs(const Ipp64f* pSrc, Ipp16u* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64s32s_Sfs(const Ipp64s* pSrc, Ipp32s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f16s_Sfs(const Ipp64f* pSrc, Ipp16s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f32s_Sfs(const Ipp64f* pSrc, Ipp32s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_64f64s_Sfs(const Ipp64f* pSrc, Ipp64s* pDst, Ipp32u len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_24u32u(const Ipp8u* pSrc, Ipp32u* pDst, int len);

IppStatus ippsConvert_24u32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_32u24u_Sfs(const Ipp32u* pSrc, Ipp8u* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32f24u_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, int scaleFactor);

IppStatus ippsConvert_24s32s(const Ipp8u* pSrc, Ipp32s* pDst, int len);

IppStatus ippsConvert_24s32f(const Ipp8u* pSrc, Ipp32f* pDst, int len);

IppStatus ippsConvert_32s24s_Sfs(const Ipp32s* pSrc, Ipp8u* pDst, int len, int scaleFactor);

IppStatus ippsConvert_32f24s_Sfs(const Ipp32f* pSrc, Ipp8u* pDst, int len, int scaleFactor);

IppStatus ippsConvert_16s16f(const Ipp16s* pSrc, Ipp16f* pDst, int len, IppRoundMode rndMode);

IppStatus ippsConvert_32f16f(const Ipp32f* pSrc, Ipp16f* pDst, int len, IppRoundMode rndMode);

IppStatus ippsConvert_16f16s_Sfs(const Ipp16f* pSrc, Ipp16s* pDst, int len, IppRoundMode rndMode, int scaleFactor);

IppStatus ippsConvert_16f32f(const Ipp16f* pSrc, Ipp32f* pDst, int len);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pSrc

Pointer to the source vector.

pDst

Pointer to the destination vector.

rndMode

Rounding mode, the following values are possible:

ippRndZero floating-point values are truncated to zero

ippRndNear floating-point values are rounded to the nearest even integer when the fractional part equals 0.5; otherwise they are rounded to the nearest integer

ippRndFinancial floating-point values are rounded down to the nearest integer when the fractional part is less than 0.5, or rounded up to the nearest integer if the fractional part is equal or greater than 0.5.

len

Number of elements in the vector.

scaleFactor

Scale factor, refer to Integer Scaling.

Description

This function converts the type of data contained in the vector pSrc and stores the results in pDst.

Functions with the Sfs suffix perform scaling of the result value in accordance with the scaleFactor value. The converted result is saturated if it exceeds the output data range.

Functions that operate with 16f data do not support the ippRndFinancial rounding mode.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when the pDst or pSrc pointer is NULL.

ippStsSizeErr

Indicates an error when len is less than or equal to 0.

ippStsRoundModeNotSupportedErr

Indicates an error when the specified rounding mode is not supported.

Example

Convert.c

See Also