blob: 8a777ed0d9dbb44e1abbb70c03e8446dd3d9990c [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>CMSIS DSP Software Library: DCT Type IV Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.2 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li id="searchli">
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<h1>DCT Type IV Functions<br/>
<small>
[<a class="el" href="group__group_transforms.html">Transform Functions</a>]</small>
</h1> </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gab094ad3bc6fa1b84e8b12a24e1850a06">arm_dct4_init_f32</a> (<a class="el" href="structarm__dct4__instance__f32.html">arm_dct4_instance_f32</a> *S, <a class="el" href="structarm__rfft__instance__f32.html">arm_rfft_instance_f32</a> *S_RFFT, <a class="el" href="structarm__cfft__radix4__instance__f32.html">arm_cfft_radix4_instance_f32</a> *S_CFFT, uint16_t N, uint16_t Nby2, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> normalize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gafd538d68886848bc090ec2b0d364cc81">arm_dct4_f32</a> (const <a class="el" href="structarm__dct4__instance__f32.html">arm_dct4_instance_f32</a> *S, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pState, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pInlineBuffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga631bb59c7c97c814ff7147ecba6a716a">arm_dct4_init_q31</a> (<a class="el" href="structarm__dct4__instance__q31.html">arm_dct4_instance_q31</a> *S, <a class="el" href="structarm__rfft__instance__q31.html">arm_rfft_instance_q31</a> *S_RFFT, <a class="el" href="structarm__cfft__radix4__instance__q31.html">arm_cfft_radix4_instance_q31</a> *S_CFFT, uint16_t N, uint16_t Nby2, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> normalize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gad04d0baab6ed081d8e8afe02538eb80b">arm_dct4_q31</a> (const <a class="el" href="structarm__dct4__instance__q31.html">arm_dct4_instance_q31</a> *S, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pState, <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *pInlineBuffer)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga966fd1b66a80873964533703ab5dc054">arm_dct4_init_q15</a> (<a class="el" href="structarm__dct4__instance__q15.html">arm_dct4_instance_q15</a> *S, <a class="el" href="structarm__rfft__instance__q15.html">arm_rfft_instance_q15</a> *S_RFFT, <a class="el" href="structarm__cfft__radix4__instance__q15.html">arm_cfft_radix4_instance_q15</a> *S_CFFT, uint16_t N, uint16_t Nby2, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> normalize)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga114cb9635059f678df291fcc887aaf2b">arm_dct4_q15</a> (const <a class="el" href="structarm__dct4__instance__q15.html">arm_dct4_instance_q15</a> *S, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pState, <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *pInlineBuffer)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gad00f29d896d64d6da7afbbb9d3e182a4">Weights_128</a> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gaeb67b0be5b3c2139d660e02cedeed908">Weights_512</a> [1024]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gac3a2a00b3106dfcb5e0a582f50c65692">Weights_2048</a> [4096]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga16248ed86161ef97538011b49f13e8b7">cos_factors_128</a> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga49fd288352ca5bb43f5cec52273b0d80">cos_factors_512</a> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga1ba5306e0bc44730b40ab34cced45fd6">cos_factors_2048</a> [2048]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga02d7024538a87214296b01d83ba36b02">WeightsQ31_128</a> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga31a8217a96f7d3171921e98398f31596">WeightsQ31_512</a> [1024]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga725b65c25a02b3cad329e18bb832f65e">WeightsQ31_2048</a> [4096]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gabb8ee2004a3520fd08388db637d43875">cos_factorsQ31_128</a> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga3559569e603cb918911074be88523d0e">cos_factorsQ31_512</a> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gaa15fc3fb058482defda371113cd12e74">cos_factorsQ31_2048</a> [2048]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga8e8f0253c5a4337bd90968838db6164d">WeightsQ15_128</a> [256]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga0492a1e2539ffb9d5276a357dab9dca1">WeightsQ15_512</a> [1024]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gab858d2072b29f338b5dabf5cde9aaf66">WeightsQ15_2048</a> [4096]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#ga373f2b52659505b0bb5066cd6c8a9041">cos_factorsQ15_128</a> [128]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gaf3a2b1f1c23720eed1c1fd380fcc43f9">cos_factorsQ15_512</a> [512]</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_c_t4___i_d_c_t4.html#gafd1bd60aa573ba5ee349a05aaa32d915">cos_factorsQ15_2048</a> [2048]</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Representation of signals by minimum number of values is important for storage and transmission. The possibility of large discontinuity between the beginning and end of a period of a signal in DFT can be avoided by extending the signal so that it is even-symmetric. Discrete Cosine Transform (DCT) is constructed such that its energy is heavily concentrated in the lower part of the spectrum and is very widely used in signal and image coding applications. The family of DCTs (DCT type- 1,2,3,4) is the outcome of different combinations of homogeneous boundary conditions. DCT has an excellent energy-packing capability, hence has many applications and in data compression in particular.</p>
<p>DCT is essentially the Discrete Fourier Transform(DFT) of an even-extended real signal. Reordering of the input data makes the computation of DCT just a problem of computing the DFT of a real signal with a few additional operations. This approach provides regular, simple, and very efficient DCT algorithms for practical hardware and software implementations.</p>
<p>DCT type-II can be implemented using Fast fourier transform (FFT) internally, as the transform is applied on real values, Real FFT can be used. DCT4 is implemented using DCT2 as their implementations are similar except with some added pre-processing and post-processing. DCT2 implementation can be described in the following steps:</p>
<ul>
<li>Re-ordering input</li>
<li>Calculating Real FFT</li>
<li>Multiplication of weights and Real FFT output and getting real part from the product.</li>
</ul>
<p>This process is explained by the block diagram below: </p>
<div align="center">
<img src="DCT4.gif" alt="DCT4.gif"/>
<p><strong>Discrete Cosine Transform - type-IV</strong></p></div>
<dl class="user"><dt><b>Algorithm: </b></dt><dd>The N-point type-IV DCT is defined as a real, linear transformation by the formula: <div align="center">
<img src="DCT4Equation.gif" alt="DCT4Equation.gif"/>
</div>
where <code>k = 0,1,2,.....N-1</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Its inverse is defined as follows: <div align="center">
<img src="IDCT4Equation.gif" alt="IDCT4Equation.gif"/>
</div>
where <code>n = 0,1,2,.....N-1</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>The DCT4 matrices become involutory (i.e. they are self-inverse) by multiplying with an overall scale factor of sqrt(2/N). The symmetry of the transform matrix indicates that the fast algorithms for the forward and inverse transform computation are identical. Note that the implementation of Inverse DCT4 and DCT4 is same, hence same process function can be used for both.</dd></dl>
<dl class="user"><dt><b>Lengths supported by the transform: </b></dt><dd>As DCT4 internally uses Real FFT, it supports all the lengths supported by <a class="el" href="group___r_f_f_t___r_i_f_f_t.html#ga3df1766d230532bc068fc4ed69d0fcdc" title="Processing function for the floating-point RFFT/RIFFT.">arm_rfft_f32()</a>. The library provides separate functions for Q15, Q31, and floating-point data types. </dd></dl>
<dl class="user"><dt><b>Instance Structure </b></dt><dd>The instances for Real FFT and FFT, cosine values table and twiddle factor table are stored in an instance data structure. A separate instance structure must be defined for each transform. There are separate instance structure declarations for each of the 3 supported data types.</dd></dl>
<dl class="user"><dt><b>Initialization Functions </b></dt><dd>There is also an associated initialization function for each data type. The initialization function performs the following operations:<ul>
<li>Sets the values of the internal structure fields.</li>
<li>Initializes Real FFT as its process function is used internally in DCT4, by calling <a class="el" href="group___r_f_f_t___r_i_f_f_t.html#ga10717ee326bf50832ef1c25b85a23068" title="Initialization function for the floating-point RFFT/RIFFT.">arm_rfft_init_f32()</a>. </li>
</ul>
</dd></dl>
<dl class="user"><dt><b></b></dt><dd>Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed into a const data section. To place an instance structure into a const data section, the instance structure must be manually initialized. Manually initialize the instance structure as follows: <pre>
<a class="el" href="structarm__dct4__instance__f32.html" title="Instance structure for the floating-point DCT4/IDCT4 function.">arm_dct4_instance_f32</a> S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft};
<a class="el" href="structarm__dct4__instance__q31.html" title="Instance structure for the Q31 DCT4/IDCT4 function.">arm_dct4_instance_q31</a> S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft};
<a class="el" href="structarm__dct4__instance__q15.html" title="Instance structure for the Q15 DCT4/IDCT4 function.">arm_dct4_instance_q15</a> S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft};
</pre> where <code>N</code> is the length of the DCT4; <code>Nby2</code> is half of the length of the DCT4; <code>normalize</code> is normalizing factor used and is equal to <code>sqrt(2/N)</code>; <code>pTwiddle</code> points to the twiddle factor table; <code>pCosFactor</code> points to the cosFactor table; <code>pRfft</code> points to the real FFT instance; <code>pCfft</code> points to the complex FFT instance; The CFFT and RFFT structures also needs to be initialized, refer to <a class="el" href="group___c_f_f_t___c_i_f_f_t.html#ga521f670cd9c571bc61aff9bec89f4c26" title="Processing function for the floating-point CFFT/CIFFT.">arm_cfft_radix4_f32()</a> and <a class="el" href="group___r_f_f_t___r_i_f_f_t.html#ga3df1766d230532bc068fc4ed69d0fcdc" title="Processing function for the floating-point RFFT/RIFFT.">arm_rfft_f32()</a> respectively for details regarding static initialization.</dd></dl>
<dl class="user"><dt><b>Fixed-Point Behavior </b></dt><dd>Care must be taken when using the fixed-point versions of the DCT4 transform functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines. </dd></dl>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gab094ad3bc6fa1b84e8b12a24e1850a06"></a><!-- doxytag: member="arm_dct4_init_f32.c::arm_dct4_init_f32" ref="gab094ad3bc6fa1b84e8b12a24e1850a06" args="(arm_dct4_instance_f32 *S, arm_rfft_instance_f32 *S_RFFT, arm_cfft_radix4_instance_f32 *S_CFFT, uint16_t N, uint16_t Nby2, float32_t normalize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a> arm_dct4_init_f32 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structarm__dct4__instance__f32.html">arm_dct4_instance_f32</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__rfft__instance__f32.html">arm_rfft_instance_f32</a> *&#160;</td>
<td class="paramname"> <em>S_RFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__cfft__radix4__instance__f32.html">arm_cfft_radix4_instance_f32</a> *&#160;</td>
<td class="paramname"> <em>S_CFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>N</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>Nby2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a>&#160;</td>
<td class="paramname"> <em>normalize</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialization function for the floating-point DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of floating-point DCT4/IDCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_RFFT</td><td>points to an instance of floating-point RFFT/RIFFT structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_CFFT</td><td>points to an instance of floating-point CFFT/CIFFT structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">N</td><td>length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">Nby2</td><td>half of the length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">normalize</td><td>normalizing factor. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>fftLenReal</code> is not a supported transform length. </dd></dl>
<dl class="user"><dt><b>Normalizing factor: </b></dt><dd>The normalizing factor is <code>sqrt(2/N)</code>, which depends on the size of transform <code>N</code>. Floating-point normalizing factors are mentioned in the table below for different DCT sizes: <div align="center">
<img src="dct4NormalizingF32Table.gif" alt="dct4NormalizingF32Table.gif"/>
</div>
</dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l04142">4142</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="gafd538d68886848bc090ec2b0d364cc81"></a><!-- doxytag: member="arm_dct4_f32.c::arm_dct4_f32" ref="gafd538d68886848bc090ec2b0d364cc81" args="(const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void arm_dct4_f32 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structarm__dct4__instance__f32.html">arm_dct4_instance_f32</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
<td class="paramname"> <em>pState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *&#160;</td>
<td class="paramname"> <em>pInlineBuffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Processing function for the floating-point DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the floating-point DCT4/IDCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to state buffer. </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">*pInlineBuffer</td><td>points to the in-place input and output buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>none. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__f32_8c_source.html#l00126">126</a> of file <a class="el" href="arm__dct4__f32_8c_source.html">arm_dct4_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga631bb59c7c97c814ff7147ecba6a716a"></a><!-- doxytag: member="arm_dct4_init_q31.c::arm_dct4_init_q31" ref="ga631bb59c7c97c814ff7147ecba6a716a" args="(arm_dct4_instance_q31 *S, arm_rfft_instance_q31 *S_RFFT, arm_cfft_radix4_instance_q31 *S_CFFT, uint16_t N, uint16_t Nby2, q31_t normalize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a> arm_dct4_init_q31 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structarm__dct4__instance__q31.html">arm_dct4_instance_q31</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__rfft__instance__q31.html">arm_rfft_instance_q31</a> *&#160;</td>
<td class="paramname"> <em>S_RFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__cfft__radix4__instance__q31.html">arm_cfft_radix4_instance_q31</a> *&#160;</td>
<td class="paramname"> <em>S_CFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>N</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>Nby2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a>&#160;</td>
<td class="paramname"> <em>normalize</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialization function for the Q31 DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of Q31 DCT4/IDCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_RFFT</td><td>points to an instance of Q31 RFFT/RIFFT structure </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_CFFT</td><td>points to an instance of Q31 CFFT/CIFFT structure </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">N</td><td>length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">Nby2</td><td>half of the length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">normalize</td><td>normalizing factor. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length. </dd></dl>
<dl class="user"><dt><b>Normalizing factor: </b></dt><dd>The normalizing factor is <code>sqrt(2/N)</code>, which depends on the size of transform <code>N</code>. Normalizing factors in 1.31 format are mentioned in the table below for different DCT sizes: <div align="center">
<img src="dct4NormalizingQ31Table.gif" alt="dct4NormalizingQ31Table.gif"/>
</div>
</dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l02133">2133</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="gad04d0baab6ed081d8e8afe02538eb80b"></a><!-- doxytag: member="arm_dct4_q31.c::arm_dct4_q31" ref="gad04d0baab6ed081d8e8afe02538eb80b" args="(const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void arm_dct4_q31 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structarm__dct4__instance__q31.html">arm_dct4_instance_q31</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
<td class="paramname"> <em>pState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> *&#160;</td>
<td class="paramname"> <em>pInlineBuffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Processing function for the Q31 DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the Q31 DCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to state buffer. </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">*pInlineBuffer</td><td>points to the in-place input and output buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>none. </dd></dl>
<dl class="user"><dt><b>Input an output formats: </b></dt><dd>Input samples need to be downscaled by 1 bit to avoid saturations in the Q31 DCT process, as the conversion from DCT2 to DCT4 involves one subtraction. Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:</dd></dl>
<div align="center">
<img src="dct4FormatsQ31Table.gif" alt="dct4FormatsQ31Table.gif"/>
</div>
<p>Definition at line <a class="el" href="arm__dct4__q31_8c_source.html#l00053">53</a> of file <a class="el" href="arm__dct4__q31_8c_source.html">arm_dct4_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga966fd1b66a80873964533703ab5dc054"></a><!-- doxytag: member="arm_dct4_init_q15.c::arm_dct4_init_q15" ref="ga966fd1b66a80873964533703ab5dc054" args="(arm_dct4_instance_q15 *S, arm_rfft_instance_q15 *S_RFFT, arm_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="arm__math_8h.html#a5e459c6409dfcd2927bb8a57491d7cf6">arm_status</a> arm_dct4_init_q15 </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structarm__dct4__instance__q15.html">arm_dct4_instance_q15</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__rfft__instance__q15.html">arm_rfft_instance_q15</a> *&#160;</td>
<td class="paramname"> <em>S_RFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structarm__cfft__radix4__instance__q15.html">arm_cfft_radix4_instance_q15</a> *&#160;</td>
<td class="paramname"> <em>S_CFFT</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>N</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"> <em>Nby2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a>&#160;</td>
<td class="paramname"> <em>normalize</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Initialization function for the Q15 DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">*S</td><td>points to an instance of Q15 DCT4/IDCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_RFFT</td><td>points to an instance of Q15 RFFT/RIFFT structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*S_CFFT</td><td>points to an instance of Q15 CFFT/CIFFT structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">N</td><td>length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">Nby2</td><td>half of the length of the DCT4. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">normalize</td><td>normalizing factor. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>arm_status function returns ARM_MATH_SUCCESS if initialization is successful or ARM_MATH_ARGUMENT_ERROR if <code>N</code> is not a supported transform length. </dd></dl>
<dl class="user"><dt><b>Normalizing factor: </b></dt><dd>The normalizing factor is <code>sqrt(2/N)</code>, which depends on the size of transform <code>N</code>. Normalizing factors in 1.15 format are mentioned in the table below for different DCT sizes: <div align="center">
<img src="dct4NormalizingQ15Table.gif" alt="dct4NormalizingQ15Table.gif"/>
</div>
</dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l01125">1125</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga114cb9635059f678df291fcc887aaf2b"></a><!-- doxytag: member="arm_dct4_q15.c::arm_dct4_q15" ref="ga114cb9635059f678df291fcc887aaf2b" args="(const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void arm_dct4_q15 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structarm__dct4__instance__q15.html">arm_dct4_instance_q15</a> *&#160;</td>
<td class="paramname"> <em>S</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
<td class="paramname"> <em>pState</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> *&#160;</td>
<td class="paramname"> <em>pInlineBuffer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Processing function for the Q15 DCT4/IDCT4. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">*S</td><td>points to an instance of the Q15 DCT4 structure. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">*pState</td><td>points to state buffer. </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">*pInlineBuffer</td><td>points to the in-place input and output buffer. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>none.</dd></dl>
<dl class="user"><dt><b>Input an output formats: </b></dt><dd>Internally inputs are downscaled in the RFFT process function to avoid overflows. Number of bits downscaled, depends on the size of the transform. The input and output formats for different DCT sizes and number of bits to upscale are mentioned in the table below:</dd></dl>
<div align="center">
<img src="dct4FormatsQ15Table.gif" alt="dct4FormatsQ15Table.gif"/>
</div>
<p>Definition at line <a class="el" href="arm__dct4__q15_8c_source.html#l00052">52</a> of file <a class="el" href="arm__dct4__q15_8c_source.html">arm_dct4_q15.c</a>.</p>
</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gad00f29d896d64d6da7afbbb9d3e182a4"></a><!-- doxytag: member="arm_dct4_init_f32.c::Weights_128" ref="gad00f29d896d64d6da7afbbb9d3e182a4" args="[256]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gad00f29d896d64d6da7afbbb9d3e182a4">Weights_128</a>[256]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="user"><dt><b></b></dt><dd>Weights tables are generated using the formula : <pre>weights[n] = e^(-j*n*pi/(2*N))</pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table <pre>
for(i = 0; i&lt; N; i++)
{
weights[2*i]= cos(i*c);
weights[(2*i)+1]= -sin(i * c);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Where <code>N</code> is the Number of weights to be calculated and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>In the tables below the real and imaginary values are placed alternatively, hence the array length is <code>2*N</code>. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l00064">64</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="gaeb67b0be5b3c2139d660e02cedeed908"></a><!-- doxytag: member="arm_dct4_init_f32.c::Weights_512" ref="gaeb67b0be5b3c2139d660e02cedeed908" args="[1024]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gaeb67b0be5b3c2139d660e02cedeed908">Weights_512</a>[1024]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l00195">195</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="gac3a2a00b3106dfcb5e0a582f50c65692"></a><!-- doxytag: member="arm_dct4_init_f32.c::Weights_2048" ref="gac3a2a00b3106dfcb5e0a582f50c65692" args="[4096]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gac3a2a00b3106dfcb5e0a582f50c65692">Weights_2048</a>[4096]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l00710">710</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga16248ed86161ef97538011b49f13e8b7"></a><!-- doxytag: member="arm_dct4_init_f32.c::cos_factors_128" ref="ga16248ed86161ef97538011b49f13e8b7" args="[128]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga16248ed86161ef97538011b49f13e8b7">cos_factors_128</a>[128]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="user"><dt><b></b></dt><dd>cosFactor tables are generated using the formula : <pre>cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))</pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table </dd></dl>
<dl class="user"><dt><b></b></dt><dd><pre> for(i = 0; i&lt; N; i++)
{
cos_factors[i]= 2 * cos((2*i+1)*c/2);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>where <code>N</code> is the number of factors to generate and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l02774">2774</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga49fd288352ca5bb43f5cec52273b0d80"></a><!-- doxytag: member="arm_dct4_init_f32.c::cos_factors_512" ref="ga49fd288352ca5bb43f5cec52273b0d80" args="[512]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga49fd288352ca5bb43f5cec52273b0d80">cos_factors_512</a>[512]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l02841">2841</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga1ba5306e0bc44730b40ab34cced45fd6"></a><!-- doxytag: member="arm_dct4_init_f32.c::cos_factors_2048" ref="ga1ba5306e0bc44730b40ab34cced45fd6" args="[2048]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga1ba5306e0bc44730b40ab34cced45fd6">cos_factors_2048</a>[2048]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__f32_8c_source.html#l03100">3100</a> of file <a class="el" href="arm__dct4__init__f32_8c_source.html">arm_dct4_init_f32.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga02d7024538a87214296b01d83ba36b02"></a><!-- doxytag: member="arm_dct4_init_q31.c::WeightsQ31_128" ref="ga02d7024538a87214296b01d83ba36b02" args="[256]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga02d7024538a87214296b01d83ba36b02">WeightsQ31_128</a>[256]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="user"><dt><b></b></dt><dd>Weights tables are generated using the formula : <pre>weights[n] = e^(-j*n*pi/(2*N))</pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table <pre>
for(i = 0; i&lt; N; i++)
{
weights[2*i]= cos(i*c);
weights[(2*i)+1]= -sin(i * c);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>where <code>N</code> is the Number of weights to be calculated and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Convert the output to q31 format by multiplying with 2^31 and saturated if required. </dd></dl>
<dl class="user"><dt><b></b></dt><dd>In the tables below the real and imaginary values are placed alternatively, hence the array length is <code>2*N</code>. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l00066">66</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga31a8217a96f7d3171921e98398f31596"></a><!-- doxytag: member="arm_dct4_init_q31.c::WeightsQ31_512" ref="ga31a8217a96f7d3171921e98398f31596" args="[1024]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga31a8217a96f7d3171921e98398f31596">WeightsQ31_512</a>[1024]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l00133">133</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga725b65c25a02b3cad329e18bb832f65e"></a><!-- doxytag: member="arm_dct4_init_q31.c::WeightsQ31_2048" ref="ga725b65c25a02b3cad329e18bb832f65e" args="[4096]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga725b65c25a02b3cad329e18bb832f65e">WeightsQ31_2048</a>[4096]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l00392">392</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="gabb8ee2004a3520fd08388db637d43875"></a><!-- doxytag: member="arm_dct4_init_q31.c::cos_factorsQ31_128" ref="gabb8ee2004a3520fd08388db637d43875" args="[128]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gabb8ee2004a3520fd08388db637d43875">cos_factorsQ31_128</a>[128]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="user"><dt><b></b></dt><dd>cosFactor tables are generated using the formula : <pre>cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))</pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table <pre>
for(i = 0; i&lt; N; i++)
{
cos_factors[i]= 2 * cos((2*i+1)*c/2);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>where <code>N</code> is the number of factors to generate and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Then converted to q31 format by multiplying with 2^31 and saturated if required. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l01436">1436</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga3559569e603cb918911074be88523d0e"></a><!-- doxytag: member="arm_dct4_init_q31.c::cos_factorsQ31_512" ref="ga3559569e603cb918911074be88523d0e" args="[512]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga3559569e603cb918911074be88523d0e">cos_factorsQ31_512</a>[512]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l01471">1471</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="gaa15fc3fb058482defda371113cd12e74"></a><!-- doxytag: member="arm_dct4_init_q31.c::cos_factorsQ31_2048" ref="gaa15fc3fb058482defda371113cd12e74" args="[2048]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#adc89a3547f5324b7b3b95adec3806bc0">q31_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gaa15fc3fb058482defda371113cd12e74">cos_factorsQ31_2048</a>[2048]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q31_8c_source.html#l01602">1602</a> of file <a class="el" href="arm__dct4__init__q31_8c_source.html">arm_dct4_init_q31.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga8e8f0253c5a4337bd90968838db6164d"></a><!-- doxytag: member="arm_dct4_init_q15.c::WeightsQ15_128" ref="ga8e8f0253c5a4337bd90968838db6164d" args="[256]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga8e8f0253c5a4337bd90968838db6164d">WeightsQ15_128</a>[256]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="user"><dt><b></b></dt><dd>Weights tables are generated using the formula : <pre>weights[n] = e^(-j*n*pi/(2*N))</pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table <pre>
for(i = 0; i&lt; N; i++)
{
weights[2*i]= cos(i*c);
weights[(2*i)+1]= -sin(i * c);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>where <code>N</code> is the Number of weights to be calculated and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Converted the output to q15 format by multiplying with 2^31 and saturated if required. </dd></dl>
<dl class="user"><dt><b></b></dt><dd>In the tables below the real and imaginary values are placed alternatively, hence the array length is <code>2*N</code>. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00066">66</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga0492a1e2539ffb9d5276a357dab9dca1"></a><!-- doxytag: member="arm_dct4_init_q15.c::WeightsQ15_512" ref="ga0492a1e2539ffb9d5276a357dab9dca1" args="[1024]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga0492a1e2539ffb9d5276a357dab9dca1">WeightsQ15_512</a>[1024]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00101">101</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="gab858d2072b29f338b5dabf5cde9aaf66"></a><!-- doxytag: member="arm_dct4_init_q15.c::WeightsQ15_2048" ref="gab858d2072b29f338b5dabf5cde9aaf66" args="[4096]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gab858d2072b29f338b5dabf5cde9aaf66">WeightsQ15_2048</a>[4096]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00232">232</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="ga373f2b52659505b0bb5066cd6c8a9041"></a><!-- doxytag: member="arm_dct4_init_q15.c::cos_factorsQ15_128" ref="ga373f2b52659505b0bb5066cd6c8a9041" args="[128]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#ga373f2b52659505b0bb5066cd6c8a9041">cos_factorsQ15_128</a>[128]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment"> {
0x7fff, 0x7ffa, 0x7ff0, 0x7fe1, 0x7fce, 0x7fb5, 0x7f97, 0x7f75,
0x7f4d, 0x7f21, 0x7ef0, 0x7eba, 0x7e7f, 0x7e3f, 0x7dfa, 0x7db0,
0x7d62, 0x7d0f, 0x7cb7, 0x7c5a, 0x7bf8, 0x7b92, 0x7b26, 0x7ab6,
0x7a42, 0x79c8, 0x794a, 0x78c7, 0x7840, 0x77b4, 0x7723, 0x768e,
0x75f4, 0x7555, 0x74b2, 0x740b, 0x735f, 0x72af, 0x71fa, 0x7141,
0x7083, 0x6fc1, 0x6efb, 0x6e30, 0x6d62, 0x6c8f, 0x6bb8, 0x6adc,
0x69fd, 0x6919, 0x6832, 0x6746, 0x6657, 0x6563, 0x646c, 0x6371,
0x6271, 0x616f, 0x6068, 0x5f5e, 0x5e50, 0x5d3e, 0x5c29, 0x5b10,
0x59f3, 0x58d4, 0x57b0, 0x568a, 0x5560, 0x5433, 0x5302, 0x51ce,
0x5097, 0x4f5e, 0x4e21, 0x4ce1, 0x4b9e, 0x4a58, 0x490f, 0x47c3,
0x4675, 0x4524, 0x43d0, 0x427a, 0x4121, 0x3fc5, 0x3e68, 0x3d07,
0x3ba5, 0x3a40, 0x38d8, 0x376f, 0x3604, 0x3496, 0x3326, 0x31b5,
0x3041, 0x2ecc, 0x2d55, 0x2bdc, 0x2a61, 0x28e5, 0x2767, 0x25e8,
0x2467, 0x22e5, 0x2161, 0x1fdc, 0x1e56, 0x1ccf, 0x1b47, 0x19bd,
0x1833, 0x16a8, 0x151b, 0x138e, 0x1201, 0x1072, 0xee3, 0xd53,
0xbc3, 0xa33, 0x8a2, 0x710, 0x57f, 0x3ed, 0x25b, 0xc9
}
</pre></div><dl class="user"><dt><b></b></dt><dd>cosFactor tables are generated using the formula : <pre> cos_factors[n] = 2 * cos((2n+1)*pi/(4*N)) </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>C command to generate the table <pre>
for(i = 0; i&lt; N; i++)
{
cos_factors[i]= 2 * cos((2*i+1)*c/2);
} </pre> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>where <code>N</code> is the number of factors to generate and <code>c</code> is <code>pi/(2*N)</code> </dd></dl>
<dl class="user"><dt><b></b></dt><dd>Then converted to q15 format by multiplying with 2^31 and saturated if required. </dd></dl>
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00764">764</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="gaf3a2b1f1c23720eed1c1fd380fcc43f9"></a><!-- doxytag: member="arm_dct4_init_q15.c::cos_factorsQ15_512" ref="gaf3a2b1f1c23720eed1c1fd380fcc43f9" args="[512]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gaf3a2b1f1c23720eed1c1fd380fcc43f9">cos_factorsQ15_512</a>[512]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00783">783</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
<a class="anchor" id="gafd1bd60aa573ba5ee349a05aaa32d915"></a><!-- doxytag: member="arm_dct4_init_q15.c::cos_factorsQ15_2048" ref="gafd1bd60aa573ba5ee349a05aaa32d915" args="[2048]" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="arm__math_8h.html#ab5a8fb21a5b3b983d5f54f31614052ea">q15_t</a> <a class="el" href="group___d_c_t4___i_d_c_t4.html#gafd1bd60aa573ba5ee349a05aaa32d915">cos_factorsQ15_2048</a>[2048]<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Definition at line <a class="el" href="arm__dct4__init__q15_8c_source.html#l00850">850</a> of file <a class="el" href="arm__dct4__init__q15_8c_source.html">arm_dct4_init_q15.c</a>.</p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 15 2011 13:16:21 for CMSIS DSP Software Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>