Filter.h revision 2c8e5cab3faa6d360e222b7a6c40a80083d021ac
1/* 2 * Copyright (C) 2004-2010 NXP Software 3 * Copyright (C) 2010 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18/************************************************************************/ 19/* */ 20/* Project:: */ 21/* $Author: beq07716 $*/ 22/* $Revision: 771 $*/ 23/* $Date: 2010-06-14 10:41:36 +0200 (Mon, 14 Jun 2010) $*/ 24/* */ 25/************************************************************************/ 26 27#ifndef _FILTER_H_ 28#define _FILTER_H_ 29 30#ifdef __cplusplus 31extern "C" { 32#endif /* __cplusplus */ 33 34/********************************************************************************** 35 INCLUDES 36***********************************************************************************/ 37#include "LVM_Types.h" 38#include "BIQUAD.h" 39 40 41/********************************************************************************** 42 DEFINES 43***********************************************************************************/ 44#define FILTER_LOSS 32730 /* -0.01dB loss to avoid wrapping due to band ripple */ 45 46/********************************************************************************** 47 FUNCTION PROTOTYPES 48***********************************************************************************/ 49 50LVM_INT32 LVM_Polynomial(LVM_UINT16 N, 51 LVM_INT32 *pCoefficients, 52 LVM_INT32 X); 53 54LVM_INT32 LVM_Power10( LVM_INT32 X); 55 56LVM_INT32 LVM_FO_LPF( LVM_INT32 w, 57 FO_C32_Coefs_t *pCoeffs); 58 59LVM_INT32 LVM_FO_HPF( LVM_INT32 w, 60 FO_C32_Coefs_t *pCoeffs); 61 62LVM_INT32 LVM_GetOmega(LVM_UINT16 Fc, 63 LVM_Fs_en SampleRate); 64 65/**********************************************************************************/ 66#ifdef __cplusplus 67} 68#endif /* __cplusplus */ 69 70#endif /** _FILTER_H_ **/ 71 72