osmo-gmr: include/osmocom/gmr1/l1/interleave.h Source File

osmo-gmr 0.2.104-2b98 Osmocom GMR-1

interleave.h
Go to the documentation of this file.
1/* GMR-1 interleaving */
2/* See GMR-1 05.003 (ETSI TS 101 376-5-3 V1.2.1) - Section 4.8 */
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_INTERLEAVE_H__
22#define __OSMO_GMR1_L1_INTERLEAVE_H__
23
34/* Intra burst interleaving */
35
36void gmr1_interleave_intra(void *out, const void *in, int N);
37void gmr1_deinterleave_intra(void *out, const void *in, int N);
38
39
40/* Inter burst interleaving */
41
43 struct gmr1_interleaver
44{
45 int N;
46 int K;
47 int n;
48 uint8_t *bits_cpp;
49};
50
51int gmr1_interleaver_init(struct gmr1_interleaver *il, int N, int K);
52void gmr1_interleaver_fini(struct gmr1_interleaver *il);
53void gmr1_interleave_inter(struct gmr1_interleaver *il,
54 void *bits_epp, void *bits_ep);
55void gmr1_deinterleave_inter(struct gmr1_interleaver *il,
56 void *bits_ep, void *bits_epp);
57
58
61#endif /* __OSMO_GMR1_L1_INTERLEAVE_H__ */
gmr1_deinterleave_intra
void gmr1_deinterleave_intra(void *out, const void *in, int N)
GMR-1 intra burst de-interleaver.
Definition: interleave.c:74
gmr1_deinterleave_inter
void gmr1_deinterleave_inter(struct gmr1_interleaver *il, void *bits_ep, void *bits_epp)
GMR-1 inter burst de-interleaver.
Definition: interleave.c:168
gmr1_interleaver_init
int gmr1_interleaver_init(struct gmr1_interleaver *il, int N, int K)
GMR-1 inter burst interleaver initializer.
Definition: interleave.c:96
gmr1_interleaver_fini
void gmr1_interleaver_fini(struct gmr1_interleaver *il)
GMR-1 inter burst interleaver cleanup.
Definition: interleave.c:121
gmr1_interleave_inter
void gmr1_interleave_inter(struct gmr1_interleaver *il, void *bits_epp, void *bits_ep)
GMR-1 inter burst interleaver.
Definition: interleave.c:136
gmr1_interleave_intra
void gmr1_interleave_intra(void *out, const void *in, int N)
GMR-1 intra burst inteleaver.
Definition: interleave.c:49
gmr1_interleaver
GMR1 inter-burst (de)interleaver state.
Definition: interleave.h:44
gmr1_interleaver::K
int K
Interleaver width.
Definition: interleave.h:46
gmr1_interleaver::n
int n
Current burst number.
Definition: interleave.h:47
gmr1_interleaver::bits_cpp
uint8_t * bits_cpp
c'' bit state storage
Definition: interleave.h:48
gmr1_interleaver::N
int N
Interleaver depth.
Definition: interleave.h:45