osmo-gmr 0.2.104-2b98 Osmocom GMR-1

punct.h
Go to the documentation of this file.
1/* GMR-1 puncturing */
2/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V3.3.1) - Section 4.5 */
3
4/* (C) 2011-2019 by Sylvain Munaut <tnt@246tNt.com>
5 * All Rights Reserved
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
16 *
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __OSMO_GMR1_L1_PUNCT_H__
22#define __OSMO_GMR1_L1_PUNCT_H__
23
33#include <stdint.h>
34
35
37 struct gmr1_puncturer {
38 int r;
39 int L;
40 int N;
41 const uint8_t mask[];
42};
43
44
45 struct osmo_conv_code;
46
47 int gmr1_puncturer_generate(struct osmo_conv_code *code,
48 const struct gmr1_puncturer *punct_pre,
49 const struct gmr1_puncturer *punct_main,
50 const struct gmr1_puncturer *punct_post,
51 int repeat);
52
53
54/* Various puncturing codes used in GMR-1 */
55
56 extern const struct gmr1_puncturer gmr1_punct_k5_12_P23;
57 extern const struct gmr1_puncturer gmr1_punct_k5_12_P25;
58 extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps25;
59 extern const struct gmr1_puncturer gmr1_punct_k5_12_P311;
60 extern const struct gmr1_puncturer gmr1_punct_k5_12_P412;
61 extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps412;
62 extern const struct gmr1_puncturer gmr1_punct_k5_12_P12;
63 extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps12;
64 extern const struct gmr1_puncturer gmr1_punct_k5_12_A;
65 extern const struct gmr1_puncturer gmr1_punct_k5_12_B;
66 extern const struct gmr1_puncturer gmr1_punct_k5_12_C;
67 extern const struct gmr1_puncturer gmr1_punct_k5_12_D;
68 extern const struct gmr1_puncturer gmr1_punct_k5_12_E;
69 extern const struct gmr1_puncturer gmr1_punct_k5_12_P38;
70 extern const struct gmr1_puncturer gmr1_punct_k5_12_P26;
71 extern const struct gmr1_puncturer gmr1_punct_k5_12_P37;
72 extern const struct gmr1_puncturer gmr1_punct_k5_13_P16;
73 extern const struct gmr1_puncturer gmr1_punct_k5_13_P25;
74 extern const struct gmr1_puncturer gmr1_punct_k5_13_P15;
75 extern const struct gmr1_puncturer gmr1_punct_k5_13_Ps15;
76 extern const struct gmr1_puncturer gmr1_punct_k5_13_P78;
77 extern const struct gmr1_puncturer gmr1_punct_k5_15_P23;
78 extern const struct gmr1_puncturer gmr1_punct_k5_15_P53;
79 extern const struct gmr1_puncturer gmr1_punct_k5_15_Ps53;
80 extern const struct gmr1_puncturer gmr1_punct_k7_12_P23;
81 extern const struct gmr1_puncturer gmr1_punct_k7_12_P410;
82 extern const struct gmr1_puncturer gmr1_punct_k7_12_P512;
83 extern const struct gmr1_puncturer gmr1_punct_k7_12_P116;
84 extern const struct gmr1_puncturer gmr1_punct_k7_12_P148;
85 extern const struct gmr1_puncturer gmr1_punct_k7_12_P184;
86 extern const struct gmr1_puncturer gmr1_punct_k7_12_P1152;
87 extern const struct gmr1_puncturer gmr1_punct_k7_12_P45;
88 extern const struct gmr1_puncturer gmr1_punct_k7_12_P245;
89 extern const struct gmr1_puncturer gmr1_punct_k9_12_P13;
90 extern const struct gmr1_puncturer gmr1_punct_k9_12_P47;
91 extern const struct gmr1_puncturer gmr1_punct_k9_12_P34;
92 extern const struct gmr1_puncturer gmr1_punct_k9_12_P17;
93 extern const struct gmr1_puncturer gmr1_punct_k9_12_P19;
94 extern const struct gmr1_puncturer gmr1_punct_k9_12_P26;
95 extern const struct gmr1_puncturer gmr1_punct_k9_12_P110;
96 extern const struct gmr1_puncturer gmr1_punct_k9_12_P14;
97 extern const struct gmr1_puncturer gmr1_punct_k9_12_P45;
98 extern const struct gmr1_puncturer gmr1_punct_k9_12_P234;
99 extern const struct gmr1_puncturer gmr1_punct_k6_14_P45;
100 extern const struct gmr1_puncturer gmr1_punct_k9_14_P148;
101 extern const struct gmr1_puncturer gmr1_punct_k9_14_P65;
102 extern const struct gmr1_puncturer gmr1_punct_k9_13_P12;
103 extern const struct gmr1_puncturer gmr1_punct_k9_13_P1213;
104 extern const struct gmr1_puncturer gmr1_punct_k9_13_P44;
105 extern const struct gmr1_puncturer gmr1_punct_k9_13_P33;
106 extern const struct gmr1_puncturer gmr1_punct_k9_13_P65;
107
108
111#endif /* __OSMO_GMR1_L1_PUNCT_H__ */
gmr1_punct_k5_12_P37
const struct gmr1_puncturer gmr1_punct_k5_12_P37
GMR-1 P(3;7) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:358
gmr1_punct_k7_12_P512
const struct gmr1_puncturer gmr1_punct_k7_12_P512
GMR-1 P(5;12) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:515
gmr1_punct_k9_13_P44
const struct gmr1_puncturer gmr1_punct_k9_13_P44
GMR-1 P(4;4) puncturing code for the K=9 rate 1/3 conv coder.
Definition: punct.c:1127
gmr1_punct_k5_15_P53
const struct gmr1_puncturer gmr1_punct_k5_15_P53
GMR-1 P(5;3) puncturing code for the K=5 rate 1/5 conv coder.
Definition: punct.c:460
gmr1_punct_k7_12_P45
const struct gmr1_puncturer gmr1_punct_k7_12_P45
GMR-1 P(4;5) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:872
gmr1_punct_k5_12_Ps412
const struct gmr1_puncturer gmr1_punct_k5_12_Ps412
GMR-1 Ps(4;12) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:218
gmr1_punct_k9_12_P19
const struct gmr1_puncturer gmr1_punct_k9_12_P19
GMR-1 P(1;9) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:957
gmr1_punct_k9_12_P234
const struct gmr1_puncturer gmr1_punct_k9_12_P234
GMR-1 P2(3;4) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:1036
gmr1_punct_k7_12_P410
const struct gmr1_puncturer gmr1_punct_k7_12_P410
GMR-1 P(4;10) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:496
gmr1_punct_k9_13_P12
const struct gmr1_puncturer gmr1_punct_k9_13_P12
GMR-1 P(1;2) puncturing code for the K=9 rate 1/3 conv coder.
Definition: punct.c:1094
gmr1_punct_k5_12_C
const struct gmr1_puncturer gmr1_punct_k5_12_C
GMR-1 C puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:287
gmr1_punct_k9_12_P47
const struct gmr1_puncturer gmr1_punct_k9_12_P47
GMR-1 P(4;7) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:912
gmr1_punct_k5_15_Ps53
const struct gmr1_puncturer gmr1_punct_k5_15_Ps53
GMR-1 Ps(5;3) puncturing code for the K=5 rate 1/5 conv coder.
Definition: punct.c:472
gmr1_punct_k9_13_P33
const struct gmr1_puncturer gmr1_punct_k9_13_P33
GMR-1 P(3;3) puncturing code for the K=9 rate 1/3 conv coder.
Definition: punct.c:1140
gmr1_punct_k5_12_B
const struct gmr1_puncturer gmr1_punct_k5_12_B
GMR-1 B puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:274
gmr1_punct_k5_13_P16
const struct gmr1_puncturer gmr1_punct_k5_13_P16
GMR-1 P(1;6) puncturing code for the K=5 rate 1/3 conv coder.
Definition: punct.c:374
gmr1_punct_k7_12_P184
const struct gmr1_puncturer gmr1_punct_k7_12_P184
GMR-1 P(1;84) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:618
gmr1_punct_k5_12_A
const struct gmr1_puncturer gmr1_punct_k5_12_A
GMR-1 A puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:261
gmr1_punct_k9_12_P13
const struct gmr1_puncturer gmr1_punct_k9_12_P13
GMR-1 P(1;3) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:900
gmr1_punct_k7_12_P245
const struct gmr1_puncturer gmr1_punct_k7_12_P245
GMR-1 P2(4;5) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:886
gmr1_punct_k9_14_P65
const struct gmr1_puncturer gmr1_punct_k9_14_P65
GMR-1 P(6;5) puncturing code for the K=9 rate 1/4 conv coder.
Definition: punct.c:1080
gmr1_punct_k5_12_P311
const struct gmr1_puncturer gmr1_punct_k5_12_P311
GMR-1 P(3;11) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:177
gmr1_punct_k6_14_P45
const struct gmr1_puncturer gmr1_punct_k6_14_P45
GMR-1 P(4;5) puncturing code for the K=6 rate 1/4 conv coder.
Definition: punct.c:1049
gmr1_punct_k9_12_P14
const struct gmr1_puncturer gmr1_punct_k9_12_P14
GMR-1 P(1;4) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:1009
gmr1_punct_k9_12_P17
const struct gmr1_puncturer gmr1_punct_k9_12_P17
GMR-1 P(1;7) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:941
gmr1_punct_k9_13_P1213
const struct gmr1_puncturer gmr1_punct_k9_13_P1213
GMR-1 P(12;13) puncturing code for the K=9 rate 1/3 conv coder.
Definition: punct.c:1105
gmr1_punct_k5_13_P15
const struct gmr1_puncturer gmr1_punct_k5_13_P15
GMR-1 P(1;5) puncturing code for the K=5 rate 1/3 conv coder.
Definition: punct.c:403
gmr1_punct_k5_13_P25
const struct gmr1_puncturer gmr1_punct_k5_13_P25
GMR-1 P(2;5) puncturing code for the K=5 rate 1/3 conv coder.
Definition: punct.c:389
gmr1_punct_k5_12_E
const struct gmr1_puncturer gmr1_punct_k5_12_E
GMR-1 E puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:313
gmr1_puncturer_generate
int gmr1_puncturer_generate(struct osmo_conv_code *code, const struct gmr1_puncturer *punct_pre, const struct gmr1_puncturer *punct_main, const struct gmr1_puncturer *punct_post, int repeat)
Generate convolutional code puncturing array for a osmo_conv_code.
Definition: punct.c:49
gmr1_punct_k7_12_P23
const struct gmr1_puncturer gmr1_punct_k7_12_P23
GMR-1 P(2;3) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:484
gmr1_punct_k5_15_P23
const struct gmr1_puncturer gmr1_punct_k5_15_P23
GMR-1 P(2;3) puncturing code for the K=5 rate 1/5 conv coder.
Definition: punct.c:448
gmr1_punct_k5_12_P23
const struct gmr1_puncturer gmr1_punct_k5_12_P23
GMR-1 P(2;3) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:137
gmr1_punct_k5_13_P78
const struct gmr1_puncturer gmr1_punct_k5_13_P78
GMR-1 P(7;8) puncturing code for the K=5 rate 1/3 conv coder.
Definition: punct.c:431
gmr1_punct_k5_13_Ps15
const struct gmr1_puncturer gmr1_punct_k5_13_Ps15
GMR-1 Ps(1;5) puncturing code for the K=5 rate 1/3 conv coder.
Definition: punct.c:417
gmr1_punct_k9_12_P110
const struct gmr1_puncturer gmr1_punct_k9_12_P110
GMR-1 P(1;10) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:990
gmr1_punct_k5_12_P12
const struct gmr1_puncturer gmr1_punct_k5_12_P12
GMR-1 P(1;2) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:239
gmr1_punct_k9_13_P65
const struct gmr1_puncturer gmr1_punct_k9_13_P65
GMR-1 P(6;5) puncturing code for the K=9 rate 1/3 conv coder.
Definition: punct.c:1152
gmr1_punct_k9_12_P45
const struct gmr1_puncturer gmr1_punct_k9_12_P45
GMR-1 P(4;5) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:1022
gmr1_punct_k5_12_P25
const struct gmr1_puncturer gmr1_punct_k5_12_P25
GMR-1 P(2;5) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:149
gmr1_punct_k7_12_P116
const struct gmr1_puncturer gmr1_punct_k7_12_P116
GMR-1 P(1;16) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:536
gmr1_punct_k5_12_P26
const struct gmr1_puncturer gmr1_punct_k5_12_P26
GMR-1 P(2;6) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:343
gmr1_punct_k9_12_P26
const struct gmr1_puncturer gmr1_punct_k9_12_P26
GMR-1 P(2;6) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:975
gmr1_punct_k5_12_D
const struct gmr1_puncturer gmr1_punct_k5_12_D
GMR-1 D puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:300
gmr1_punct_k7_12_P148
const struct gmr1_puncturer gmr1_punct_k7_12_P148
GMR-1 P(1;48) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:561
gmr1_punct_k5_12_P38
const struct gmr1_puncturer gmr1_punct_k5_12_P38
GMR-1 P(3;8) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:326
gmr1_punct_k9_14_P148
const struct gmr1_puncturer gmr1_punct_k9_14_P148
GMR-1 P(14;8) puncturing code for the K=9 rate 1/4 conv coder.
Definition: punct.c:1063
gmr1_punct_k5_12_P412
const struct gmr1_puncturer gmr1_punct_k5_12_P412
GMR-1 P(4;12) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:197
gmr1_punct_k5_12_Ps25
const struct gmr1_puncturer gmr1_punct_k5_12_Ps25
GMR-1 Ps(2;5) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:163
gmr1_punct_k5_12_Ps12
const struct gmr1_puncturer gmr1_punct_k5_12_Ps12
GMR-1 Ps(1;2) puncturing code for the K=5 rate 1/2 conv coder.
Definition: punct.c:250
gmr1_punct_k9_12_P34
const struct gmr1_puncturer gmr1_punct_k9_12_P34
GMR-1 P(3;4) puncturing code for the K=9 rate 1/2 conv coder.
Definition: punct.c:928
gmr1_punct_k7_12_P1152
const struct gmr1_puncturer gmr1_punct_k7_12_P1152
GMR-1 P(1;152) puncturing code for the K=7 rate 1/2 conv coder.
Definition: punct.c:711
gmr1_puncturer
structure describing a puncturing code
Definition: punct.h:37
gmr1_puncturer::N
int N
Rate of the punctured convolutional code (1/N)
Definition: punct.h:40
gmr1_puncturer::L
int L
Length of the puncturing mask.
Definition: punct.h:39
gmr1_puncturer::r
int r
Number of punctured bits.
Definition: punct.h:38
gmr1_puncturer::mask
const uint8_t mask[]
Puncturing mask.
Definition: punct.h:41
osmo_conv_code