<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="line"><aname="l00081"></a><spanclass="lineno"> 81</span> <spanclass="comment">/* only used by decoder, to count the number of times a terminating 0xFF >0x8F marker is read */</span></div>
<divclass="ttc"id="group___m_q_c_html_ga4a259d02eadde28d92edac74dbc40323"><divclass="ttname"><ahref="group___m_q_c.html#ga4a259d02eadde28d92edac74dbc40323">opj_mqc_bypass_get_extra_bytes</a></div><divclass="ttdeci">OPJ_UINT32 opj_mqc_bypass_get_extra_bytes(opj_mqc_t *mqc, OPJ_BOOL erterm)</div><divclass="ttdoc">Return number of extra bytes to add to opj_mqc_numbytes() for the² size of a non-terminating BYPASS p...</div><divclass="ttdef"><b>Definition:</b> mqc.c:371</div></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:60</div></div>
<divclass="ttc"id="structopj__mqc_html_ac6e2a167d3bdf52a3c7378cc62d3ff20"><divclass="ttname"><ahref="structopj__mqc.html#ac6e2a167d3bdf52a3c7378cc62d3ff20">opj_mqc::start</a></div><divclass="ttdeci">OPJ_BYTE * start</div><divclass="ttdoc">pointer to the start of the buffer </div><divclass="ttdef"><b>Definition:</b> mqc.h:86</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:546</div></div>
<divclass="ttc"id="structopj__mqc_html_a800663d44b19c3469c242a35840dd9bf"><divclass="ttname"><ahref="structopj__mqc.html#a800663d44b19c3469c242a35840dd9bf">opj_mqc::ct</a></div><divclass="ttdeci">OPJ_UINT32 ct</div><divclass="ttdoc">number of bits already read or free to write </div><divclass="ttdef"><b>Definition:</b> mqc.h:80</div></div>
<divclass="ttc"id="structopj__mqc_html_a4cde92619ccfc00fcaf4e8f168eccb96"><divclass="ttname"><ahref="structopj__mqc.html#a4cde92619ccfc00fcaf4e8f168eccb96">opj_mqc::c</a></div><divclass="ttdeci">OPJ_UINT32 c</div><divclass="ttdoc">temporary buffer where bits are coded or decoded </div><divclass="ttdef"><b>Definition:</b> mqc.h:76</div></div>
<divclass="ttc"id="structopj__mqc_html_a78d587ba23a55100bc1bc669c8d210b4"><divclass="ttname"><ahref="structopj__mqc.html#a78d587ba23a55100bc1bc669c8d210b4">opj_mqc::ctxs</a></div><divclass="ttdeci">opj_mqc_state_t * ctxs[MQC_NUMCTXS]</div><divclass="ttdoc">Array of contexts. </div><divclass="ttdef"><b>Definition:</b> mqc.h:90</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:58</div></div>
<divclass="ttc"id="structopj__mqc_html_a3db4ba6d16362a3bb01801c76f3dad63"><divclass="ttname"><ahref="structopj__mqc.html#a3db4ba6d16362a3bb01801c76f3dad63">opj_mqc::bp</a></div><divclass="ttdeci">OPJ_BYTE * bp</div><divclass="ttdoc">pointer to the current position in the buffer </div><divclass="ttdef"><b>Definition:</b> mqc.h:84</div></div>
<divclass="ttc"id="group___m_q_c_html_gaa0e4b75040d645307e25dd53528e8512"><divclass="ttname"><ahref="group___m_q_c.html#gaa0e4b75040d645307e25dd53528e8512">opj_mqc_init_dec</a></div><divclass="ttdeci">void opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len, OPJ_UINT32 extra_writable_bytes)</div><divclass="ttdoc">Initialize the decoder for MQ decoding. </div><divclass="ttdef"><b>Definition:</b> mqc.c:507</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:315</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:64</div></div>
<divclass="ttc"id="opj__common_8h_html_a7f1b41029a9c8a29b973c4200df596dd"><divclass="ttname"><ahref="opj__common_8h.html#a7f1b41029a9c8a29b973c4200df596dd">OPJ_COMMON_CBLK_DATA_EXTRA</a></div><divclass="ttdeci">#define OPJ_COMMON_CBLK_DATA_EXTRA</div><divclass="ttdoc">Margin for a fake FFFF marker. </div><divclass="ttdef"><b>Definition:</b> opj_common.h:39</div></div>
<divclass="ttc"id="structopj__mqc_html_a464f7ff357673a604755c3bfd0b26a85"><divclass="ttname"><ahref="structopj__mqc.html#a464f7ff357673a604755c3bfd0b26a85">opj_mqc::backup</a></div><divclass="ttdeci">OPJ_BYTE backup[OPJ_COMMON_CBLK_DATA_EXTRA]</div><divclass="ttdoc">Original value of the 2 bytes at end[0] and end[1]. </div><divclass="ttdef"><b>Definition:</b> mqc.h:96</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:62</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_html_a26cf29944f5a74b2a0af55defaed5e5d"><divclass="ttname"><ahref="structopj__mqc.html#a26cf29944f5a74b2a0af55defaed5e5d">opj_mqc::a</a></div><divclass="ttdeci">OPJ_UINT32 a</div><divclass="ttdoc">only used by MQ decoder </div><divclass="ttdef"><b>Definition:</b> mqc.h:78</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:66</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:306</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:283</div></div>
<divclass="ttc"id="structopj__mqc_html_a82b0225c0f832b4ff04bf5dc171ea164"><divclass="ttname"><ahref="structopj__mqc.html#a82b0225c0f832b4ff04bf5dc171ea164">opj_mqc::end</a></div><divclass="ttdeci">OPJ_BYTE * end</div><divclass="ttdoc">pointer to the end of the buffer </div><divclass="ttdef"><b>Definition:</b> mqc.h:88</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:274</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:554</div></div>
<divclass="ttc"id="group___m_q_c_html_ga683734858d69085fd07394d1d3fae633"><divclass="ttname"><ahref="group___m_q_c.html#ga683734858d69085fd07394d1d3fae633">opj_mqc_raw_init_dec</a></div><divclass="ttdeci">void opj_mqc_raw_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len, OPJ_UINT32 extra_writable_bytes)</div><divclass="ttdoc">Initialize the decoder for RAW decoding. </div><divclass="ttdef"><b>Definition:</b> mqc.c:531</div></div>