1b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber/* ------------------------------------------------------------------
2b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * Copyright (C) 1998-2009 PacketVideo
3b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber *
4b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * Licensed under the Apache License, Version 2.0 (the "License");
5b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * you may not use this file except in compliance with the License.
6b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * You may obtain a copy of the License at
7b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber *
8b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber *      http://www.apache.org/licenses/LICENSE-2.0
9b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber *
10b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * Unless required by applicable law or agreed to in writing, software
11b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * distributed under the License is distributed on an "AS IS" BASIS,
12b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * express or implied.
14b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * See the License for the specific language governing permissions
15b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * and limitations under the License.
16b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber * -------------------------------------------------------------------
17b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber */
18b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber/****************************************************************************************
19b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas HuberPortions of this file are derived from the following 3GPP standard:
20b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
21b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    3GPP TS 26.073
22b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    Available from http://www.3gpp.org
24b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
25b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber(C) 2004, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas HuberPermission to distribute, modify and use this file under the standard license
27b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huberterms listed above has been obtained from the copyright holder.
28b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber****************************************************************************************/
29b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber/*
30b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber********************************************************************************
31b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*
32b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*      GSM AMR-NB speech codec   R98   Version 7.5.0   March 2, 2001
33b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*                                R99   Version 3.2.0
34b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*                                REL-4 Version 4.0.0
35b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*
36b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber********************************************************************************
37b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*
38b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*      File             : calc_cor.h
39b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*      Purpose          : Calculate all correlations for prior the OL LTP
40b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*
41b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber********************************************************************************
42b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*/
43b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#ifndef calc_cor_h
44b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#define calc_cor_h "$Id $"
45b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
46b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber/*
47b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber********************************************************************************
48b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*                         INCLUDE FILES
49b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber********************************************************************************
50b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber*/
51b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#include "typedef.h"
52b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
53b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#ifdef __cplusplus
54b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huberextern "C"
55b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber{
56b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#endif
57b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
58b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    /*
59b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    ********************************************************************************
60b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    *                         DECLARATION OF PROTOTYPES
61b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    ********************************************************************************
62b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    */
63b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    /*************************************************************************
64b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *
65b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *  FUNCTION: comp_corr
66b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *
67b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *  PURPOSE: Calculate all correlations of scal_sig[] in a given delay
68b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *           range.
69b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *
70b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *  DESCRIPTION:
71b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *      The correlation is given by
72b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *           cor[t] = <scal_sig[n], scal_sig[n-t]>,  t=lag_min,...,lag_max
73b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *      The functions outputs all correlations in the given range
74b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *
75b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber     *************************************************************************/
76b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    void comp_corr(Word16 scal_sig[],   /* i   : scaled signal.                     */
77b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    Word16 L_frame,     /* i   : length of frame to compute pitch   */
78b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    Word16 lag_max,     /* i   : maximum lag                        */
79b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    Word16 lag_min,     /* i   : minimum lag                        */
80b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber    Word32 corr[]       /* o   : correlation of selected lag        */
81b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber                  );
82b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
83b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#ifdef __cplusplus
84b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber}
85b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#endif
86b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber
87b841f14f8e51f2365945281fbfa54ef6a1b1b5a6Andreas Huber#endif
88