\doxysection{gsm0503\+\_\+coding.\+h}
\label{gsm0503__coding_8h_source}\index{include/osmocom/coding/gsm0503\_coding.h@{include/osmocom/coding/gsm0503\_coding.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/core/defs.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/core/bits.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{16 \textcolor{preprocessor}{\#define GSM0503\_GPRS\_BURSTS\_NBITS       (116 * 4)}}
\DoxyCodeLine{17 \textcolor{preprocessor}{\#define GSM0503\_EGPRS\_BURSTS\_NBITS      (348 * 4)}}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keyword}{enum} gsm0503\_egprs\_mcs \{}
\DoxyCodeLine{20         EGPRS\_MCS0,}
\DoxyCodeLine{21         EGPRS\_MCS1,}
\DoxyCodeLine{22         EGPRS\_MCS2,}
\DoxyCodeLine{23         EGPRS\_MCS3,}
\DoxyCodeLine{24         EGPRS\_MCS4,}
\DoxyCodeLine{25         EGPRS\_MCS5,}
\DoxyCodeLine{26         EGPRS\_MCS6,}
\DoxyCodeLine{27         EGPRS\_MCS7,}
\DoxyCodeLine{28         EGPRS\_MCS8,}
\DoxyCodeLine{29         EGPRS\_MCS9,}
\DoxyCodeLine{30         EGPRS\_NUM\_MCS,}
\DoxyCodeLine{31 \};}
\DoxyCodeLine{32 }
\DoxyCodeLine{33 \textcolor{keywordtype}{int} gsm0503\_xcch\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *l2\_data);}
\DoxyCodeLine{34 \textcolor{keywordtype}{int} gsm0503\_xcch\_decode(uint8\_t *l2\_data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{35         \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 \textcolor{keywordtype}{int} gsm0503\_pdtch\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *l2\_data, uint8\_t l2\_len);}
\DoxyCodeLine{38 \textcolor{keywordtype}{int} gsm0503\_pdtch\_decode(uint8\_t *l2\_data, \textcolor{keyword}{const} sbit\_t *bursts, uint8\_t *usf\_p,}
\DoxyCodeLine{39         \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{40 }
\DoxyCodeLine{41 \textcolor{keywordtype}{int} gsm0503\_pdtch\_egprs\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *l2\_data,}
\DoxyCodeLine{42         uint8\_t l2\_len);}
\DoxyCodeLine{43 \textcolor{keywordtype}{int} gsm0503\_pdtch\_egprs\_decode(uint8\_t *l2\_data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{44         uint16\_t nbits, uint8\_t *usf\_p, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{45 }
\DoxyCodeLine{46 \textcolor{keywordtype}{int} gsm0503\_tch\_fr\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *tch\_data, \textcolor{keywordtype}{int} len,}
\DoxyCodeLine{47         \textcolor{keywordtype}{int} net\_order);}
\DoxyCodeLine{48 \textcolor{keywordtype}{int} gsm0503\_tch\_fr\_decode(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts, \textcolor{keywordtype}{int} net\_order,}
\DoxyCodeLine{49         \textcolor{keywordtype}{int} efr, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keywordtype}{int} gsm0503\_tch\_hr\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *tch\_data, \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{52 \textcolor{keywordtype}{int} gsm0503\_tch\_hr\_decode(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts, \textcolor{keywordtype}{int} odd,}
\DoxyCodeLine{53         \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total)}
\DoxyCodeLine{54         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use gsm0503\_tch\_hr\_decode2() instead"{}});}
\DoxyCodeLine{55 \textcolor{keywordtype}{int} gsm0503\_tch\_hr\_decode2(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts, \textcolor{keywordtype}{int} odd,}
\DoxyCodeLine{56         \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{57 }
\DoxyCodeLine{58 \textcolor{keywordtype}{int} gsm0503\_tch\_afs\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *tch\_data, \textcolor{keywordtype}{int} len,}
\DoxyCodeLine{59         \textcolor{keywordtype}{int} codec\_mode\_req, \textcolor{keyword}{const} uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t ft,}
\DoxyCodeLine{60         uint8\_t cmr);}
\DoxyCodeLine{61 \textcolor{keywordtype}{int} gsm0503\_tch\_afs\_decode(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{62         \textcolor{keywordtype}{int} codec\_mode\_req, uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t *ft,}
\DoxyCodeLine{63         uint8\_t *cmr, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{64 \textcolor{keywordtype}{int} gsm0503\_tch\_afs\_decode\_dtx(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{65         \textcolor{keywordtype}{int} codec\_mode\_req, uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t *ft,}
\DoxyCodeLine{66         uint8\_t *cmr, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total, uint8\_t *dtx);}
\DoxyCodeLine{67 }
\DoxyCodeLine{68 \textcolor{keywordtype}{int} gsm0503\_tch\_ahs\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *tch\_data, \textcolor{keywordtype}{int} len,}
\DoxyCodeLine{69         \textcolor{keywordtype}{int} codec\_mode\_req, \textcolor{keyword}{const} uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t ft, uint8\_t cmr);}
\DoxyCodeLine{70 \textcolor{keywordtype}{int} gsm0503\_tch\_ahs\_decode(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts, \textcolor{keywordtype}{int} odd,}
\DoxyCodeLine{71         \textcolor{keywordtype}{int} codec\_mode\_req, uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t *ft,}
\DoxyCodeLine{72         uint8\_t *cmr, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{73 \textcolor{keywordtype}{int} gsm0503\_tch\_ahs\_decode\_dtx(uint8\_t *tch\_data, \textcolor{keyword}{const} sbit\_t *bursts, \textcolor{keywordtype}{int} odd,}
\DoxyCodeLine{74         \textcolor{keywordtype}{int} codec\_mode\_req, uint8\_t *codec, \textcolor{keywordtype}{int} codecs, uint8\_t *ft,}
\DoxyCodeLine{75         uint8\_t *cmr, \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total, uint8\_t *dtx);}
\DoxyCodeLine{76 }
\DoxyCodeLine{77 \textcolor{keywordtype}{int} gsm0503\_rach\_ext\_encode(ubit\_t *burst, uint16\_t ra, uint8\_t bsic, \textcolor{keywordtype}{bool} is\_11bit);}
\DoxyCodeLine{78 \textcolor{keywordtype}{int} gsm0503\_rach\_encode(ubit\_t *burst, \textcolor{keyword}{const} uint8\_t *ra, uint8\_t bsic) OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use gsm0503\_rach\_ext\_encode() instead"{}});}
\DoxyCodeLine{79 }
\DoxyCodeLine{80 \textcolor{keywordtype}{int} gsm0503\_rach\_decode(uint8\_t *ra, \textcolor{keyword}{const} sbit\_t *burst, uint8\_t bsic)}
\DoxyCodeLine{81         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use gsm0503\_rach\_decode\_ber() instead"{}});}
\DoxyCodeLine{82 \textcolor{keywordtype}{int} gsm0503\_rach\_decode\_ber(uint8\_t *ra, \textcolor{keyword}{const} sbit\_t *burst, uint8\_t bsic,}
\DoxyCodeLine{83                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{84 \textcolor{keywordtype}{int} gsm0503\_rach\_ext\_decode(uint16\_t *ra, \textcolor{keyword}{const} sbit\_t *burst, uint8\_t bsic)}
\DoxyCodeLine{85         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use gsm0503\_rach\_ext\_decode\_ber() instead"{}});}
\DoxyCodeLine{86 \textcolor{keywordtype}{int} gsm0503\_rach\_ext\_decode\_ber(uint16\_t *ra, \textcolor{keyword}{const} sbit\_t *burst, uint8\_t bsic,}
\DoxyCodeLine{87                                 \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{88 }
\DoxyCodeLine{89 \textcolor{keywordtype}{int} gsm0503\_sch\_encode(ubit\_t *burst, \textcolor{keyword}{const} uint8\_t *sb\_info);}
\DoxyCodeLine{90 \textcolor{keywordtype}{int} gsm0503\_sch\_decode(uint8\_t *sb\_info, \textcolor{keyword}{const} sbit\_t *burst);}
\DoxyCodeLine{91 }
\DoxyCodeLine{92 \textcolor{keywordtype}{int} gsm0503\_tch\_fr96\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{93 \textcolor{keywordtype}{int} gsm0503\_tch\_fr96\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{94                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{95 }
\DoxyCodeLine{96 \textcolor{keywordtype}{int} gsm0503\_tch\_fr48\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{97 \textcolor{keywordtype}{int} gsm0503\_tch\_fr48\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{98                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{99 }
\DoxyCodeLine{100 \textcolor{keywordtype}{int} gsm0503\_tch\_hr48\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{101 \textcolor{keywordtype}{int} gsm0503\_tch\_hr48\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{102                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{103 }
\DoxyCodeLine{104 \textcolor{keywordtype}{int} gsm0503\_tch\_fr24\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{105 \textcolor{keywordtype}{int} gsm0503\_tch\_fr24\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{106                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{107 }
\DoxyCodeLine{108 \textcolor{keywordtype}{int} gsm0503\_tch\_hr24\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{109 \textcolor{keywordtype}{int} gsm0503\_tch\_hr24\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{110                             \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{111 }
\DoxyCodeLine{112 \textcolor{keywordtype}{int} gsm0503\_tch\_fr144\_encode(ubit\_t *bursts, \textcolor{keyword}{const} ubit\_t *data);}
\DoxyCodeLine{113 \textcolor{keywordtype}{int} gsm0503\_tch\_fr144\_decode(ubit\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{114                              \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{keywordtype}{int} gsm0503\_tch\_fr\_facch\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *data);}
\DoxyCodeLine{117 \textcolor{keywordtype}{int} gsm0503\_tch\_fr\_facch\_decode(uint8\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{118                                 \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{119 }
\DoxyCodeLine{120 \textcolor{keywordtype}{int} gsm0503\_tch\_hr\_facch\_encode(ubit\_t *bursts, \textcolor{keyword}{const} uint8\_t *data);}
\DoxyCodeLine{121 \textcolor{keywordtype}{int} gsm0503\_tch\_hr\_facch\_decode(uint8\_t *data, \textcolor{keyword}{const} sbit\_t *bursts,}
\DoxyCodeLine{122                                 \textcolor{keywordtype}{int} *n\_errors, \textcolor{keywordtype}{int} *n\_bits\_total);}
\DoxyCodeLine{123 }

\end{DoxyCode}
