12c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*
22c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * Copyright (C) 2004-2010 NXP Software
32c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * Copyright (C) 2010 The Android Open Source Project
42c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent *
52c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * Licensed under the Apache License, Version 2.0 (the "License");
62c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * you may not use this file except in compliance with the License.
72c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * You may obtain a copy of the License at
82c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent *
92c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent *      http://www.apache.org/licenses/LICENSE-2.0
102c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent *
112c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * Unless required by applicable law or agreed to in writing, software
122c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * distributed under the License is distributed on an "AS IS" BASIS,
132c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * See the License for the specific language governing permissions and
152c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent * limitations under the License.
162c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent */
172c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent
182c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent#include "LVPSA_QPD.h"
192c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent
202c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/************************************************************************************/
212c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*                                                                                  */
222c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/* FUNCTION:            LVPSA_QPD_Init                                              */
232c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*                                                                                  */
242c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/* DESCRIPTION:                                                                     */
252c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*  Initialize a quasi peak filter instance.                                        */
262c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*                                                                                  */
272c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/* PARAMETERS:                                                                      */
282c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*  pQPD_State          Pointer to the filter state                                 */
292c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*   pTaps               Pointer to the filter's taps                               */
302c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*   pCoef               Pointer to the filter's coefficients                       */
312c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*                                                                                  */
322c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/* RETURNS:     void                                                                */
332c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/*                                                                                  */
342c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent/************************************************************************************/
352c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurentvoid LVPSA_QPD_Init (   pQPD_State_t       pQPD_State,
362c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent                        QPD_Taps_t        *pTaps,
372c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent                        QPD_C32_Coefs     *pCoef     )
382c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent{
392c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent    pQPD_State->pDelay  = pTaps->Storage;
402c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent    pQPD_State->Coefs[0]  = pCoef->KP;
412c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent    pQPD_State->Coefs[1]  = pCoef->KM;
422c8e5cab3faa6d360e222b7a6c40a80083d021acEric Laurent}
43