comparison libtwamr/cnst.h @ 252:57b4053559ff

libtwamr: beginning of project
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 05 Apr 2024 01:02:23 +0000
parents
children
comparison
equal deleted inserted replaced
251:946849291027 252:57b4053559ff
1 /*
2 *****************************************************************************
3 *
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
5 * R99 Version 3.3.0
6 * REL-4 Version 4.1.0
7 *
8 *****************************************************************************
9 *
10 * File : cnst.h
11 * Purpose : Speech codec constant parameters
12 * : (encoder, decoder, and postfilter)
13 *
14 *****************************************************************************
15 */
16 #ifndef cnst_h
17 #define cnst_h "$Id $"
18
19 #define L_TOTAL 320 /* Total size of speech buffer. */
20 #define L_WINDOW 240 /* Window size in LP analysis */
21 #define L_FRAME 160 /* Frame size */
22 #define L_FRAME_BY2 80 /* Frame size divided by 2 */
23 #define L_SUBFR 40 /* Subframe size */
24 #define L_CODE 40 /* codevector length */
25 #define NB_TRACK 5 /* number of tracks */
26 #define STEP 5 /* codebook step size */
27 #define NB_TRACK_MR102 4 /* number of tracks mode mr102 */
28 #define STEP_MR102 4 /* codebook step size mode mr102 */
29 #define M 10 /* Order of LP filter */
30 #define MP1 (M+1) /* Order of LP filter + 1 */
31 #define LSF_GAP 205 /* Minimum distance between LSF after quan-
32 tization; 50 Hz = 205 */
33 #define LSP_PRED_FAC_MR122 21299 /* MR122 LSP prediction factor (0.65 Q15) */
34 #define AZ_SIZE (4*M+4) /* Size of array of LP filters in 4 subfr.s */
35 #define PIT_MIN_MR122 18 /* Minimum pitch lag (MR122 mode) */
36 #define PIT_MIN 20 /* Minimum pitch lag (all other modes) */
37 #define PIT_MAX 143 /* Maximum pitch lag */
38 #define L_INTERPOL (10+1) /* Length of filter for interpolation */
39 #define L_INTER_SRCH 4 /* Length of filter for CL LTP search
40 interpolation */
41
42 #define MU 26214 /* Factor for tilt compensation filter 0.8 */
43 #define AGC_FAC 29491 /* Factor for automatic gain control 0.9 */
44
45 #define L_NEXT 40 /* Overhead in LP analysis */
46 #define SHARPMAX 13017 /* Maximum value of pitch sharpening */
47 #define SHARPMIN 0 /* Minimum value of pitch sharpening */
48
49
50 #define MAX_PRM_SIZE 57 /* max. num. of params */
51 #define MAX_SERIAL_SIZE 244 /* max. num. of serial bits */
52
53 #define GP_CLIP 15565 /* Pitch gain clipping = 0.95 */
54 #define N_FRAME 7 /* old pitch gains in average calculation */
55
56 #define EHF_MASK 0x0008 /* encoder homing frame pattern */
57
58 #endif