setup.c

来自「手机加密通话软件」· C语言 代码 · 共 82 行

C
82
字号
/* Copyright 2001,2002,2003 NAH6
 * All Rights Reserved
 *
 * Parts Copyright DoD, Parts Copyright Starium
 *
 */
#include <stddef.h>
#include <stdio.h>
#include <string.h>

#include "celpfilt.h"


/**************************************************************************
*                                                                         *
* ROUTINE
*               setup
*
* FUNCTION
*               CELP setup
* SYNOPSIS
*
*   formal
*
*                       data    I/O
*       name            type    type    function
*       -------------------------------------------------------------------
*       argc            int     i       number of command line arguments
*       argv            char    i       array of arguments and file names
*       fp_ifile        FILE    o       input file pointer
*       fp_ofile        FILE    o       ouput file pointer
*
***************************************************************************
*
* CALLED BY
*
*       celp
*
* CALLS
*       cli
*
**************************************************************************/
void setup_filters (void)
{
/* Set up filters */
  /* Analysis Filters */
            /* High Pass filter for input speech */
            InputHPFZ = makebigfilt(InputHPFCoefsZ, InputHPFOrder, InputHPFLength);
            InputHPFP = makebigfilt(InputHPFCoefsP, InputHPFOrder, InputHPFLength);

            /* Variable filters for determination of residual after LP
                analysis */
            LP_ResZ = makefilt_dynamic(ORDER, RES_LEN);
            LP_ResP = makefilt_dynamic(ORDER, RES_LEN);
            LP_ResP2 = makefilt_dynamic(ORDER, RES_LEN);

            /* Variable filters for determination of residual after Adaptive
                analysis */
            Adapt_ResZ = makefilt_dynamic(ORDER, RES_LEN);
            Adapt_ResP = makefilt_dynamic(ORDER, RES_LEN);
            Adapt_ResP2 = makefilt_dynamic(ORDER, RES_LEN);

            /* Variable filters for updating status of LP and Adaptive residual
                filters */
            Update_ResZ = makefilt_dynamic(ORDER, RES_LEN);
            Update_ResP = makefilt_dynamic(ORDER, RES_LEN);
            Update_ResP2 = makefilt_dynamic(ORDER, RES_LEN);

  /* Synthesis Filters */
            /* Variable filter for LP synthesis */
            LP_Filt = makefilt_dynamic(ORDER, SF_LEN);

            /*  Variable filter for post filter */
            PostZ = makefilt_dynamic(ORDER, SF_LEN);
            PostZ2 = makefilt_dynamic(1, SF_LEN);
            PostP = makefilt_dynamic(ORDER, SF_LEN);

            /*  High Pass filter for output speech */
            OutputHPFZ = makebigfilt(InputHPFCoefsZ, 2, SF_LEN);
            OutputHPFP = makebigfilt(InputHPFCoefsP, 2, SF_LEN);
}

⌨️ 快捷键说明

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