summaryrefslogtreecommitdiff
path: root/gsmstack/conv.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2008-12-01 10:28:04 +0530
committerHarald Welte <laforge@gnumonks.org>2008-12-01 10:28:04 +0530
commit10f2fcca8dd1be2719bccefa16fd9dac9a76c749 (patch)
tree0b521a2ccc7d0d81a89e08b05650dec2421777d2 /gsmstack/conv.h
parentfd405f799425b6832a0c9cc7a56b07f43288b8b1 (diff)
[gsmdecode] import {interleave,conv}.[ch] from gsm-tvoid
* change convolutional decode to cope with TCH * add tch.c file with reordering/decoding for TCH/F
Diffstat (limited to 'gsmstack/conv.h')
-rw-r--r--gsmstack/conv.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gsmstack/conv.h b/gsmstack/conv.h
new file mode 100644
index 0000000..4bd96a1
--- /dev/null
+++ b/gsmstack/conv.h
@@ -0,0 +1,24 @@
+/* This file was taken from gsm-tvoid */
+#ifndef _GSM_CONV_H
+#define _GSM_CONV_H
+
+#define DATA_BLOCK_SIZE 184
+#define PARITY_SIZE 40
+#define FLUSH_BITS_SIZE 4
+#define PARITY_OUTPUT_SIZE (DATA_BLOCK_SIZE + PARITY_SIZE + FLUSH_BITS_SIZE)
+
+#define CONV_INPUT_SIZE_TCH_F 189
+#define CONV_INPUT_SIZE_CCH PARITY_OUTPUT_SIZE
+#define CONV_MAX_INPUT_SIZE PARITY_OUTPUT_SIZE
+#define CONV_SIZE (2 * CONV_MAX_INPUT_SIZE)
+
+#define BLOCKS 4
+#define iBLOCK_SIZE (CONV_SIZE / BLOCKS)
+#define eBLOCK_SIZE (iBLOCK_SIZE + 2)
+
+int conv_decode(unsigned char *output, unsigned char *data,
+ unsigned int input_size);
+int parity_check(unsigned char *data);
+int compress_bits(unsigned char *dbuf, int dlen, unsigned char *src, int len);
+
+#endif /* _GSM_CONV_H */
personal git repositories of Harald Welte. Your mileage may vary