blob: 3ef2fbc55e116717eabeb232706f266b6f5743a9 [file] [log] [blame]
Pau Espin Pedrol71ed4632022-09-02 18:51:19 +02001/*
2 * (C) 2019-2022 by sysmocom s.f.m.c. GmbH <info@sysmocom.de>
3 * All rights reserved.
4 *
5 * Author: Pau Espin Pedrol <pespin@sysmocom.de>
6 *
7 * Released under the terms of GNU General Public License, Version 2 or
8 * (at your option) any later version.
9 */
10
11module AMR_Types {
12
13import from General_Types all;
14
15/* AMR voice frame type identifiers
16 * See also 3GPP TS 26.101, Table 1a: Interpretation of Frame Type, Mode
17 * Indication and Mode Request fields */
18type enumerated AMRFT {
19 AMR_FT_0, /* 4.75 */
20 AMR_FT_1, /* 5.15 */
21 AMR_FT_2, /* 5.90 */
22 AMR_FT_3, /* 6.70 */
23 AMR_FT_4, /* 7.40 */
24 AMR_FT_5, /* 7.95 */
25 AMR_FT_6, /* 10.2 */
26 AMR_FT_7, /* 12.2 */
27 AMR_FT_SID /* SID */
28};
29
30/* AMR voice frame length (in bytes, rounded),
31 * See also RFC 3267, chapter 3.6 */
32const integer c_AMRFT_len[9] := {12, 13, 15, 17, 19, 20, 26, 31, 5};
33
34function f_amrft_payload_len(INT4b amr_ft) return integer {
35 return c_AMRFT_len[amr_ft];
36}
37
38} with { encode "RAW"}