<ahref="mqc_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/*</span></div>
<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> * The copyright in this software is being made available under the 2-clauses </span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment"> * BSD License, included below. This software may be subject to other third </span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment"> * party and contributor rights, including patent rights, and no such rights</span></div>
<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * are granted under this license.</span></div>
<divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="comment"> * modification, are permitted provided that the following conditions</span></div>
<divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="comment"> * are met:</span></div>
<divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="comment"> * 1. Redistributions of source code must retain the above copyright</span></div>
<divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
<divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment"> * notice, this list of conditions and the following disclaimer in the</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment"> * documentation and/or other materials provided with the distribution.</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> <spanclass="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<divclass="ttc"id="structopj__mqc__state_html_a1ee680e4a9420ef645e2c3081a04c9c5"><divclass="ttname"><ahref="structopj__mqc__state.html#a1ee680e4a9420ef645e2c3081a04c9c5">opj_mqc_state::qeval</a></div><divclass="ttdeci">OPJ_UINT32 qeval</div><divclass="ttdoc">the probability of the Least Probable Symbol (0.75->0x8000, 1.5->0xffff) </div><divclass="ttdef"><b>Definition:</b> mqc.h:57</div></div>
<divclass="ttc"id="group___m_q_c_html_ga3acb7e6dd9ce8878a97e1f023510be28"><divclass="ttname"><ahref="group___m_q_c.html#ga3acb7e6dd9ce8878a97e1f023510be28">opj_mqc_create</a></div><divclass="ttdeci">opj_mqc_t * opj_mqc_create(void)</div><divclass="ttdoc">Create a new MQC handle. </div><divclass="ttdef"><b>Definition:</b> mqc.c:369</div></div>
<divclass="ttc"id="group___m_q_c_html_ga9b1de23283892ba50029b75ab1b9a91a"><divclass="ttname"><ahref="group___m_q_c.html#ga9b1de23283892ba50029b75ab1b9a91a">opj_mqc_resetstates</a></div><divclass="ttdeci">void opj_mqc_resetstates(opj_mqc_t *mqc)</div><divclass="ttdoc">Reset the states of all the context of the coder/decoder (each context is set to a state where 0 and ...</div><divclass="ttdef"><b>Definition:</b> mqc.c:607</div></div>
<divclass="ttc"id="structopj__mqc__state_html"><divclass="ttname"><ahref="structopj__mqc__state.html">opj_mqc_state</a></div><divclass="ttdoc">This struct defines the state of a context. </div><divclass="ttdef"><b>Definition:</b> mqc.h:55</div></div>
<divclass="ttc"id="group___m_q_c_html_ga136e9f02b4e53ede318511f7d42bf190"><divclass="ttname"><ahref="group___m_q_c.html#ga136e9f02b4e53ede318511f7d42bf190">opj_mqc_destroy</a></div><divclass="ttdeci">void opj_mqc_destroy(opj_mqc_t *mqc)</div><divclass="ttdoc">Destroy a previously created MQC handle. </div><divclass="ttdef"><b>Definition:</b> mqc.c:379</div></div>
<divclass="ttc"id="group___m_q_c_html_ga39b562515ebaa0a9707c51b6770ad7fe"><divclass="ttname"><ahref="group___m_q_c.html#ga39b562515ebaa0a9707c51b6770ad7fe">opj_mqc_flush</a></div><divclass="ttdeci">void opj_mqc_flush(opj_mqc_t *mqc)</div><divclass="ttdoc">Flush the encoder, so that all remaining data is written. </div><divclass="ttdef"><b>Definition:</b> mqc.c:416</div></div>
<divclass="ttc"id="structopj__mqc__state_html_adb7b0a0d394f049e018262c2a5bc7135"><divclass="ttname"><ahref="structopj__mqc__state.html#adb7b0a0d394f049e018262c2a5bc7135">opj_mqc_state::nmps</a></div><divclass="ttdeci">struct opj_mqc_state * nmps</div><divclass="ttdoc">next state if the next encoded symbol is the MPS </div><divclass="ttdef"><b>Definition:</b> mqc.h:61</div></div>
<divclass="ttc"id="structopj__mqc__state_html_a09a5fefe0bd4e7c0d56ec69220dfd990"><divclass="ttname"><ahref="structopj__mqc__state.html#a09a5fefe0bd4e7c0d56ec69220dfd990">opj_mqc_state::mps</a></div><divclass="ttdeci">OPJ_UINT32 mps</div><divclass="ttdoc">the Most Probable Symbol (0 or 1) </div><divclass="ttdef"><b>Definition:</b> mqc.h:59</div></div>
<divclass="ttc"id="group___m_q_c_html_ga1f60c8d5f193846052cfa42f09290759"><divclass="ttname"><ahref="group___m_q_c.html#ga1f60c8d5f193846052cfa42f09290759">opj_mqc_state_t</a></div><divclass="ttdeci">struct opj_mqc_state opj_mqc_state_t</div><divclass="ttdoc">This struct defines the state of a context. </div></div>
<divclass="ttc"id="structopj__mqc__state_html_a5e63637e9eae42fc08dbf590c39bd164"><divclass="ttname"><ahref="structopj__mqc__state.html#a5e63637e9eae42fc08dbf590c39bd164">opj_mqc_state::nlps</a></div><divclass="ttdeci">struct opj_mqc_state * nlps</div><divclass="ttdoc">next state if the next encoded symbol is the LPS </div><divclass="ttdef"><b>Definition:</b> mqc.h:63</div></div>
<divclass="ttc"id="group___m_q_c_html_gabe330c18fbdee2676a2201f88a756be2"><divclass="ttname"><ahref="group___m_q_c.html#gabe330c18fbdee2676a2201f88a756be2">opj_mqc_encode</a></div><divclass="ttdeci">void opj_mqc_encode(opj_mqc_t *mqc, OPJ_UINT32 d)</div><divclass="ttdoc">Encode a symbol using the MQ-coder. </div><divclass="ttdef"><b>Definition:</b> mqc.c:408</div></div>
<divclass="ttc"id="group___m_q_c_html_gac1a06acd83ef63950db20f73251efab3"><divclass="ttname"><ahref="group___m_q_c.html#gac1a06acd83ef63950db20f73251efab3">opj_mqc_init_enc</a></div><divclass="ttdeci">void opj_mqc_init_enc(opj_mqc_t *mqc, OPJ_BYTE *bp)</div><divclass="ttdoc">Initialize the encoder. </div><divclass="ttdef"><b>Definition:</b> mqc.c:398</div></div>
<divclass="ttc"id="group___m_q_c_html_gac9c6d11f48074e5064584d1e5d0dcd0f"><divclass="ttname"><ahref="group___m_q_c.html#gac9c6d11f48074e5064584d1e5d0dcd0f">opj_mqc_numbytes</a></div><divclass="ttdeci">OPJ_UINT32 opj_mqc_numbytes(opj_mqc_t *mqc)</div><divclass="ttdoc">Return the number of bytes written/read since initialisation. </div><divclass="ttdef"><b>Definition:</b> mqc.c:390</div></div>
<divclass="ttc"id="group___m_q_c_html_ga7260daca59a1e01f087a7806db045853"><divclass="ttname"><ahref="group___m_q_c.html#ga7260daca59a1e01f087a7806db045853">opj_mqc_setstate</a></div><divclass="ttdeci">void opj_mqc_setstate(opj_mqc_t *mqc, OPJ_UINT32 ctxno, OPJ_UINT32 msb, OPJ_INT32 prob)</div><divclass="ttdoc">Set the state of a particular context. </div><divclass="ttdef"><b>Definition:</b> mqc.c:614</div></div>