xref: /btstack/3rd-party/lc3-google/src/energy.h (revision 9a19cd786042b1fc78813d984efdd045e84593df)
1*9a19cd78SMatthias Ringwald /******************************************************************************
2*9a19cd78SMatthias Ringwald  *
3*9a19cd78SMatthias Ringwald  *  Copyright 2021 Google, Inc.
4*9a19cd78SMatthias Ringwald  *
5*9a19cd78SMatthias Ringwald  *  Licensed under the Apache License, Version 2.0 (the "License");
6*9a19cd78SMatthias Ringwald  *  you may not use this file except in compliance with the License.
7*9a19cd78SMatthias Ringwald  *  You may obtain a copy of the License at:
8*9a19cd78SMatthias Ringwald  *
9*9a19cd78SMatthias Ringwald  *  http://www.apache.org/licenses/LICENSE-2.0
10*9a19cd78SMatthias Ringwald  *
11*9a19cd78SMatthias Ringwald  *  Unless required by applicable law or agreed to in writing, software
12*9a19cd78SMatthias Ringwald  *  distributed under the License is distributed on an "AS IS" BASIS,
13*9a19cd78SMatthias Ringwald  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*9a19cd78SMatthias Ringwald  *  See the License for the specific language governing permissions and
15*9a19cd78SMatthias Ringwald  *  limitations under the License.
16*9a19cd78SMatthias Ringwald  *
17*9a19cd78SMatthias Ringwald  ******************************************************************************/
18*9a19cd78SMatthias Ringwald 
19*9a19cd78SMatthias Ringwald /**
20*9a19cd78SMatthias Ringwald  * LC3 - Energy estimation per band
21*9a19cd78SMatthias Ringwald  *
22*9a19cd78SMatthias Ringwald  * Reference : Low Complexity Communication Codec (LC3)
23*9a19cd78SMatthias Ringwald  *             Bluetooth Specification v1.0
24*9a19cd78SMatthias Ringwald  */
25*9a19cd78SMatthias Ringwald 
26*9a19cd78SMatthias Ringwald #ifndef __LC3_ENERGY_H
27*9a19cd78SMatthias Ringwald #define __LC3_ENERGY_H
28*9a19cd78SMatthias Ringwald 
29*9a19cd78SMatthias Ringwald #include "common.h"
30*9a19cd78SMatthias Ringwald 
31*9a19cd78SMatthias Ringwald 
32*9a19cd78SMatthias Ringwald /**
33*9a19cd78SMatthias Ringwald  * Energy estimation per band
34*9a19cd78SMatthias Ringwald  * dt, sr          Duration and samplerate of the frame
35*9a19cd78SMatthias Ringwald  * x               Input MDCT coefficient
36*9a19cd78SMatthias Ringwald  * e               Energy estimation per bands
37*9a19cd78SMatthias Ringwald  * return          True when high energy detected near Nyquist frequency
38*9a19cd78SMatthias Ringwald  */
39*9a19cd78SMatthias Ringwald bool lc3_energy_compute(
40*9a19cd78SMatthias Ringwald     enum lc3_dt dt, enum lc3_srate sr, const float *x, float *e);
41*9a19cd78SMatthias Ringwald 
42*9a19cd78SMatthias Ringwald 
43*9a19cd78SMatthias Ringwald #endif /* __LC3_ENERGY_H */
44