xref: /aosp_15_r20/external/libopus/dnn/osce_config.h (revision a58d3d2adb790c104798cd88c8a3aff4fa8b82cc)
1 /* Copyright (c) 2023 Amazon
2    Written by Jan Buethe */
3 /*
4    Redistribution and use in source and binary forms, with or without
5    modification, are permitted provided that the following conditions
6    are met:
7 
8    - Redistributions of source code must retain the above copyright
9    notice, this list of conditions and the following disclaimer.
10 
11    - Redistributions in binary form must reproduce the above copyright
12    notice, this list of conditions and the following disclaimer in the
13    documentation and/or other materials provided with the distribution.
14 
15    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
19    OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27 
28 #ifndef OSCE_CONFIG
29 #define OSCE_CONFIG
30 
31 #define OSCE_FEATURES_MAX_HISTORY 350
32 #define OSCE_FEATURE_DIM 93
33 #define OSCE_MAX_FEATURE_FRAMES 4
34 
35 #define OSCE_CLEAN_SPEC_NUM_BANDS 64
36 #define OSCE_NOISY_SPEC_NUM_BANDS 18
37 
38 #define OSCE_NO_PITCH_VALUE 7
39 
40 #define OSCE_PREEMPH 0.85f
41 
42 #define OSCE_PITCH_HANGOVER 0
43 
44 #define OSCE_CLEAN_SPEC_START 0
45 #define OSCE_CLEAN_SPEC_LENGTH 64
46 
47 #define OSCE_NOISY_CEPSTRUM_START 64
48 #define OSCE_NOISY_CEPSTRUM_LENGTH 18
49 
50 #define OSCE_ACORR_START 82
51 #define OSCE_ACORR_LENGTH 5
52 
53 #define OSCE_LTP_START 87
54 #define OSCE_LTP_LENGTH 5
55 
56 #define OSCE_LOG_GAIN_START 92
57 #define OSCE_LOG_GAIN_LENGTH 1
58 
59 
60 #endif
61