⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nspcvrt.h

📁 利用intel dsplib 库函数进行特定2FSK信号(需传导频)解调
💻 H
📖 第 1 页 / 共 3 页
字号:
/*M*
//
//               INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in accordance with the terms of that agreement.
//        Copyright (c) 1995 Intel Corporation. All Rights Reserved.
//
//      $Workfile: nspcvrt.h $
//      $Revision: 3 $
//      $Modtime: Dec 16 1996 4:22p $
//
//  Purpose: Data Convertion Functions.
*M*/
#ifdef __cplusplus
extern "C" {
#endif
#if !defined (_NSPCVRT_H) || defined (_OWN_BLDPCS)
    #define _NSPCVRT_H
/*-------------------------------------------------------------------------*/

    #if !defined (_OWN_BLDPCS)

/*-------Flags to determine the transformation-----------------------------*/

        #define NSP_Noflags   0x0000         /* Specifies an absence of all flags       */

        #define NSP_Round     0x0080       /* Specifies that floating-point values    */
    /* should be rounded to the nearest integer*/
        #define NSP_TruncZero 0x0100      /* Specifies that floating-point values    */
    /* should be truncated toward zero         */
        #define NSP_TruncNeg  0x0200      /* Specifies that floating-point values    */
    /* should be truncated toward negative     */
    /* infinity                                */
        #define NSP_TruncPos  0x0400      /* Specifies that floating-point values    */
    /* should be truncated toward positive     */
    /* infinity                                */
        #define NSP_Unsigned  0x0800      /* Specifies that integer values are       */
    /* unsigned                                */
        #define NSP_Clip      0x1000     /* Specifies that floating-point values    */
    /* outside the allowable integer range     */
    /* are saturated to maximum(minimum)       */
    /* integer value                           */
        #define NSP_OvfErr    0x2000     /* Specifies that an overflow error should */
    /* be signaled with a call to nspError()   */

/*-------------------------------------------------------------------------*/
/* Maximum possible phase value for short function, corresponds to NSP_PI  */

        #define NSP_CVRT_MAXPHASE ((short)16383)

    #endif

/*-------------------------------------------------------------------------*/
/*             bFloatToInt, bIntToFloat                                    */
/*                                                                         */
/*Vector floating-point to integer and integer to floating-point conversion*/
/*-------------------------------------------------------------------------*/
/* FUNCTION:                                                               */
/*   nsp<s,d>bFloatToInt                                                   */
/* DESCRIPTION:                                                            */
/*   Converts the float point data in the input array and stores           */
/*   the results in the output array.                                      */
/* PARAMETERS:                                                             */
/*   src       - an input array to be converted;                           */
/*   dst       - an output array to store the result;                      */
/*   len       - a length of the arrays;                                   */
/*   wordSize  - specifies the size of an integer in bits,                 */
/*                     and must be 8, 16 or 32;                            */
/*   flags     - specifies the sort of the conversion and consists of the  */
/*               bitwise-OR of flags, defined in the beginnig of this file */
/*                                                                         */

    NSPAPI(void,nspsbFloatToInt,(const float  *src, void *dst, int len,
                                 int     wordSize,       int flags))
    NSPAPI(void,nspdbFloatToInt,(const double *src, void *dst, int len,
                                 int     wordSize,       int flags))

/* FUNCTION:                                                               */
/*   nsp<s,d>bIntToFloat                                                   */
/* DESCRIPTION:                                                            */
/*   Converts the integer data in the input array and stores the results   */
/*   in the output array                                                   */
/* PARAMETERS:                                                             */
/*   src       - an input array to be converted;                           */
/*   dst       - an output array to store the result;                      */
/*   len       - a length of the arrays;                                   */
/*   wordSize  - specifies the size of an integer in bits,                 */
/*                     and must be 8, 16 or 32;                            */
/*   flags     - specifies that integer values are unsigned or signed.     */
/*                                                                         */

    NSPAPI(void,nspsbIntToFloat,(const void *src, float  *dst, int len,
                                 int   wordSize,         int flags))
    NSPAPI(void,nspdbIntToFloat,(const void *src, double *dst, int len,
                                 int   wordSize,         int flags))

/*-------------------------------------------------------------------------*/
/*             bFloatToFix, bFixToFloat                                    */
/*                                                                         */
/* Vector floating-point to fixed-point and                                */
/*            fixed-point to floating-point conversion                     */
/*-------------------------------------------------------------------------*/
/* FUNCTION:                                                               */
/*   nsp<s,d>bFloatToFix                                                   */
/* DESCRIPTION:                                                            */
/*   Converts the floating-point data in the input array and stores        */
/*   the results in the output array.                                      */
/* PARAMETERS:                                                             */
/*   src       - an input array to be converted;                           */
/*   dst       - an output array to store the result;                      */
/*   len       - a length of the arrays;                                   */
/*   wordSize  - specifies the size of an fix-point in bits,               */
/*                     and must be 8, 16 or 32;                            */
/*   fractBits - specifies the number of fractional bits                   */
/*   flags     - specifies the sort of the conversion and consists of the  */
/*               bitwise-OR of flags, defined in the beginnig of this file */
/*                                                                         */

    NSPAPI(void,nspsbFloatToFix,(const float  *src,     void *dst,      int len,
                                 int     wordSize,int   fractBits,int flags))
    NSPAPI(void,nspdbFloatToFix,(const double *src,     void *dst,      int len,
                                 int     wordSize,int   fractBits,int flags))

/* FUNCTION:                                                               */
/*   nsp<s,d>bFixToFloat                                                   */
/* DESCRIPTION:                                                            */
/*   Converts the fixed-point data in the input array and stores the       */
/*       results in the output array                                       */
/* PARAMETERS:                                                             */
/*   src       - an input array to be converted;                           */
/*   dst       - an output array to store the result;                      */
/*   len       - a length of the arrays;                                   */
/*   wordSize  - specifies the size of an integer in bits,                 */
/*                     and must be 8, 16 or 32;                            */
/*   fractBits - specifies the number of fractional bits                   */
/*   flags     - specifies that fixed-point values are unsigned or signed  */
/*                                                                         */

    NSPAPI(void,nspsbFixToFloat,(const void *src,     float  *dst,      int len,
                                 int   wordSize,int     fractBits,int flags))
    NSPAPI(void,nspdbFixToFloat,(const void *src,     double *dst,      int len,
                                 int   wordSize,int     fractBits,int flags))


/*-------------------------------------------------------------------------*/
/* bFloatToS31Fix, bFloatToS15Fix, bFloatToS7Fix, bFloatToS1516Fix,        */
/* bS31FixToFloat, bS15FixToFloat, bS7FixToFloat, bS1516FixToFloat         */
/* Vector floating-point to fixed-point of format S.31, S.15, S.7, S15.16  */
/*                and fixed-point of format S.31, S.15, S.7, S15.16        */
/*                to floating-point conversion                             */
/*-------------------------------------------------------------------------*/
/* FUNCTION:                                                               */
/*   nsp<s,d>bFloatToS31Fix                                                */
/*   nsp<s,d>bFloatToS15Fix                                                */
/*   nsp<s,d>bFloatToS7Fix                                                 */
/*   nsp<s,d>bFloatToS1516Fix                                              */
/* DESCRIPTION:                                                            */
/*   Converts the floating-point data in the input array and stores        */
/*   the results in the output array.                                      */
/*   nsp?bFloatToS31Fix() to format of S.31 (a sign bit,31 fractional bits)*/
/*   nsp?bFloatToS15Fix() to format of S.15 (a sign bit,15 fractional bits)*/
/*   nsp?bFloatToS7Fix()  to format of S.7  (a sign bit,7  fractional bits)*/
/*   nsp?bFloatToS1516Fix() to format of S15.16                            */
/*                    (a sign bit, 15 integer bits, 16 fractional bits)    */
/* PARAMETERS:                                                             */
/*   src       - an input array to be converted;                           */
/*   dst       - an output array to store the result;                      */
/*   len       - a length of the arrays;                                   */
/*   flags     - specifies the sort of the conversion and consists of the  */
/*               bitwise-OR of flags, defined in the beginnig of this file */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -