\doxysection{Convolutional encoding and decoding routines}
\label{group__conv}\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}


Osmocom convolutional encoder and decoder.  


\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ conv.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom convolutional encoder and decoder. \end{DoxyCompactList}\item 
file \textbf{ conv.\+c}
\begin{DoxyCompactList}\small\item\em Generic convolutional encoding / decoding. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+conv\+\_\+code}
\begin{DoxyCompactList}\small\item\em structure describing a given convolutional code \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+conv\+\_\+encoder}
\begin{DoxyCompactList}\small\item\em convolutional encoder state \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+conv\+\_\+decoder}
\begin{DoxyCompactList}\small\item\em convolutional decoder state \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MAX\+\_\+\+AE}~0x00ffffff
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+conv\+\_\+term} \{ \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH} = 0
, \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+TRUNCATION}
, \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING}
 \}
\begin{DoxyCompactList}\small\item\em possibe termination types \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+input\+\_\+length} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+output\+\_\+length} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len})
\item 
void \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+init} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code)
\begin{DoxyCompactList}\small\item\em Initialize a convolutional encoder. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+load\+\_\+state} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const \textbf{ ubit\+\_\+t} $\ast$input)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+raw} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const \textbf{ ubit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output, int \textbf{ n})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+flush} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, \textbf{ ubit\+\_\+t} $\ast$output)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, const \textbf{ ubit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output)
\begin{DoxyCompactList}\small\item\em All-\/in-\/one convolutional encoding function. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+init} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len}, int start\+\_\+state)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+reset} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, int start\+\_\+state)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+rewind} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+deinit} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+scan} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const \textbf{ sbit\+\_\+t} $\ast$input, int \textbf{ n})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+flush} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const \textbf{ sbit\+\_\+t} $\ast$input)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+best\+\_\+end\+\_\+state} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, \textbf{ ubit\+\_\+t} $\ast$output, int has\+\_\+flush, int end\+\_\+state)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, const \textbf{ sbit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output)
\begin{DoxyCompactList}\small\item\em All-\/in-\/one convolutional decoding function. \end{DoxyCompactList}\item 
static int \textbf{ \+\_\+conv\+\_\+encode\+\_\+do\+\_\+output} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, uint8\+\_\+t out, \textbf{ ubit\+\_\+t} $\ast$output)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+acc} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, const \textbf{ sbit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom convolutional encoder and decoder. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{group__conv_ga59a8d9c00939e78d198be14587d700b5}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!MAX\_AE@{MAX\_AE}}
\index{MAX\_AE@{MAX\_AE}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{MAX\_AE}
{\footnotesize\ttfamily \#define MAX\+\_\+\+AE~0x00ffffff}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{group__conv_gaf0fd132530ce2b394bad052c7242590e}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_term@{osmo\_conv\_term}}
\index{osmo\_conv\_term@{osmo\_conv\_term}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_term}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+conv\+\_\+term}}



possibe termination types 

The termination type will determine which state the encoder/decoder can start/end with. This is mostly taken care of in the high level API call. So if you use the low level API, you must take care of making the proper calls yourself. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{CONV\_TERM\_FLUSH@{CONV\_TERM\_FLUSH}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!CONV\_TERM\_FLUSH@{CONV\_TERM\_FLUSH}}}\mbox{\label{group__conv_ggaf0fd132530ce2b394bad052c7242590ea255ffa13977bc3a7513d90485123e7c2}} 
CONV\+\_\+\+TERM\+\_\+\+FLUSH&Flush encoder state. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{CONV\_TERM\_TRUNCATION@{CONV\_TERM\_TRUNCATION}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!CONV\_TERM\_TRUNCATION@{CONV\_TERM\_TRUNCATION}}}\mbox{\label{group__conv_ggaf0fd132530ce2b394bad052c7242590eadd3d6c82aa9a0be1f38479f89d6c1b04}} 
CONV\+\_\+\+TERM\+\_\+\+TRUNCATION&Direct truncation. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{CONV\_TERM\_TAIL\_BITING@{CONV\_TERM\_TAIL\_BITING}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!CONV\_TERM\_TAIL\_BITING@{CONV\_TERM\_TAIL\_BITING}}}\mbox{\label{group__conv_ggaf0fd132530ce2b394bad052c7242590ea63bb13a152bdb0b61594e10aabe990c1}} 
CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING&Tail biting. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{group__conv_ga9f4a15512d2781731ef7bbd05c834ad7}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!\_conv\_encode\_do\_output@{\_conv\_encode\_do\_output}}
\index{\_conv\_encode\_do\_output@{\_conv\_encode\_do\_output}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{\_conv\_encode\_do\_output()}
{\footnotesize\ttfamily static int \+\_\+conv\+\_\+encode\+\_\+do\+\_\+output (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$}]{encoder,  }\item[{uint8\+\_\+t}]{out,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::i\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::p\+\_\+idx}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::puncture}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+flush()}, and \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+raw()}.

\mbox{\label{group__conv_ga8eb8fcdfe0d49890927a6ce7bfc921dc}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode@{osmo\_conv\_decode}}
\index{osmo\_conv\_decode@{osmo\_conv\_decode}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{const \textbf{ sbit\+\_\+t} $\ast$}]{input,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output }\end{DoxyParamCaption})}



All-\/in-\/one convolutional decoding function. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em code} & description of convolutional code to be used \\
\hline
\mbox{\texttt{ in}}  & {\em input} & array of soft bits (coded) \\
\hline
\mbox{\texttt{ out}}  & {\em output} & array of unpacked bits (decoded)\\
\hline
\end{DoxyParams}
This is an all-\/in-\/one function, taking care of \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+init}{p.}{group__conv_ga8d62497e9411049141f699d67068b1ab}, \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+scan}{p.}{group__conv_ga8c0b5474a256cc21ba605bf2594468bc}, \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+flush}{p.}{group__conv_gad6eea080a67fdcecfc6d108d07d37c3c}, \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+best\+\_\+end\+\_\+state}{p.}{group__conv_gad2d7bb7224a7362c048f3c147c09c106}, \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output}{p.}{group__conv_ga123033117643f7c2ea610cbc21cfeeb7} and \doxyref{osmo\+\_\+conv\+\_\+decode\+\_\+deinit}{p.}{group__conv_gac5eaa9e63f2f78c65070dfdbd8f8cd88}. 

References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ l}, \textbf{ osmo\+\_\+conv\+\_\+code\+::len}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+acc()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+deinit()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+flush()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+init()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+rewind()}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+scan()}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::term}.

\mbox{\label{group__conv_ga609c3f0603a35f2a5c3b55ab4ef30d42}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_acc@{osmo\_conv\_decode\_acc}}
\index{osmo\_conv\_decode\_acc@{osmo\_conv\_decode\_acc}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_acc()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode\+\_\+acc (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{const \textbf{ sbit\+\_\+t} $\ast$}]{input,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output }\end{DoxyParamCaption})}



References \textbf{ conv\+\_\+decode()}, \textbf{ init\+\_\+complete}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ osmo\+\_\+conv\+\_\+code\+::len}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+init()}, \textbf{ osmo\+\_\+conv\+\_\+code\+::puncture}, \textbf{ osmo\+\_\+conv\+\_\+code\+::term}, \textbf{ vdec\+\_\+deinit()}, and \textbf{ vdec\+\_\+init()}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_gac5eaa9e63f2f78c65070dfdbd8f8cd88}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_deinit@{osmo\_conv\_decode\_deinit}}
\index{osmo\_conv\_decode\_deinit@{osmo\_conv\_decode\_deinit}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_deinit()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+decode\+\_\+deinit (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae\+\_\+next}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_gad6eea080a67fdcecfc6d108d07d37c3c}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_flush@{osmo\_conv\_decode\_flush}}
\index{osmo\_conv\_decode\_flush@{osmo\_conv\_decode\_flush}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_flush()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode\+\_\+flush (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder,  }\item[{const \textbf{ sbit\+\_\+t} $\ast$}]{input }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae\+\_\+next}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ MAX\+\_\+\+AE}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+state}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+term\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+term\+\_\+state}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::p\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+code\+::puncture}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_gad2d7bb7224a7362c048f3c147c09c106}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_get\_best\_end\_state@{osmo\_conv\_decode\_get\_best\_end\_state}}
\index{osmo\_conv\_decode\_get\_best\_end\_state@{osmo\_conv\_decode\_get\_best\_end\_state}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_get\_best\_end\_state()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+best\+\_\+end\+\_\+state (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING}, \textbf{ MAX\+\_\+\+AE}, \textbf{ n}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::term}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output()}.

\mbox{\label{group__conv_ga123033117643f7c2ea610cbc21cfeeb7}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_get\_output@{osmo\_conv\_decode\_get\_output}}
\index{osmo\_conv\_decode\_get\_output@{osmo\_conv\_decode\_get\_output}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_get\_output()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output,  }\item[{int}]{has\+\_\+flush,  }\item[{int}]{end\+\_\+state }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ n}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+state}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+best\+\_\+end\+\_\+state()}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_ga8d62497e9411049141f699d67068b1ab}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_init@{osmo\_conv\_decode\_init}}
\index{osmo\_conv\_decode\_init@{osmo\_conv\_decode\_init}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_init()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+decode\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder,  }\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{int}]{len,  }\item[{int}]{start\+\_\+state }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae\+\_\+next}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ len()}, \textbf{ osmo\+\_\+conv\+\_\+code\+::len}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::len}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+reset()}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_ga5b03fc1ff68f02690c1e6536f4a44562}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_reset@{osmo\_conv\_decode\_reset}}
\index{osmo\_conv\_decode\_reset@{osmo\_conv\_decode\_reset}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_reset()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+decode\+\_\+reset (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder,  }\item[{int}]{start\+\_\+state }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ MAX\+\_\+\+AE}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::p\+\_\+idx}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+init()}.

\mbox{\label{group__conv_ga118b5aec8b6ad0eb45f0cb2bc96525af}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_rewind@{osmo\_conv\_decode\_rewind}}
\index{osmo\_conv\_decode\_rewind@{osmo\_conv\_decode\_rewind}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_rewind()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+decode\+\_\+rewind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ MAX\+\_\+\+AE}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::p\+\_\+idx}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_ga8c0b5474a256cc21ba605bf2594468bc}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_decode\_scan@{osmo\_conv\_decode\_scan}}
\index{osmo\_conv\_decode\_scan@{osmo\_conv\_decode\_scan}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_decode\_scan()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+decode\+\_\+scan (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$}]{decoder,  }\item[{const \textbf{ sbit\+\_\+t} $\ast$}]{input,  }\item[{int}]{n }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::ae\+\_\+next}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::code}, \textbf{ MAX\+\_\+\+AE}, \textbf{ n}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::n\+\_\+states}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+state}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::o\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+decoder\+::p\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+code\+::puncture}, and \textbf{ osmo\+\_\+conv\+\_\+decoder\+::state\+\_\+history}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+decode()}.

\mbox{\label{group__conv_ga928c04825469cc3481be1717d69534d6}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_encode@{osmo\_conv\_encode}}
\index{osmo\_conv\_encode@{osmo\_conv\_encode}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_encode()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+encode (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{input,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output }\end{DoxyParamCaption})}



All-\/in-\/one convolutional encoding function. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em code} & description of convolutional code to be used \\
\hline
\mbox{\texttt{ in}}  & {\em input} & array of unpacked bits (uncoded) \\
\hline
\mbox{\texttt{ out}}  & {\em output} & array of unpacked bits (encoded) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Number of produced output bits
\end{DoxyReturn}
This is an all-\/in-\/one function, taking care of \doxyref{osmo\+\_\+conv\+\_\+init}{p.}{conv__acc_8c_acaf1f612de7825b6e3a39acfa272e7f9}, \doxyref{osmo\+\_\+conv\+\_\+encode\+\_\+load\+\_\+state}{p.}{group__conv_gacd456a6e66cd06364000d83b9d4a9c5f}, \doxyref{osmo\+\_\+conv\+\_\+encode\+\_\+raw}{p.}{group__conv_ga15d88c910f3072194278d42582162872} and \doxyref{osmo\+\_\+conv\+\_\+encode\+\_\+flush}{p.}{group__conv_gac54f3af7b08df20b530694ee3a660918} as needed. 

References \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH}, \textbf{ CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ l}, \textbf{ osmo\+\_\+conv\+\_\+code\+::len}, \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+flush()}, \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+init()}, \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+load\+\_\+state()}, \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+raw()}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::term}.

\mbox{\label{group__conv_gac54f3af7b08df20b530694ee3a660918}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_encode\_flush@{osmo\_conv\_encode\_flush}}
\index{osmo\_conv\_encode\_flush@{osmo\_conv\_encode\_flush}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_encode\_flush()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+encode\+\_\+flush (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$}]{encoder,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output }\end{DoxyParamCaption})}



References \textbf{ \+\_\+conv\+\_\+encode\+\_\+do\+\_\+output()}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::i\+\_\+idx}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ n}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+state}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+term\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+term\+\_\+state}, and \textbf{ osmo\+\_\+conv\+\_\+encoder\+::state}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+encode()}.

\mbox{\label{group__conv_ga729a0ee108fb0f830aef9652acb1f998}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_encode\_init@{osmo\_conv\_encode\_init}}
\index{osmo\_conv\_encode\_init@{osmo\_conv\_encode\_init}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_encode\_init()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+encode\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$}]{encoder,  }\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code }\end{DoxyParamCaption})}



Initialize a convolutional encoder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em encoder} & Encoder state to initialize \\
\hline
\mbox{\texttt{ in}}  & {\em code} & Description of convolutional code \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, and \textbf{ OSMO\+\_\+\+ASSERT}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+encode()}.

\mbox{\label{group__conv_gacd456a6e66cd06364000d83b9d4a9c5f}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_encode\_load\_state@{osmo\_conv\_encode\_load\_state}}
\index{osmo\_conv\_encode\_load\_state@{osmo\_conv\_encode\_load\_state}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_encode\_load\_state()}
{\footnotesize\ttfamily void osmo\+\_\+conv\+\_\+encode\+\_\+load\+\_\+state (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$}]{encoder,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{input }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, and \textbf{ osmo\+\_\+conv\+\_\+encoder\+::state}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+encode()}.

\mbox{\label{group__conv_ga15d88c910f3072194278d42582162872}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_encode\_raw@{osmo\_conv\_encode\_raw}}
\index{osmo\_conv\_encode\_raw@{osmo\_conv\_encode\_raw}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_encode\_raw()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+encode\+\_\+raw (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$}]{encoder,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{input,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{output,  }\item[{int}]{n }\end{DoxyParamCaption})}



References \textbf{ \+\_\+conv\+\_\+encode\+\_\+do\+\_\+output()}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::code}, \textbf{ osmo\+\_\+conv\+\_\+encoder\+::i\+\_\+idx}, \textbf{ n}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+output}, \textbf{ osmo\+\_\+conv\+\_\+code\+::next\+\_\+state}, and \textbf{ osmo\+\_\+conv\+\_\+encoder\+::state}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+encode()}.

\mbox{\label{group__conv_gaa1382de36811cc10f218b877cad5c2d5}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_get\_input\_length@{osmo\_conv\_get\_input\_length}}
\index{osmo\_conv\_get\_input\_length@{osmo\_conv\_get\_input\_length}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_get\_input\_length()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+get\+\_\+input\+\_\+length (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{int}]{len }\end{DoxyParamCaption})}



References \textbf{ len()}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::len}.



Referenced by \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+output\+\_\+length()}.

\mbox{\label{group__conv_ga278e64b79e6b589c835a0c401fde3660}} 
\index{Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}!osmo\_conv\_get\_output\_length@{osmo\_conv\_get\_output\_length}}
\index{osmo\_conv\_get\_output\_length@{osmo\_conv\_get\_output\_length}!Convolutional encoding and decoding routines@{Convolutional encoding and decoding routines}}
\doxysubsubsection{osmo\_conv\_get\_output\_length()}
{\footnotesize\ttfamily int osmo\+\_\+conv\+\_\+get\+\_\+output\+\_\+length (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$}]{code,  }\item[{int}]{len }\end{DoxyParamCaption})}



References \textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH}, \textbf{ osmo\+\_\+conv\+\_\+code\+::K}, \textbf{ len()}, \textbf{ osmo\+\_\+conv\+\_\+code\+::N}, \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+input\+\_\+length()}, \textbf{ osmo\+\_\+conv\+\_\+code\+::puncture}, and \textbf{ osmo\+\_\+conv\+\_\+code\+::term}.

