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
38 int r;
39 int L;
40 int N;
41 const uint8_t mask[];
42};
43
44
45struct osmo_conv_code;
46
47int 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
56extern const struct gmr1_puncturer gmr1_punct_k5_12_P23;
57extern const struct gmr1_puncturer gmr1_punct_k5_12_P25;
58extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps25;
59extern const struct gmr1_puncturer gmr1_punct_k5_12_P311;
60extern const struct gmr1_puncturer gmr1_punct_k5_12_P412;
61extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps412;
62extern const struct gmr1_puncturer gmr1_punct_k5_12_P12;
63extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps12;
64extern const struct gmr1_puncturer gmr1_punct_k5_12_A;
65extern const struct gmr1_puncturer gmr1_punct_k5_12_B;
66extern const struct gmr1_puncturer gmr1_punct_k5_12_C;
67extern const struct gmr1_puncturer gmr1_punct_k5_12_D;
68extern const struct gmr1_puncturer gmr1_punct_k5_12_E;
69extern const struct gmr1_puncturer gmr1_punct_k5_12_P38;
70extern const struct gmr1_puncturer gmr1_punct_k5_12_P26;
71extern const struct gmr1_puncturer gmr1_punct_k5_12_P37;
72extern const struct gmr1_puncturer gmr1_punct_k5_13_P16;
73extern const struct gmr1_puncturer gmr1_punct_k5_13_P25;
74extern const struct gmr1_puncturer gmr1_punct_k5_13_P15;
75extern const struct gmr1_puncturer gmr1_punct_k5_13_Ps15;
76extern const struct gmr1_puncturer gmr1_punct_k5_13_P78;
77extern const struct gmr1_puncturer gmr1_punct_k5_15_P23;
78extern const struct gmr1_puncturer gmr1_punct_k5_15_P53;
79extern const struct gmr1_puncturer gmr1_punct_k5_15_Ps53;
80extern const struct gmr1_puncturer gmr1_punct_k7_12_P23;
81extern const struct gmr1_puncturer gmr1_punct_k7_12_P410;
82extern const struct gmr1_puncturer gmr1_punct_k7_12_P512;
83extern const struct gmr1_puncturer gmr1_punct_k7_12_P116;
84extern const struct gmr1_puncturer gmr1_punct_k7_12_P148;
85extern const struct gmr1_puncturer gmr1_punct_k7_12_P184;
86extern const struct gmr1_puncturer gmr1_punct_k7_12_P1152;
87extern const struct gmr1_puncturer gmr1_punct_k7_12_P45;
88extern const struct gmr1_puncturer gmr1_punct_k7_12_P245;
89extern const struct gmr1_puncturer gmr1_punct_k9_12_P13;
90extern const struct gmr1_puncturer gmr1_punct_k9_12_P47;
91extern const struct gmr1_puncturer gmr1_punct_k9_12_P34;
92extern const struct gmr1_puncturer gmr1_punct_k9_12_P17;
93extern const struct gmr1_puncturer gmr1_punct_k9_12_P19;
94extern const struct gmr1_puncturer gmr1_punct_k9_12_P26;
95extern const struct gmr1_puncturer gmr1_punct_k9_12_P110;
96extern const struct gmr1_puncturer gmr1_punct_k9_12_P14;
97extern const struct gmr1_puncturer gmr1_punct_k9_12_P45;
98extern const struct gmr1_puncturer gmr1_punct_k9_12_P234;
99extern const struct gmr1_puncturer gmr1_punct_k6_14_P45;
100extern const struct gmr1_puncturer gmr1_punct_k9_14_P148;
101extern const struct gmr1_puncturer gmr1_punct_k9_14_P65;
102extern const struct gmr1_puncturer gmr1_punct_k9_13_P12;
103extern const struct gmr1_puncturer gmr1_punct_k9_13_P1213;
104extern const struct gmr1_puncturer gmr1_punct_k9_13_P44;
105extern const struct gmr1_puncturer gmr1_punct_k9_13_P33;
106extern const struct gmr1_puncturer gmr1_punct_k9_13_P65;
107
108
111#endif /* __OSMO_GMR1_L1_PUNCT_H__ */
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
structure describing a puncturing code
Definition: punct.h:37
int N
Rate of the punctured convolutional code (1/N)
Definition: punct.h:40
int L
Length of the puncturing mask.
Definition: punct.h:39
int r
Number of punctured bits.
Definition: punct.h:38
const uint8_t mask[]
Puncturing mask.
Definition: punct.h:41