\doxysection{src/codec/hr\+\_\+sid\+\_\+class.c File Reference}
\label{hr__sid__class_8c}\index{src/codec/hr\_sid\_class.c@{src/codec/hr\_sid\_class.c}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/codec/codec.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static unsigned \textbf{ count\+\_\+ones\+\_\+under\+\_\+mask} (const uint8\+\_\+t $\ast$\textbf{ data}, const uint8\+\_\+t $\ast$mask, unsigned nbytes)
\item 
enum \textbf{ osmo\+\_\+gsm631\+\_\+sid\+\_\+class} \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify} (const uint8\+\_\+t $\ast$rtp\+\_\+payload, bool bci\+\_\+flag, bool $\ast$bfi\+\_\+from\+\_\+bci)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const uint8\+\_\+t \textbf{ ones\+\_\+in\+\_\+nibble} [16]
\item 
static const uint8\+\_\+t \textbf{ sid\+\_\+field\+\_\+last10\+\_\+mask} [10]
\item 
static const uint8\+\_\+t \textbf{ sid\+\_\+field\+\_\+misordered} [14]
\item 
static const uint8\+\_\+t \textbf{ class2\+\_\+mask\+\_\+voiced} [4] = \{0x7F, 0x80, 0x3F, 0x\+E0\}
\item 
static const uint8\+\_\+t \textbf{ class2\+\_\+mask\+\_\+unvoiced} [4] = \{0x07, 0x07, 0x\+FF, 0x\+E0\}
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{hr__sid__class_8c_ad14e0419fe982270c6ba89b585492d03}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!count\_ones\_under\_mask@{count\_ones\_under\_mask}}
\index{count\_ones\_under\_mask@{count\_ones\_under\_mask}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{count\_ones\_under\_mask()}
{\footnotesize\ttfamily static unsigned count\+\_\+ones\+\_\+under\+\_\+mask (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{const uint8\+\_\+t $\ast$}]{mask,  }\item[{unsigned}]{nbytes }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ n}, and \textbf{ ones\+\_\+in\+\_\+nibble}.



Referenced by \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify()}.

\mbox{\label{hr__sid__class_8c_a057c35346843cb6cfd4038db7ac178e4}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!osmo\_hr\_sid\_classify@{osmo\_hr\_sid\_classify}}
\index{osmo\_hr\_sid\_classify@{osmo\_hr\_sid\_classify}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{osmo\_hr\_sid\_classify()}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+gsm631\+\_\+sid\+\_\+class} osmo\+\_\+hr\+\_\+sid\+\_\+classify (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t $\ast$}]{rtp\+\_\+payload,  }\item[{bool}]{bci\+\_\+flag,  }\item[{bool $\ast$}]{bfi\+\_\+from\+\_\+bci }\end{DoxyParamCaption})}



References \textbf{ class2\+\_\+mask\+\_\+unvoiced}, \textbf{ class2\+\_\+mask\+\_\+voiced}, \textbf{ count\+\_\+ones\+\_\+under\+\_\+mask()}, \textbf{ OSMO\+\_\+\+GSM631\+\_\+\+SID\+\_\+\+CLASS\+\_\+\+INVALID}, \textbf{ OSMO\+\_\+\+GSM631\+\_\+\+SID\+\_\+\+CLASS\+\_\+\+SPEECH}, \textbf{ OSMO\+\_\+\+GSM631\+\_\+\+SID\+\_\+\+CLASS\+\_\+\+VALID}, \textbf{ sid\+\_\+field\+\_\+last10\+\_\+mask}, and \textbf{ sid\+\_\+field\+\_\+misordered}.



\doxysubsection{Variable Documentation}
\mbox{\label{hr__sid__class_8c_ab03ff36838730219266726b7f4fac753}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!class2\_mask\_unvoiced@{class2\_mask\_unvoiced}}
\index{class2\_mask\_unvoiced@{class2\_mask\_unvoiced}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{class2\_mask\_unvoiced}
{\footnotesize\ttfamily const uint8\+\_\+t class2\+\_\+mask\+\_\+unvoiced[4] = \{0x07, 0x07, 0x\+FF, 0x\+E0\}\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify()}.

\mbox{\label{hr__sid__class_8c_aa7fc17dac3d4675a0279aaf24babd154}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!class2\_mask\_voiced@{class2\_mask\_voiced}}
\index{class2\_mask\_voiced@{class2\_mask\_voiced}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{class2\_mask\_voiced}
{\footnotesize\ttfamily const uint8\+\_\+t class2\+\_\+mask\+\_\+voiced[4] = \{0x7F, 0x80, 0x3F, 0x\+E0\}\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify()}.

\mbox{\label{hr__sid__class_8c_a14ba6154ee1071405cdd618f38af6536}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!ones\_in\_nibble@{ones\_in\_nibble}}
\index{ones\_in\_nibble@{ones\_in\_nibble}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{ones\_in\_nibble}
{\footnotesize\ttfamily const uint8\+\_\+t ones\+\_\+in\+\_\+nibble[16]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{0, 1, 1, 2, 1, 2, 2, 3,}
\DoxyCodeLine{                                           1, 2, 2, 3, 2, 3, 3, 4\}}

\end{DoxyCode}


Referenced by \textbf{ count\+\_\+ones\+\_\+under\+\_\+mask()}.

\mbox{\label{hr__sid__class_8c_a94d5c8503df9b4106b5cedf26b3431c3}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!sid\_field\_last10\_mask@{sid\_field\_last10\_mask}}
\index{sid\_field\_last10\_mask@{sid\_field\_last10\_mask}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{sid\_field\_last10\_mask}
{\footnotesize\ttfamily const uint8\+\_\+t sid\+\_\+field\+\_\+last10\+\_\+mask[10]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify()}.

\mbox{\label{hr__sid__class_8c_a320279d29d001596d0886a03f3409dbc}} 
\index{hr\_sid\_class.c@{hr\_sid\_class.c}!sid\_field\_misordered@{sid\_field\_misordered}}
\index{sid\_field\_misordered@{sid\_field\_misordered}!hr\_sid\_class.c@{hr\_sid\_class.c}}
\doxysubsubsection{sid\_field\_misordered}
{\footnotesize\ttfamily const uint8\+\_\+t sid\+\_\+field\+\_\+misordered[14]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0x08, 0xEF, 0x1F, 0x3F, 0xF3, 0xFC, 0xA4,}
\DoxyCodeLine{        0xFF, 0xFA, 0x3F, 0xFF, 0x47, 0xFF, 0xEC}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ osmo\+\_\+hr\+\_\+sid\+\_\+classify()}.

