\doxysection{Interleaving}
\label{group__interleave}\index{Interleaving@{Interleaving}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ interleave.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 interleaving header. \end{DoxyCompactList}\item 
file \textbf{ interleave.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 interleaving implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gmr1\+\_\+interleaver}
\begin{DoxyCompactList}\small\item\em GMR1 inter-\/burst (de)interleaver state. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ gmr1\+\_\+interleave\+\_\+intra} (void $\ast$out, const void $\ast$in, int N)
\begin{DoxyCompactList}\small\item\em GMR-\/1 intra burst inteleaver. \end{DoxyCompactList}\item 
void \textbf{ gmr1\+\_\+deinterleave\+\_\+intra} (void $\ast$out, const void $\ast$in, int N)
\begin{DoxyCompactList}\small\item\em GMR-\/1 intra burst de-\/interleaver. \end{DoxyCompactList}\item 
int \textbf{ gmr1\+\_\+interleaver\+\_\+init} (struct \textbf{ gmr1\+\_\+interleaver} $\ast$il, int N, int K)
\begin{DoxyCompactList}\small\item\em GMR-\/1 inter burst interleaver initializer. \end{DoxyCompactList}\item 
void \textbf{ gmr1\+\_\+interleaver\+\_\+fini} (struct \textbf{ gmr1\+\_\+interleaver} $\ast$il)
\begin{DoxyCompactList}\small\item\em GMR-\/1 inter burst interleaver cleanup. \end{DoxyCompactList}\item 
void \textbf{ gmr1\+\_\+interleave\+\_\+inter} (struct \textbf{ gmr1\+\_\+interleaver} $\ast$il, void $\ast$bits\+\_\+epp, void $\ast$bits\+\_\+ep)
\begin{DoxyCompactList}\small\item\em GMR-\/1 inter burst interleaver. \end{DoxyCompactList}\item 
void \textbf{ gmr1\+\_\+deinterleave\+\_\+inter} (struct \textbf{ gmr1\+\_\+interleaver} $\ast$il, void $\ast$bits\+\_\+ep, void $\ast$bits\+\_\+epp)
\begin{DoxyCompactList}\small\item\em GMR-\/1 inter burst de-\/interleaver. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__interleave_ga342cfe4226b3a193e5944e6a8322d491}} 
\index{Interleaving@{Interleaving}!gmr1\_deinterleave\_inter@{gmr1\_deinterleave\_inter}}
\index{gmr1\_deinterleave\_inter@{gmr1\_deinterleave\_inter}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_deinterleave\_inter()}
{\footnotesize\ttfamily void gmr1\+\_\+deinterleave\+\_\+inter (\begin{DoxyParamCaption}\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il,  }\item[{void $\ast$}]{bits\+\_\+ep,  }\item[{void $\ast$}]{bits\+\_\+epp }\end{DoxyParamCaption})}



GMR-\/1 inter burst de-\/interleaver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em il} & The interleaver object \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+ep} & N bits output from de-\/interleaver \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+epp} & N bits input to de-\/interleaver\\
\hline
\end{DoxyParams}
bits\+\_\+ep and bits\+\_\+epp can be equal for inplace processing 

References \textbf{ gmr1\+\_\+interleaver\+::bits\+\_\+cpp}, \textbf{ gmr1\+\_\+interleaver\+::K}, \textbf{ gmr1\+\_\+interleaver\+::N}, and \textbf{ gmr1\+\_\+interleaver\+::n}.

\mbox{\label{group__interleave_ga101a51679fedd2c835225608f77ae3d8}} 
\index{Interleaving@{Interleaving}!gmr1\_deinterleave\_intra@{gmr1\_deinterleave\_intra}}
\index{gmr1\_deinterleave\_intra@{gmr1\_deinterleave\_intra}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_deinterleave\_intra()}
{\footnotesize\ttfamily void gmr1\+\_\+deinterleave\+\_\+intra (\begin{DoxyParamCaption}\item[{void $\ast$}]{out,  }\item[{const void $\ast$}]{in,  }\item[{int}]{N }\end{DoxyParamCaption})}



GMR-\/1 intra burst de-\/interleaver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em out} & Deinterleaved bit array to write to \\
\hline
\mbox{\texttt{ in}}  & {\em in} & Interleaved bit array to read from \\
\hline
\mbox{\texttt{ in}}  & {\em N} & Dimension of the interleaving matrix\\
\hline
\end{DoxyParams}
Both arrays need to have a length of (8$\ast$N). This routine works for any type that has the same size as uint8\+\_\+t like sbit\+\_\+t or ubit\+\_\+t. 

Referenced by \textbf{ gmr1\+\_\+bcch\+\_\+decode()}, \textbf{ gmr1\+\_\+ccch\+\_\+decode()}, \textbf{ gmr1\+\_\+facch3\+\_\+decode()}, \textbf{ gmr1\+\_\+facch9\+\_\+decode()}, \textbf{ gmr1\+\_\+rach\+\_\+decode()}, and \textbf{ gmr1\+\_\+xch\+\_\+dc12\+\_\+decode()}.

\mbox{\label{group__interleave_gac392346badff10ae6a2abfe8b1e96e32}} 
\index{Interleaving@{Interleaving}!gmr1\_interleave\_inter@{gmr1\_interleave\_inter}}
\index{gmr1\_interleave\_inter@{gmr1\_interleave\_inter}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_interleave\_inter()}
{\footnotesize\ttfamily void gmr1\+\_\+interleave\+\_\+inter (\begin{DoxyParamCaption}\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il,  }\item[{void $\ast$}]{bits\+\_\+epp,  }\item[{void $\ast$}]{bits\+\_\+ep }\end{DoxyParamCaption})}



GMR-\/1 inter burst interleaver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em il} & The interleaver object \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+epp} & N bits output of interleaver \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+ep} & N bits input to interleaver\\
\hline
\end{DoxyParams}
bits\+\_\+ep and bits\+\_\+epp can be equal for inplace processing 

References \textbf{ gmr1\+\_\+interleaver\+::bits\+\_\+cpp}, \textbf{ gmr1\+\_\+interleaver\+::K}, \textbf{ gmr1\+\_\+interleaver\+::N}, and \textbf{ gmr1\+\_\+interleaver\+::n}.

\mbox{\label{group__interleave_gaf54dd588068ba4225f190c091352bbc9}} 
\index{Interleaving@{Interleaving}!gmr1\_interleave\_intra@{gmr1\_interleave\_intra}}
\index{gmr1\_interleave\_intra@{gmr1\_interleave\_intra}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_interleave\_intra()}
{\footnotesize\ttfamily void gmr1\+\_\+interleave\+\_\+intra (\begin{DoxyParamCaption}\item[{void $\ast$}]{out,  }\item[{const void $\ast$}]{in,  }\item[{int}]{N }\end{DoxyParamCaption})}



GMR-\/1 intra burst inteleaver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em out} & Interleaved bit array to write to \\
\hline
\mbox{\texttt{ in}}  & {\em in} & Original bit array to read from \\
\hline
\mbox{\texttt{ in}}  & {\em N} & Dimension of the interleaving matrix\\
\hline
\end{DoxyParams}
Both arrays need to have a length of (8$\ast$N). This routine works for any type that has the same size as uint8\+\_\+t like sbit\+\_\+t or ubit\+\_\+t. \mbox{\label{group__interleave_gaaa98a1ab608c6146e9c8974687c75ed7}} 
\index{Interleaving@{Interleaving}!gmr1\_interleaver\_fini@{gmr1\_interleaver\_fini}}
\index{gmr1\_interleaver\_fini@{gmr1\_interleaver\_fini}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_interleaver\_fini()}
{\footnotesize\ttfamily void gmr1\+\_\+interleaver\+\_\+fini (\begin{DoxyParamCaption}\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il }\end{DoxyParamCaption})}



GMR-\/1 inter burst interleaver cleanup. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em il} & The interleaver object to release \\
\hline
\end{DoxyParams}


References \textbf{ gmr1\+\_\+interleaver\+::bits\+\_\+cpp}.

\mbox{\label{group__interleave_ga78f48b3938dcda4c06b4d2da3eaedcaf}} 
\index{Interleaving@{Interleaving}!gmr1\_interleaver\_init@{gmr1\_interleaver\_init}}
\index{gmr1\_interleaver\_init@{gmr1\_interleaver\_init}!Interleaving@{Interleaving}}
\doxysubsubsection{gmr1\_interleaver\_init()}
{\footnotesize\ttfamily int gmr1\+\_\+interleaver\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il,  }\item[{int}]{N,  }\item[{int}]{K }\end{DoxyParamCaption})}



GMR-\/1 inter burst interleaver initializer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em il} & The interleaver object to init \\
\hline
\mbox{\texttt{ in}}  & {\em N} & The interleaving depth \\
\hline
\mbox{\texttt{ in}}  & {\em K} & The interleaving width \\
\hline
\end{DoxyParams}


References \textbf{ gmr1\+\_\+interleaver\+::bits\+\_\+cpp}, \textbf{ gmr1\+\_\+interleaver\+::K}, and \textbf{ gmr1\+\_\+interleaver\+::N}.

