\doxysection{src/codec/gsm690.c File Reference} \label{gsm690_8c}\index{src/codec/gsm690.c@{src/codec/gsm690.c}} GSM 06.\+90 -\/ GSM AMR Codec. {\ttfamily \#include $<$stdint.\+h$>$}\newline {\ttfamily \#include $<$errno.\+h$>$}\newline {\ttfamily \#include $<$stdio.\+h$>$}\newline {\ttfamily \#include $<$stdlib.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline {\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline {\ttfamily \#include $<$osmocom/codec/codec.\+h$>$}\newline \doxysubsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \textbf{ ts26101\+\_\+reorder\+\_\+table} \end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item int \textbf{ osmo\+\_\+amr\+\_\+s\+\_\+to\+\_\+d} (\textbf{ ubit\+\_\+t} $\ast$out, const \textbf{ ubit\+\_\+t} $\ast$in, uint16\+\_\+t n\+\_\+bits, enum \textbf{ osmo\+\_\+amr\+\_\+type} amr\+\_\+mode) \begin{DoxyCompactList}\small\item\em Convert from S-\/bits (codec output) to d-\/bits. \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+amr\+\_\+d\+\_\+to\+\_\+s} (\textbf{ ubit\+\_\+t} $\ast$out, const \textbf{ ubit\+\_\+t} $\ast$in, uint16\+\_\+t n\+\_\+bits, enum \textbf{ osmo\+\_\+amr\+\_\+type} amr\+\_\+mode) \begin{DoxyCompactList}\small\item\em Convert from d-\/bits to s-\/bits (codec input). \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+amr\+\_\+rtp\+\_\+dec} (const uint8\+\_\+t $\ast$rtppayload, int payload\+\_\+len, uint8\+\_\+t $\ast$cmr, int8\+\_\+t $\ast$cmi, enum \textbf{ osmo\+\_\+amr\+\_\+type} $\ast$ft, enum \textbf{ osmo\+\_\+amr\+\_\+quality} $\ast$bfi, int8\+\_\+t $\ast$sti) \begin{DoxyCompactList}\small\item\em Decode various AMR parameters from RTP payload (RFC 4867) acording to 3GPP TS 26.\+101. \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+amr\+\_\+rtp\+\_\+enc} (uint8\+\_\+t $\ast$payload, uint8\+\_\+t cmr, enum \textbf{ osmo\+\_\+amr\+\_\+type} ft, enum \textbf{ osmo\+\_\+amr\+\_\+quality} bfi) \begin{DoxyCompactList}\small\item\em Encode various AMR parameters from RTP payload (RFC 4867) \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection*{Variables} \begin{DoxyCompactItemize} \item const uint16\+\_\+t \textbf{ gsm690\+\_\+12\+\_\+2\+\_\+bitorder} [244] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+10\+\_\+2\+\_\+bitorder} [204] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+7\+\_\+95\+\_\+bitorder} [159] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+7\+\_\+4\+\_\+bitorder} [148] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+6\+\_\+7\+\_\+bitorder} [134] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+5\+\_\+9\+\_\+bitorder} [118] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+5\+\_\+15\+\_\+bitorder} [103] \item const uint16\+\_\+t \textbf{ gsm690\+\_\+4\+\_\+75\+\_\+bitorder} [95] \item const uint8\+\_\+t \textbf{ gsm690\+\_\+bitlength} [\textbf{ AMR\+\_\+\+NO\+\_\+\+DATA}+1] \begin{DoxyCompactList}\small\item\em These constants refer to the length of one \char`\"{}\+AMR core frame\char`\"{} as per TS 26.\+101 Section 4.\+2.\+2 / Table 2. \end{DoxyCompactList}\item static const struct \textbf{ ts26101\+\_\+reorder\+\_\+table} \textbf{ ts26101\+\_\+reorder\+\_\+tables} [8] \item static const uint8\+\_\+t \textbf{ amr\+\_\+len\+\_\+by\+\_\+ft} [16] \item const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+amr\+\_\+type\+\_\+names} [$\,$] \end{DoxyCompactItemize} \doxysubsection{Detailed Description} GSM 06.\+90 -\/ GSM AMR Codec. \doxysubsection{Function Documentation} \mbox{\label{gsm690_8c_a899b52a70d03f8f4a8d79a9ed1a0103d}} \index{gsm690.c@{gsm690.c}!osmo\_amr\_d\_to\_s@{osmo\_amr\_d\_to\_s}} \index{osmo\_amr\_d\_to\_s@{osmo\_amr\_d\_to\_s}!gsm690.c@{gsm690.c}} \doxysubsubsection{osmo\_amr\_d\_to\_s()} {\footnotesize\ttfamily int osmo\+\_\+amr\+\_\+d\+\_\+to\+\_\+s (\begin{DoxyParamCaption}\item[{\textbf{ ubit\+\_\+t} $\ast$}]{out, }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{in, }\item[{uint16\+\_\+t}]{n\+\_\+bits, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+type}}]{amr\+\_\+mode }\end{DoxyParamCaption})} Convert from d-\/bits to s-\/bits (codec input). \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ out}} & {\em out} & user-\/provided output buffer for generated unpacked s-\/bits \\ \hline \mbox{\texttt{ in}} & {\em in} & input buffer for unpacked d-\/bits \\ \hline \mbox{\texttt{ in}} & {\em n\+\_\+bits} & number of bits (in both in and out) \\ \hline \mbox{\texttt{ in}} & {\em AMR} & mode (0..7) \\ \hline \end{DoxyParams} References \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ ts26101\+\_\+reorder\+\_\+table\+::len}, \textbf{ n}, \textbf{ ts26101\+\_\+reorder\+\_\+table\+::s\+\_\+to\+\_\+d}, and \textbf{ ts26101\+\_\+reorder\+\_\+tables}. \mbox{\label{gsm690_8c_adf373a4285e5f3941f1b4ab5ec2b6da6}} \index{gsm690.c@{gsm690.c}!osmo\_amr\_rtp\_dec@{osmo\_amr\_rtp\_dec}} \index{osmo\_amr\_rtp\_dec@{osmo\_amr\_rtp\_dec}!gsm690.c@{gsm690.c}} \doxysubsubsection{osmo\_amr\_rtp\_dec()} {\footnotesize\ttfamily int osmo\+\_\+amr\+\_\+rtp\+\_\+dec (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t $\ast$}]{rtppayload, }\item[{int}]{payload\+\_\+len, }\item[{uint8\+\_\+t $\ast$}]{cmr, }\item[{int8\+\_\+t $\ast$}]{cmi, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+type} $\ast$}]{ft, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+quality} $\ast$}]{bfi, }\item[{int8\+\_\+t $\ast$}]{sti }\end{DoxyParamCaption})} Decode various AMR parameters from RTP payload (RFC 4867) acording to 3GPP TS 26.\+101. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ in}} & {\em rtppayload} & Payload from RTP packet \\ \hline \mbox{\texttt{ in}} & {\em payload\+\_\+len} & length of rtppayload \\ \hline \mbox{\texttt{ out}} & {\em cmr} & AMR Codec Mode Request, not filled if NULL \\ \hline \mbox{\texttt{ out}} & {\em cmi} & AMR Codec Mode Indicator, -\/1 if not applicable for this type, not filled if NULL \\ \hline \mbox{\texttt{ out}} & {\em ft} & AMR Frame Type, not filled if NULL \\ \hline \mbox{\texttt{ out}} & {\em bfi} & AMR Bad Frame Indicator, not filled if NULL \\ \hline \mbox{\texttt{ out}} & {\em sti} & AMR SID Type Indicator, -\/1 if not applicable for this type, not filled if NULL \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} length of AMR data or negative value on error \end{DoxyReturn} References \textbf{ amr\+\_\+len\+\_\+by\+\_\+ft}, \textbf{ AMR\+\_\+\+SID}, \textbf{ ENOTSUP}, and \textbf{ type}. \mbox{\label{gsm690_8c_a9a65632c3a42a46bb5b1145750a80c77}} \index{gsm690.c@{gsm690.c}!osmo\_amr\_rtp\_enc@{osmo\_amr\_rtp\_enc}} \index{osmo\_amr\_rtp\_enc@{osmo\_amr\_rtp\_enc}!gsm690.c@{gsm690.c}} \doxysubsubsection{osmo\_amr\_rtp\_enc()} {\footnotesize\ttfamily int osmo\+\_\+amr\+\_\+rtp\+\_\+enc (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{payload, }\item[{uint8\+\_\+t}]{cmr, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+type}}]{ft, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+quality}}]{bfi }\end{DoxyParamCaption})} Encode various AMR parameters from RTP payload (RFC 4867) \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ out}} & {\em payload} & Payload for RTP packet, contains speech data (if any) except for have 2 first bytes where header will be built \\ \hline \mbox{\texttt{ in}} & {\em cmr} & AMR codec Mode Request \\ \hline \mbox{\texttt{ in}} & {\em ft} & AMR Frame Type \\ \hline \mbox{\texttt{ in}} & {\em bfi} & AMR Bad Frame Indicator \\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} length of AMR data (header + ToC + speech data) or negative value on error \end{DoxyReturn} Note\+: only octet-\/aligned mode is supported so the header occupies 2 full bytes. Optional interleaving header is not supported. References \textbf{ amr\+\_\+len\+\_\+by\+\_\+ft}, and \textbf{ ENOTSUP}. \mbox{\label{gsm690_8c_aba0ae5e40e01a1d075d952fbd15c320c}} \index{gsm690.c@{gsm690.c}!osmo\_amr\_s\_to\_d@{osmo\_amr\_s\_to\_d}} \index{osmo\_amr\_s\_to\_d@{osmo\_amr\_s\_to\_d}!gsm690.c@{gsm690.c}} \doxysubsubsection{osmo\_amr\_s\_to\_d()} {\footnotesize\ttfamily int osmo\+\_\+amr\+\_\+s\+\_\+to\+\_\+d (\begin{DoxyParamCaption}\item[{\textbf{ ubit\+\_\+t} $\ast$}]{out, }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{in, }\item[{uint16\+\_\+t}]{n\+\_\+bits, }\item[{enum \textbf{ osmo\+\_\+amr\+\_\+type}}]{amr\+\_\+mode }\end{DoxyParamCaption})} Convert from S-\/bits (codec output) to d-\/bits. \begin{DoxyParams}[1]{Parameters} \mbox{\texttt{ out}} & {\em out} & user-\/provided output buffer for generated unpacked d-\/bits \\ \hline \mbox{\texttt{ in}} & {\em in} & input buffer for unpacked s-\/bits \\ \hline \mbox{\texttt{ in}} & {\em n\+\_\+bits} & number of bits (in both in and out) \\ \hline \mbox{\texttt{ in}} & {\em AMR} & mode (0..7) \\ \hline \end{DoxyParams} References \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ ts26101\+\_\+reorder\+\_\+table\+::len}, \textbf{ n}, \textbf{ ts26101\+\_\+reorder\+\_\+table\+::s\+\_\+to\+\_\+d}, and \textbf{ ts26101\+\_\+reorder\+\_\+tables}. \doxysubsection{Variable Documentation} \mbox{\label{gsm690_8c_a7c56043196e2a23a3c576a05088934f6}} \index{gsm690.c@{gsm690.c}!amr\_len\_by\_ft@{amr\_len\_by\_ft}} \index{amr\_len\_by\_ft@{amr\_len\_by\_ft}!gsm690.c@{gsm690.c}} \doxysubsubsection{amr\_len\_by\_ft} {\footnotesize\ttfamily const uint8\+\_\+t amr\+\_\+len\+\_\+by\+\_\+ft[16]\hspace{0.3cm}{\ttfamily [static]}} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0} \DoxyCodeLine{\}} \end{DoxyCode} Referenced by \textbf{ osmo\+\_\+amr\+\_\+rtp\+\_\+dec()}, and \textbf{ osmo\+\_\+amr\+\_\+rtp\+\_\+enc()}. \mbox{\label{gsm690_8c_a408c2c1c588053b000fc116e7e7b09ec}} \index{gsm690.c@{gsm690.c}!gsm690\_10\_2\_bitorder@{gsm690\_10\_2\_bitorder}} \index{gsm690\_10\_2\_bitorder@{gsm690\_10\_2\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_10\_2\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+10\+\_\+2\+\_\+bitorder[204]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 7, 6, 5, 4, 3, 2, 1, 0, 16, 15,} \DoxyCodeLine{ 14, 13, 12, 11, 10, 9, 8, 26, 27, 28,} \DoxyCodeLine{ 29, 30, 31, 115, 116, 117, 118, 119, 120, 72,} \DoxyCodeLine{ 73, 161, 162, 65, 68, 69, 108, 111, 112, 154,} \DoxyCodeLine{ 157, 158, 197, 200, 201, 32, 33, 121, 122, 74,} \DoxyCodeLine{ 75, 163, 164, 66, 109, 155, 198, 19, 23, 21,} \DoxyCodeLine{ 22, 18, 17, 20, 24, 25, 37, 36, 35, 34,} \DoxyCodeLine{ 80, 79, 78, 77, 126, 125, 124, 123, 169, 168,} \DoxyCodeLine{ 167, 166, 70, 67, 71, 113, 110, 114, 159, 156,} \DoxyCodeLine{ 160, 202, 199, 203, 76, 165, 81, 82, 92, 91,} \DoxyCodeLine{ 93, 83, 95, 85, 84, 94, 101, 102, 96, 104,} \DoxyCodeLine{ 86, 103, 87, 97, 127, 128, 138, 137, 139, 129,} \DoxyCodeLine{ 141, 131, 130, 140, 147, 148, 142, 150, 132, 149,} \DoxyCodeLine{ 133, 143, 170, 171, 181, 180, 182, 172, 184, 174,} \DoxyCodeLine{ 173, 183, 190, 191, 185, 193, 175, 192, 176, 186,} \DoxyCodeLine{ 38, 39, 49, 48, 50, 40, 52, 42, 41, 51,} \DoxyCodeLine{ 58, 59, 53, 61, 43, 60, 44, 54, 194, 179,} \DoxyCodeLine{ 189, 196, 177, 195, 178, 187, 188, 151, 136, 146,} \DoxyCodeLine{ 153, 134, 152, 135, 144, 145, 105, 90, 100, 107,} \DoxyCodeLine{ 88, 106, 89, 98, 99, 62, 47, 57, 64, 45,} \DoxyCodeLine{ 63, 46, 55, 56,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a656bf75d3e99e62f257f63df6715e9b0}} \index{gsm690.c@{gsm690.c}!gsm690\_12\_2\_bitorder@{gsm690\_12\_2\_bitorder}} \index{gsm690\_12\_2\_bitorder@{gsm690\_12\_2\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_12\_2\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+12\+\_\+2\+\_\+bitorder[244]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,} \DoxyCodeLine{ 10, 11, 12, 13, 14, 23, 15, 16, 17, 18,} \DoxyCodeLine{ 19, 20, 21, 22, 24, 25, 26, 27, 28, 38,} \DoxyCodeLine{ 141, 39, 142, 40, 143, 41, 144, 42, 145, 43,} \DoxyCodeLine{ 146, 44, 147, 45, 148, 46, 149, 47, 97, 150,} \DoxyCodeLine{ 200, 48, 98, 151, 201, 49, 99, 152, 202, 86,} \DoxyCodeLine{ 136, 189, 239, 87, 137, 190, 240, 88, 138, 191,} \DoxyCodeLine{ 241, 91, 194, 92, 195, 93, 196, 94, 197, 95,} \DoxyCodeLine{ 198, 29, 30, 31, 32, 33, 34, 35, 50, 100,} \DoxyCodeLine{ 153, 203, 89, 139, 192, 242, 51, 101, 154, 204,} \DoxyCodeLine{ 55, 105, 158, 208, 90, 140, 193, 243, 59, 109,} \DoxyCodeLine{ 162, 212, 63, 113, 166, 216, 67, 117, 170, 220,} \DoxyCodeLine{ 36, 37, 54, 53, 52, 58, 57, 56, 62, 61,} \DoxyCodeLine{ 60, 66, 65, 64, 70, 69, 68, 104, 103, 102,} \DoxyCodeLine{ 108, 107, 106, 112, 111, 110, 116, 115, 114, 120,} \DoxyCodeLine{ 119, 118, 157, 156, 155, 161, 160, 159, 165, 164,} \DoxyCodeLine{ 163, 169, 168, 167, 173, 172, 171, 207, 206, 205,} \DoxyCodeLine{ 211, 210, 209, 215, 214, 213, 219, 218, 217, 223,} \DoxyCodeLine{ 222, 221, 73, 72, 71, 76, 75, 74, 79, 78,} \DoxyCodeLine{ 77, 82, 81, 80, 85, 84, 83, 123, 122, 121,} \DoxyCodeLine{ 126, 125, 124, 129, 128, 127, 132, 131, 130, 135,} \DoxyCodeLine{ 134, 133, 176, 175, 174, 179, 178, 177, 182, 181,} \DoxyCodeLine{ 180, 185, 184, 183, 188, 187, 186, 226, 225, 224,} \DoxyCodeLine{ 229, 228, 227, 232, 231, 230, 235, 234, 233, 238,} \DoxyCodeLine{ 237, 236, 96, 199,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a71f310d2639cf7ab6fa046cafec86c91}} \index{gsm690.c@{gsm690.c}!gsm690\_4\_75\_bitorder@{gsm690\_4\_75\_bitorder}} \index{gsm690\_4\_75\_bitorder@{gsm690\_4\_75\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_4\_75\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+4\+\_\+75\+\_\+bitorder[95]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,} \DoxyCodeLine{ 10, 11, 12, 13, 14, 15, 23, 24, 25, 26,} \DoxyCodeLine{ 27, 28, 48, 49, 61, 62, 82, 83, 47, 46,} \DoxyCodeLine{ 45, 44, 81, 80, 79, 78, 17, 18, 20, 22,} \DoxyCodeLine{ 77, 76, 75, 74, 29, 30, 43, 42, 41, 40,} \DoxyCodeLine{ 38, 39, 16, 19, 21, 50, 51, 59, 60, 63,} \DoxyCodeLine{ 64, 72, 73, 84, 85, 93, 94, 32, 33, 35,} \DoxyCodeLine{ 36, 53, 54, 56, 57, 66, 67, 69, 70, 87,} \DoxyCodeLine{ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71,} \DoxyCodeLine{ 92, 31, 52, 65, 86,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a83f5d8f4ddf2a256861eb767ddd50d3b}} \index{gsm690.c@{gsm690.c}!gsm690\_5\_15\_bitorder@{gsm690\_5\_15\_bitorder}} \index{gsm690\_5\_15\_bitorder@{gsm690\_5\_15\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_5\_15\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+5\+\_\+15\+\_\+bitorder[103]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,} \DoxyCodeLine{ 13, 12, 11, 10, 9, 8, 23, 24, 25, 26,} \DoxyCodeLine{ 27, 46, 65, 84, 45, 44, 43, 64, 63, 62,} \DoxyCodeLine{ 83, 82, 81, 102, 101, 100, 42, 61, 80, 99,} \DoxyCodeLine{ 28, 47, 66, 85, 18, 41, 60, 79, 98, 29,} \DoxyCodeLine{ 48, 67, 17, 20, 22, 40, 59, 78, 97, 21,} \DoxyCodeLine{ 30, 49, 68, 86, 19, 16, 87, 39, 38, 58,} \DoxyCodeLine{ 57, 77, 35, 54, 73, 92, 76, 96, 95, 36,} \DoxyCodeLine{ 55, 74, 93, 32, 51, 33, 52, 70, 71, 89,} \DoxyCodeLine{ 90, 31, 50, 69, 88, 37, 56, 75, 94, 34,} \DoxyCodeLine{ 53, 72, 91,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a748d659729f20fb11795363bf4cb5870}} \index{gsm690.c@{gsm690.c}!gsm690\_5\_9\_bitorder@{gsm690\_5\_9\_bitorder}} \index{gsm690\_5\_9\_bitorder@{gsm690\_5\_9\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_5\_9\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+5\+\_\+9\+\_\+bitorder[118]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 0, 1, 4, 5, 3, 6, 7, 2, 13, 15,} \DoxyCodeLine{ 8, 9, 11, 12, 14, 10, 16, 28, 74, 29,} \DoxyCodeLine{ 75, 27, 73, 26, 72, 30, 76, 51, 97, 50,} \DoxyCodeLine{ 71, 96, 117, 31, 77, 52, 98, 49, 70, 95,} \DoxyCodeLine{ 116, 53, 99, 32, 78, 33, 79, 48, 69, 94,} \DoxyCodeLine{ 115, 47, 68, 93, 114, 46, 67, 92, 113, 19,} \DoxyCodeLine{ 21, 23, 22, 18, 17, 20, 24, 111, 43, 89,} \DoxyCodeLine{ 110, 64, 65, 44, 90, 25, 45, 66, 91, 112,} \DoxyCodeLine{ 54, 100, 40, 61, 86, 107, 39, 60, 85, 106,} \DoxyCodeLine{ 36, 57, 82, 103, 35, 56, 81, 102, 34, 55,} \DoxyCodeLine{ 80, 101, 42, 63, 88, 109, 41, 62, 87, 108,} \DoxyCodeLine{ 38, 59, 84, 105, 37, 58, 83, 104,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_aae55bb6034d7cb0751093828a28c74ca}} \index{gsm690.c@{gsm690.c}!gsm690\_6\_7\_bitorder@{gsm690\_6\_7\_bitorder}} \index{gsm690\_6\_7\_bitorder@{gsm690\_6\_7\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_6\_7\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+6\+\_\+7\+\_\+bitorder[134]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 0, 1, 4, 3, 5, 6, 13, 7, 2, 8,} \DoxyCodeLine{ 9, 11, 15, 12, 14, 10, 28, 82, 29, 83,} \DoxyCodeLine{ 27, 81, 26, 80, 30, 84, 16, 55, 109, 56,} \DoxyCodeLine{ 110, 31, 85, 57, 111, 48, 73, 102, 127, 32,} \DoxyCodeLine{ 86, 51, 76, 105, 130, 52, 77, 106, 131, 58,} \DoxyCodeLine{ 112, 33, 87, 19, 23, 53, 78, 107, 132, 21,} \DoxyCodeLine{ 22, 18, 17, 20, 24, 25, 50, 75, 104, 129,} \DoxyCodeLine{ 47, 72, 101, 126, 54, 79, 108, 133, 46, 71,} \DoxyCodeLine{ 100, 125, 128, 103, 74, 49, 45, 70, 99, 124,} \DoxyCodeLine{ 42, 67, 96, 121, 39, 64, 93, 118, 38, 63,} \DoxyCodeLine{ 92, 117, 35, 60, 89, 114, 34, 59, 88, 113,} \DoxyCodeLine{ 44, 69, 98, 123, 43, 68, 97, 122, 41, 66,} \DoxyCodeLine{ 95, 120, 40, 65, 94, 119, 37, 62, 91, 116,} \DoxyCodeLine{ 36, 61, 90, 115,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a393ce3d88ca28c971e7e988548dbfc23}} \index{gsm690.c@{gsm690.c}!gsm690\_7\_4\_bitorder@{gsm690\_7\_4\_bitorder}} \index{gsm690\_7\_4\_bitorder@{gsm690\_7\_4\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_7\_4\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+7\+\_\+4\+\_\+bitorder[148]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,} \DoxyCodeLine{ 10, 11, 12, 13, 14, 15, 16, 26, 87, 27,} \DoxyCodeLine{ 88, 28, 89, 29, 90, 30, 91, 51, 80, 112,} \DoxyCodeLine{ 141, 52, 81, 113, 142, 54, 83, 115, 144, 55,} \DoxyCodeLine{ 84, 116, 145, 58, 119, 59, 120, 21, 22, 23,} \DoxyCodeLine{ 17, 18, 19, 31, 60, 92, 121, 56, 85, 117,} \DoxyCodeLine{ 146, 20, 24, 25, 50, 79, 111, 140, 57, 86,} \DoxyCodeLine{ 118, 147, 49, 78, 110, 139, 48, 77, 53, 82,} \DoxyCodeLine{ 114, 143, 109, 138, 47, 76, 108, 137, 32, 33,} \DoxyCodeLine{ 61, 62, 93, 94, 122, 123, 41, 42, 43, 44,} \DoxyCodeLine{ 45, 46, 70, 71, 72, 73, 74, 75, 102, 103,} \DoxyCodeLine{ 104, 105, 106, 107, 131, 132, 133, 134, 135, 136,} \DoxyCodeLine{ 34, 63, 95, 124, 35, 64, 96, 125, 36, 65,} \DoxyCodeLine{ 97, 126, 37, 66, 98, 127, 38, 67, 99, 128,} \DoxyCodeLine{ 39, 68, 100, 129, 40, 69, 101, 130,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a82473ec0074d65f92d6049e2e7ac37b6}} \index{gsm690.c@{gsm690.c}!gsm690\_7\_95\_bitorder@{gsm690\_7\_95\_bitorder}} \index{gsm690\_7\_95\_bitorder@{gsm690\_7\_95\_bitorder}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_7\_95\_bitorder} {\footnotesize\ttfamily const uint16\+\_\+t gsm690\+\_\+7\+\_\+95\+\_\+bitorder[159]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ 8, 7, 6, 5, 4, 3, 2, 14, 16, 9,} \DoxyCodeLine{ 10, 12, 13, 15, 11, 17, 20, 22, 24, 23,} \DoxyCodeLine{ 19, 18, 21, 56, 88, 122, 154, 57, 89, 123,} \DoxyCodeLine{ 155, 58, 90, 124, 156, 52, 84, 118, 150, 53,} \DoxyCodeLine{ 85, 119, 151, 27, 93, 28, 94, 29, 95, 30,} \DoxyCodeLine{ 96, 31, 97, 61, 127, 62, 128, 63, 129, 59,} \DoxyCodeLine{ 91, 125, 157, 32, 98, 64, 130, 1, 0, 25,} \DoxyCodeLine{ 26, 33, 99, 34, 100, 65, 131, 66, 132, 54,} \DoxyCodeLine{ 86, 120, 152, 60, 92, 126, 158, 55, 87, 121,} \DoxyCodeLine{ 153, 117, 116, 115, 46, 78, 112, 144, 43, 75,} \DoxyCodeLine{ 109, 141, 40, 72, 106, 138, 36, 68, 102, 134,} \DoxyCodeLine{ 114, 149, 148, 147, 146, 83, 82, 81, 80, 51,} \DoxyCodeLine{ 50, 49, 48, 47, 45, 44, 42, 39, 35, 79,} \DoxyCodeLine{ 77, 76, 74, 71, 67, 113, 111, 110, 108, 105,} \DoxyCodeLine{ 101, 145, 143, 142, 140, 137, 133, 41, 73, 107,} \DoxyCodeLine{ 139, 37, 69, 103, 135, 38, 70, 104, 136,} \DoxyCodeLine{\}} \end{DoxyCode} \mbox{\label{gsm690_8c_a5a49793e7754e061231c628446330bf9}} \index{gsm690.c@{gsm690.c}!gsm690\_bitlength@{gsm690\_bitlength}} \index{gsm690\_bitlength@{gsm690\_bitlength}!gsm690.c@{gsm690.c}} \doxysubsubsection{gsm690\_bitlength} {\footnotesize\ttfamily const uint8\+\_\+t gsm690\+\_\+bitlength[\textbf{ AMR\+\_\+\+NO\+\_\+\+DATA}+1]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ [AMR\_4\_75] = 95,} \DoxyCodeLine{ [AMR\_5\_15] = 103,} \DoxyCodeLine{ [AMR\_5\_90] = 118,} \DoxyCodeLine{ [AMR\_6\_70] = 134,} \DoxyCodeLine{ [AMR\_7\_40] = 148,} \DoxyCodeLine{ [AMR\_7\_95] = 159,} \DoxyCodeLine{ [AMR\_10\_2] = 204,} \DoxyCodeLine{ [AMR\_12\_2] = 244,} \DoxyCodeLine{ [AMR\_SID] = 39,} \DoxyCodeLine{\}} \end{DoxyCode} These constants refer to the length of one \char`\"{}\+AMR core frame\char`\"{} as per TS 26.\+101 Section 4.\+2.\+2 / Table 2. \mbox{\label{gsm690_8c_ab84c9b2bc757b3902acd04009593fd0c}} \index{gsm690.c@{gsm690.c}!osmo\_amr\_type\_names@{osmo\_amr\_type\_names}} \index{osmo\_amr\_type\_names@{osmo\_amr\_type\_names}!gsm690.c@{gsm690.c}} \doxysubsubsection{osmo\_amr\_type\_names} {\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} osmo\+\_\+amr\+\_\+type\+\_\+names[$\,$]} {\bfseries Initial value\+:} \begin{DoxyCode}{0} \DoxyCodeLine{= \{} \DoxyCodeLine{ \{ AMR\_4\_75, \textcolor{stringliteral}{"{}AMR 4,75 kbits/s"{}} \},} \DoxyCodeLine{ \{ AMR\_5\_15, \textcolor{stringliteral}{"{}AMR 5,15 kbit/s"{}} \},} \DoxyCodeLine{ \{ AMR\_5\_90, \textcolor{stringliteral}{"{}AMR 5,90 kbit/s"{}} \},} \DoxyCodeLine{ \{ AMR\_6\_70, \textcolor{stringliteral}{"{}AMR 6,70 kbit/s (PDC-\/EFR)"{}} \},} \DoxyCodeLine{ \{ AMR\_7\_40, \textcolor{stringliteral}{"{}AMR 7,40 kbit/s (TDMA-\/EFR)"{}} \},} \DoxyCodeLine{ \{ AMR\_7\_95, \textcolor{stringliteral}{"{}AMR 7,95 kbit/s"{}} \},} \DoxyCodeLine{ \{ AMR\_10\_2, \textcolor{stringliteral}{"{}AMR 10,2 kbit/s"{}} \},} \DoxyCodeLine{ \{ AMR\_12\_2, \textcolor{stringliteral}{"{}AMR 12,2 kbit/s (GSM-\/EFR)"{}} \},} \DoxyCodeLine{ \{ AMR\_SID, \textcolor{stringliteral}{"{}AMR SID"{}} \},} \DoxyCodeLine{ \{ AMR\_GSM\_EFR\_SID, \textcolor{stringliteral}{"{}GSM-\/EFR SID"{}} \},} \DoxyCodeLine{ \{ AMR\_TDMA\_EFR\_SID, \textcolor{stringliteral}{"{}TDMA-\/EFR SID"{}} \},} \DoxyCodeLine{ \{ AMR\_PDC\_EFR\_SID, \textcolor{stringliteral}{"{}PDC-\/EFR SID"{}} \},} \DoxyCodeLine{ \{ AMR\_NO\_DATA, \textcolor{stringliteral}{"{}No Data/NA"{}} \},} \DoxyCodeLine{ \{ 0, NULL \},} \DoxyCodeLine{\}} \end{DoxyCode} Referenced by \textbf{ osmo\+\_\+amr\+\_\+type\+\_\+name()}. \mbox{\label{gsm690_8c_a63ea2edffffe43bfc2e98dcb54825ea7}} \index{gsm690.c@{gsm690.c}!ts26101\_reorder\_tables@{ts26101\_reorder\_tables}} \index{ts26101\_reorder\_tables@{ts26101\_reorder\_tables}!gsm690.c@{gsm690.c}} \doxysubsubsection{ts26101\_reorder\_tables} {\footnotesize\ttfamily const struct \textbf{ ts26101\+\_\+reorder\+\_\+table} ts26101\+\_\+reorder\+\_\+tables[8]\hspace{0.3cm}{\ttfamily [static]}} Referenced by \textbf{ osmo\+\_\+amr\+\_\+d\+\_\+to\+\_\+s()}, and \textbf{ osmo\+\_\+amr\+\_\+s\+\_\+to\+\_\+d()}.