diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2016-03-08 10:16:31 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2016-09-12 15:51:17 -0600 |
commit | 8013c3de4261761497293cebb269612f7ce4efce (patch) | |
tree | 812eed202c0ce765962b35bb976fcb24a92ace0f | |
parent | eb9d362e6225e340a937f552ca2115cdfca4cf2b (diff) |
l1/punct: Add all puncturing codes used in GMR-1 3G
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | include/osmocom/gmr1/l1/punct.h | 67 | ||||
-rw-r--r-- | src/l1/punct.c | 910 | ||||
-rw-r--r-- | src/l1/tch3.c | 2 | ||||
-rw-r--r-- | src/l1/tch9.c | 6 |
4 files changed, 923 insertions, 62 deletions
diff --git a/include/osmocom/gmr1/l1/punct.h b/include/osmocom/gmr1/l1/punct.h index 81963a6..019fe84 100644 --- a/include/osmocom/gmr1/l1/punct.h +++ b/include/osmocom/gmr1/l1/punct.h @@ -1,5 +1,5 @@ /* GMR-1 puncturing */ -/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V1.2.1) - Section 4.5 */ +/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V3.3.1) - Section 4.5 */ /* (C) 2011-2016 by Sylvain Munaut <tnt@246tNt.com> * All Rights Reserved @@ -53,20 +53,57 @@ int gmr1_puncturer_generate(struct osmo_conv_code *code, /* Various puncturing codes used in GMR-1 */ -extern const struct gmr1_puncturer gmr1_punct12_P12; -extern const struct gmr1_puncturer gmr1_punct12_P23; -extern const struct gmr1_puncturer gmr1_punct12_P25; -extern const struct gmr1_puncturer gmr1_punct12_Ps25; -extern const struct gmr1_puncturer gmr1_punct12_P311; -extern const struct gmr1_puncturer gmr1_punct12_P412; -extern const struct gmr1_puncturer gmr1_punct12_Ps412; -extern const struct gmr1_puncturer gmr1_punct13_P25; -extern const struct gmr1_puncturer gmr1_punct13_P15; -extern const struct gmr1_puncturer gmr1_punct13_Ps15; -extern const struct gmr1_puncturer gmr1_punct13_P16; -extern const struct gmr1_puncturer gmr1_punct15_P23; -extern const struct gmr1_puncturer gmr1_punct15_P53; -extern const struct gmr1_puncturer gmr1_punct15_Ps53; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P23; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P25; +extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps25; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P311; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P412; +extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps412; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P12; +extern const struct gmr1_puncturer gmr1_punct_k5_12_Ps12; +extern const struct gmr1_puncturer gmr1_punct_k5_12_A; +extern const struct gmr1_puncturer gmr1_punct_k5_12_B; +extern const struct gmr1_puncturer gmr1_punct_k5_12_C; +extern const struct gmr1_puncturer gmr1_punct_k5_12_D; +extern const struct gmr1_puncturer gmr1_punct_k5_12_E; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P38; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P26; +extern const struct gmr1_puncturer gmr1_punct_k5_12_P37; +extern const struct gmr1_puncturer gmr1_punct_k5_13_P16; +extern const struct gmr1_puncturer gmr1_punct_k5_13_P25; +extern const struct gmr1_puncturer gmr1_punct_k5_13_P15; +extern const struct gmr1_puncturer gmr1_punct_k5_13_Ps15; +extern const struct gmr1_puncturer gmr1_punct_k5_13_P78; +extern const struct gmr1_puncturer gmr1_punct_k5_15_P23; +extern const struct gmr1_puncturer gmr1_punct_k5_15_P53; +extern const struct gmr1_puncturer gmr1_punct_k5_15_Ps53; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P23; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P410; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P512; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P116; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P148; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P184; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P1152; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P45; +extern const struct gmr1_puncturer gmr1_punct_k7_12_P245; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P13; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P47; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P34; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P17; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P19; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P26; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P110; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P14; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P45; +extern const struct gmr1_puncturer gmr1_punct_k9_12_P234; +extern const struct gmr1_puncturer gmr1_punct_k6_14_P45; +extern const struct gmr1_puncturer gmr1_punct_k9_14_P148; +extern const struct gmr1_puncturer gmr1_punct_k9_14_P65; +extern const struct gmr1_puncturer gmr1_punct_k9_13_P12; +extern const struct gmr1_puncturer gmr1_punct_k9_13_P1213; +extern const struct gmr1_puncturer gmr1_punct_k9_13_P44; +extern const struct gmr1_puncturer gmr1_punct_k9_13_P33; +extern const struct gmr1_puncturer gmr1_punct_k9_13_P65; /*! @} */ diff --git a/src/l1/punct.c b/src/l1/punct.c index 3c0f7f7..cc3af1a 100644 --- a/src/l1/punct.c +++ b/src/l1/punct.c @@ -1,5 +1,5 @@ /* GMR-1 puncturing */ -/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V1.2.1) - Section 4.5 */ +/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V3.3.1) - Section 4.5 */ /* (C) 2011-2016 by Sylvain Munaut <tnt@246tNt.com> * All Rights Reserved @@ -133,19 +133,8 @@ gmr1_puncturer_generate(struct osmo_conv_code *code, } -/*! \brief GMR-1 P(1;2) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_P12 = { - .r = 1, - .L = 2, - .N = 2, - .mask = { - 1, 1, - 1, 0, - }, -}; - -/*! \brief GMR-1 P(2;3) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_P23 = { +/*! \brief GMR-1 P(2;3) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P23 = { .r = 2, .L = 3, .N = 2, @@ -156,8 +145,8 @@ const struct gmr1_puncturer gmr1_punct12_P23 = { }, }; -/*! \brief GMR-1 P(2;5) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_P25 = { +/*! \brief GMR-1 P(2;5) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P25 = { .r = 2, .L = 5, .N = 2, @@ -170,8 +159,8 @@ const struct gmr1_puncturer gmr1_punct12_P25 = { }, }; -/*! \brief GMR-1 P*(2;5) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_Ps25 = { +/*! \brief GMR-1 Ps(2;5) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_Ps25 = { .r = 2, .L = 5, .N = 2, @@ -184,8 +173,8 @@ const struct gmr1_puncturer gmr1_punct12_Ps25 = { }, }; -/*! \brief GMR-1 P(3;11) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_P311 = { +/*! \brief GMR-1 P(3;11) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P311 = { .r = 3, .L = 11, .N = 2, @@ -204,8 +193,8 @@ const struct gmr1_puncturer gmr1_punct12_P311 = { }, }; -/*! \brief GMR-1 P(4;12) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_P412 = { +/*! \brief GMR-1 P(4;12) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P412 = { .r = 4, .L = 12, .N = 2, @@ -225,8 +214,8 @@ const struct gmr1_puncturer gmr1_punct12_P412 = { }, }; -/*! \brief GMR-1 P*(4;12) puncturing code for the rate 1/2 conv coder */ -const struct gmr1_puncturer gmr1_punct12_Ps412 = { +/*! \brief GMR-1 Ps(4;12) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_Ps412 = { .r = 4, .L = 12, .N = 2, @@ -246,8 +235,158 @@ const struct gmr1_puncturer gmr1_punct12_Ps412 = { }, }; -/*! \brief GMR-1 P(2;5) puncturing code for the rate 1/3 conv coder */ -const struct gmr1_puncturer gmr1_punct13_P25 = { +/*! \brief GMR-1 P(1;2) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P12 = { + .r = 1, + .L = 2, + .N = 2, + .mask = { + 1, 1, + 1, 0, + }, +}; + +/*! \brief GMR-1 Ps(1;2) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_Ps12 = { + .r = 1, + .L = 2, + .N = 2, + .mask = { + 1, 0, + 1, 1, + }, +}; + +/*! \brief GMR-1 A puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_A = { + .r = 0, + .L = 4, + .N = 2, + .mask = { + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 B puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_B = { + .r = 1, + .L = 4, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 C puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_C = { + .r = 2, + .L = 4, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 0, + 1, 1, + }, +}; + +/*! \brief GMR-1 D puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_D = { + .r = 3, + .L = 4, + .N = 2, + .mask = { + 0, 1, + 1, 0, + 0, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 E puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_E = { + .r = 1, + .L = 4, + .N = 2, + .mask = { + 1, 2, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(3;8) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P38 = { + .r = 3, + .L = 8, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 0, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 0, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(2;6) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P26 = { + .r = 2, + .L = 6, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 0, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(3;7) puncturing code for the K=5 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_12_P37 = { + .r = 3, + .L = 7, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;6) puncturing code for the K=5 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_13_P16 = { + .r = 1, + .L = 6, + .N = 3, + .mask = { + 1, 1, 0, + 1, 1, 1, + 1, 1, 1, + 1, 1, 1, + 1, 1, 1, + 1, 1, 1, + }, +}; + +/*! \brief GMR-1 P(2;5) puncturing code for the K=5 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_13_P25 = { .r = 2, .L = 5, .N = 3, @@ -260,8 +399,8 @@ const struct gmr1_puncturer gmr1_punct13_P25 = { }, }; -/*! \brief GMR-1 P(1;5) puncturing code for the rate 1/3 conv coder */ -const struct gmr1_puncturer gmr1_punct13_P15 = { +/*! \brief GMR-1 P(1;5) puncturing code for the K=5 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_13_P15 = { .r = 1, .L = 5, .N = 3, @@ -274,8 +413,8 @@ const struct gmr1_puncturer gmr1_punct13_P15 = { }, }; -/*! \brief GMR-1 P*(1;5) puncturing code for the rate 1/3 conv coder */ -const struct gmr1_puncturer gmr1_punct13_Ps15 = { +/*! \brief GMR-1 Ps(1;5) puncturing code for the K=5 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_13_Ps15 = { .r = 1, .L = 5, .N = 3, @@ -288,23 +427,25 @@ const struct gmr1_puncturer gmr1_punct13_Ps15 = { }, }; -/*! \brief GMR-1 P(1;6) puncturing code for the rate 1/3 conv coder */ -const struct gmr1_puncturer gmr1_punct13_P16 = { - .r = 1, - .L = 6, +/*! \brief GMR-1 P(7;8) puncturing code for the K=5 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_13_P78 = { + .r = 7, + .L = 8, .N = 3, .mask = { + 0, 0, 1, 1, 1, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, - 1, 1, 1, - 1, 1, 1, - 1, 1, 1, + 1, 1, 0, + 1, 0, 1, + 1, 0, 1, }, }; -/*! \brief GMR-1 P(2;3) puncturing code for the rate 1/5 conv coder */ -const struct gmr1_puncturer gmr1_punct15_P23 = { +/*! \brief GMR-1 P(2;3) puncturing code for the K=5 rate 1/5 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_15_P23 = { .r = 2, .L = 3, .N = 5, @@ -315,8 +456,8 @@ const struct gmr1_puncturer gmr1_punct15_P23 = { }, }; -/*! \brief GMR-1 P(5;3) puncturing code for the rate 1/5 conv coder */ -const struct gmr1_puncturer gmr1_punct15_P53 = { +/*! \brief GMR-1 P(5;3) puncturing code for the K=5 rate 1/5 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_15_P53 = { .r = 5, .L = 3, .N = 5, @@ -327,8 +468,8 @@ const struct gmr1_puncturer gmr1_punct15_P53 = { }, }; -/*! \brief GMR-1 P*(5;3) puncturing code for the rate 1/5 conv coder */ -const struct gmr1_puncturer gmr1_punct15_Ps53 = { +/*! \brief GMR-1 Ps(5;3) puncturing code for the K=5 rate 1/5 conv coder */ +const struct gmr1_puncturer gmr1_punct_k5_15_Ps53 = { .r = 5, .L = 3, .N = 5, @@ -339,4 +480,687 @@ const struct gmr1_puncturer gmr1_punct15_Ps53 = { }, }; +/*! \brief GMR-1 P(2;3) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P23 = { + .r = 2, + .L = 3, + .N = 2, + .mask = { + 1, 1, + 1, 0, + 0, 1, + }, +}; + +/*! \brief GMR-1 P(4;10) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P410 = { + .r = 4, + .L = 10, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 0, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(5;12) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P512 = { + .r = 5, + .L = 12, + .N = 2, + .mask = { + 1, 1, + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + }, +}; + +/*! \brief GMR-1 P(1;16) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P116 = { + .r = 1, + .L = 16, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;48) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P148 = { + .r = 1, + .L = 48, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;84) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P184 = { + .r = 1, + .L = 84, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;152) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P1152 = { + .r = 1, + .L = 152, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(4;5) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P45 = { + .r = 4, + .L = 5, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 1, 0, + 0, 1, + 1, 0, + }, +}; + +/*! \brief GMR-1 P2(4;5) puncturing code for the K=7 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k7_12_P245 = { + .r = 4, + .L = 5, + .N = 2, + .mask = { + 1, 0, + 0, 1, + 1, 0, + 0, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;3) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P13 = { + .r = 1, + .L = 3, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(4;7) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P47 = { + .r = 4, + .L = 7, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + 1, 1, + 1, 0, + }, +}; + +/*! \brief GMR-1 P(3;4) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P34 = { + .r = 3, + .L = 4, + .N = 2, + .mask = { + 1, 1, + 1, 0, + 0, 1, + 1, 0, + }, +}; + +/*! \brief GMR-1 P(1;7) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P17 = { + .r = 1, + .L = 7, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;9) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P19 = { + .r = 1, + .L = 9, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(2;6) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P26 = { + .r = 2, + .L = 6, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 0, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;10) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P110 = { + .r = 1, + .L = 10, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;4) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P14 = { + .r = 1, + .L = 4, + .N = 2, + .mask = { + 1, 0, + 1, 1, + 1, 1, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(4;5) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P45 = { + .r = 4, + .L = 5, + .N = 2, + .mask = { + 0, 1, + 1, 1, + 0, 1, + 1, 0, + 1, 0, + }, +}; + +/*! \brief GMR-1 P2(3;4) puncturing code for the K=9 rate 1/2 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_12_P234 = { + .r = 3, + .L = 4, + .N = 2, + .mask = { + 1, 0, + 0, 1, + 1, 0, + 1, 1, + }, +}; + +/*! \brief GMR-1 P(4;5) puncturing code for the K=6 rate 1/4 conv coder */ +const struct gmr1_puncturer gmr1_punct_k6_14_P45 = { + .r = 4, + .L = 5, + .N = 4, + .mask = { + 1, 0, 1, 1, + 1, 0, 1, 1, + 1, 1, 1, 0, + 1, 1, 1, 1, + 1, 1, 1, 0, + }, +}; + +/*! \brief GMR-1 P(14;8) puncturing code for the K=9 rate 1/4 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_14_P148 = { + .r = 14, + .L = 8, + .N = 4, + .mask = { + 1, 0, 0, 1, + 1, 0, 1, 0, + 1, 0, 1, 0, + 1, 0, 0, 1, + 1, 1, 0, 1, + 1, 0, 0, 1, + 1, 0, 0, 1, + 1, 1, 0, 1, + }, +}; + +/*! \brief GMR-1 P(6;5) puncturing code for the K=9 rate 1/4 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_14_P65 = { + .r = 6, + .L = 5, + .N = 4, + .mask = { + 0, 1, 1, 1, + 1, 0, 1, 1, + 1, 1, 1, 1, + 0, 0, 1, 0, + 1, 0, 1, 1, + }, +}; + +/*! \brief GMR-1 P(1;2) puncturing code for the K=9 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_13_P12 = { + .r = 1, + .L = 2, + .N = 3, + .mask = { + 1, 1, 1, + 0, 1, 1, + }, +}; + +/*! \brief GMR-1 P(12;13) puncturing code for the K=9 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_13_P1213 = { + .r = 12, + .L = 13, + .N = 3, + .mask = { + 1, 1, 0, + 1, 0, 1, + 0, 1, 1, + 1, 1, 0, + 1, 0, 1, + 0, 1, 1, + 1, 1, 0, + 1, 0, 1, + 0, 1, 1, + 1, 1, 0, + 1, 0, 1, + 0, 1, 1, + 1, 1, 1, + }, +}; + +/*! \brief GMR-1 P(4;4) puncturing code for the K=9 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_13_P44 = { + .r = 4, + .L = 4, + .N = 3, + .mask = { + 1, 1, 0, + 0, 1, 1, + 1, 0, 1, + 1, 1, 0, + }, +}; + +/*! \brief GMR-1 P(3;3) puncturing code for the K=9 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_13_P33 = { + .r = 3, + .L = 3, + .N = 3, + .mask = { + 0, 1, 1, + 1, 0, 1, + 1, 1, 0, + }, +}; + +/*! \brief GMR-1 P(6;5) puncturing code for the K=9 rate 1/3 conv coder */ +const struct gmr1_puncturer gmr1_punct_k9_13_P65 = { + .r = 6, + .L = 5, + .N = 3, + .mask = { + 1, 0, 1, + 0, 1, 1, + 1, 0, 0, + 0, 1, 1, + 1, 1, 0, + }, +}; + + /*! @} */ diff --git a/src/l1/tch3.c b/src/l1/tch3.c index db925ce..48e67ff 100644 --- a/src/l1/tch3.c +++ b/src/l1/tch3.c @@ -45,7 +45,7 @@ gmr1_tch3_init(void) /* Init convolutional coder */ memcpy(&gmr1_conv_tch3_speech, &gmr1_conv_tch3, sizeof(struct osmo_conv_code)); gmr1_conv_tch3_speech.len = 48; - gmr1_puncturer_generate(&gmr1_conv_tch3_speech, NULL, &gmr1_punct12_P12, NULL, 0); + gmr1_puncturer_generate(&gmr1_conv_tch3_speech, NULL, &gmr1_punct_k5_12_P12, NULL, 0); } diff --git a/src/l1/tch9.c b/src/l1/tch9.c index b68d97d..aa9ba99 100644 --- a/src/l1/tch9.c +++ b/src/l1/tch9.c @@ -60,21 +60,21 @@ gmr1_tch9_init(void) gmr1_conv_tch9_24.len = 144; gmr1_puncturer_generate( &gmr1_conv_tch9_24, - &gmr1_punct15_P53, &gmr1_punct15_P23, &gmr1_punct15_Ps53, 41 + &gmr1_punct_k5_15_P53, &gmr1_punct_k5_15_P23, &gmr1_punct_k5_15_Ps53, 41 ); memcpy(&gmr1_conv_tch9_48, &gmr1_conv_k5_13, sizeof(struct osmo_conv_code)); gmr1_conv_tch9_48.len = 240; gmr1_puncturer_generate( &gmr1_conv_tch9_48, - &gmr1_punct13_P15, &gmr1_punct13_P25, &gmr1_punct13_Ps15, 41 + &gmr1_punct_k5_13_P15, &gmr1_punct_k5_13_P25, &gmr1_punct_k5_13_Ps15, 41 ); memcpy(&gmr1_conv_tch9_96, &gmr1_conv_k5_12, sizeof(struct osmo_conv_code)); gmr1_conv_tch9_96.len = 480; gmr1_puncturer_generate( &gmr1_conv_tch9_96, - &gmr1_punct12_P25, &gmr1_punct12_P23, &gmr1_punct12_Ps25, 158 + &gmr1_punct_k5_12_P25, &gmr1_punct_k5_12_P23, &gmr1_punct_k5_12_Ps25, 158 ); } |