\doxysection{src/core/conv.c File Reference}
\label{conv_8c}\index{src/core/conv.c@{src/core/conv.c}}


Generic convolutional encoding / decoding.  


{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/conv.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MAX\+\_\+\+AE}~0x00ffffff
\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 
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\+\_\+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 
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)
\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}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Generic convolutional encoding / decoding. 

