1/* 2 ** Copyright 2003-2010, VisualOn, Inc. 3 ** 4 ** Licensed under the Apache License, Version 2.0 (the "License"); 5 ** you may not use this file except in compliance with the License. 6 ** You may obtain a copy of the License at 7 ** 8 ** http://www.apache.org/licenses/LICENSE-2.0 9 ** 10 ** Unless required by applicable law or agreed to in writing, software 11 ** distributed under the License is distributed on an "AS IS" BASIS, 12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 ** See the License for the specific language governing permissions and 14 ** limitations under the License. 15 */ 16 17/*--------------------------------------------------------------------------* 18 * P_MED_O.H * 19 *--------------------------------------------------------------------------* 20 * Median open-loop lag search * 21 *--------------------------------------------------------------------------*/ 22 23#ifndef __P_MED_O_H__ 24#define __P_MED_O_H__ 25 26Word16 Pitch_med_ol( /* output: open loop pitch lag */ 27 Word16 wsp[], /* input : signal used to compute the open loop pitch */ 28 /* wsp[-pit_max] to wsp[-1] should be known */ 29 Word16 L_min, /* input : minimum pitch lag */ 30 Word16 L_max, /* input : maximum pitch lag */ 31 Word16 L_frame, /* input : length of frame to compute pitch */ 32 Word16 L_0, /* input : old_ open-loop pitch */ 33 Word16 * gain, /* output: normalize correlation of hp_wsp for the Lag */ 34 Word16 * hp_wsp_mem, /* i:o : memory of the hypass filter for hp_wsp[] (lg=9) */ 35 Word16 * old_hp_wsp, /* i:o : hypass wsp[] */ 36 Word16 wght_flg /* input : is weighting function used */ 37 ); 38 39Word16 Med_olag( /* output : median of 5 previous open-loop lags */ 40 Word16 prev_ol_lag, /* input : previous open-loop lag */ 41 Word16 old_ol_lag[5] 42 ); 43 44void Hp_wsp( 45 Word16 wsp[], /* i : wsp[] signal */ 46 Word16 hp_wsp[], /* o : hypass wsp[] */ 47 Word16 lg, /* i : lenght of signal */ 48 Word16 mem[] /* i/o : filter memory [9] */ 49 ); 50 51#endif //__P_MED_O_H__ 52 53