<ahref="mqc__inl_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="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment">/* For internal use of opj_mqc_decode_macro() */</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"><aclass="line"href="mqc__inl_8h.html#a77750aa7d64cf6f783400c88435e99a8"> 43</a></span> <spanclass="preprocessor">#define opj_mqc_mpsexchange_macro(d, curctx, a) \</span></div>
<divclass="line"><aname="l00054"></a><spanclass="lineno"> 54</span> <spanclass="comment">/* For internal use of opj_mqc_decode_macro() */</span></div>
<divclass="line"><aname="l00055"></a><spanclass="lineno"><aclass="line"href="mqc__inl_8h.html#a0e2e2ac16b81932dd21a765c9acb71d5"> 55</a></span> <spanclass="preprocessor">#define opj_mqc_lpsexchange_macro(d, curctx, a) \</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"> 78</span> <spanclass="comment">/* Given opj_mqc_raw_init_dec() we know that at some point we will */</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment">/* have a 0xFF 0xFF artificial marker */</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span>  d = ((<aclass="code"href="openjpeg_8h.html#a4cb1e6e6b6ef2df499d5c02f7df54cbb">OPJ_UINT32</a>)mqc-><aclass="code"href="structopj__mqc.html#a4cde92619ccfc00fcaf4e8f168eccb96">c</a>>> mqc-><aclass="code"href="structopj__mqc.html#a800663d44b19c3469c242a35840dd9bf">ct</a>) & 0x01U;</div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="preprocessor"></span><spanclass="comment">/* Given opj_mqc_init_dec() we know that at some point we will */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="preprocessor"></span><spanclass="comment">/* have a 0xFF 0xFF artificial marker */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"> 125</span> <spanclass="comment">/* For internal use of opj_mqc_decode_macro() */</span></div>
<divclass="line"><aname="l00126"></a><spanclass="lineno"><aclass="line"href="mqc__inl_8h.html#a26748854179015d73a35f07ed00b1f9d"> 126</a></span> <spanclass="preprocessor">#define opj_mqc_renormd_macro(mqc, a, c, ct) \</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="preprocessor"></span><spanclass="comment">/* Implements ISO 15444-1 C.3.2 Decoding a decision (DECODE) */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00141"></a><spanclass="lineno"> 141</span> <spanclass="preprocessor"></span><spanclass="comment">/* Note: alternate "J.2 - Decoding an MPS or an LPS in the */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00142"></a><spanclass="lineno"> 142</span> <spanclass="preprocessor"></span><spanclass="comment">/* software-conventions decoder" has been tried, but does not bring any */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"> 143</span> <spanclass="preprocessor"></span><spanclass="comment">/* improvement. See https://github.com/uclouvain/openjpeg/issues/921 */</span><spanclass="preprocessor"> \</span></div>
<divclass="line"><aname="l00144"></a><spanclass="lineno"> 144</span> <spanclass="preprocessor"> a -= (*curctx)->qeval; \</span></div>
<divclass="line"><aname="l00145"></a><spanclass="lineno"> 145</span> <spanclass="preprocessor"> if ((c >> 16) < (*curctx)->qeval) { \</span></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="mqc__inl_8h_html_ac95b072fbe38180fafa0c02051b12874"><divclass="ttname"><ahref="mqc__inl_8h.html#ac95b072fbe38180fafa0c02051b12874">opj_mqc_raw_decode</a></div><divclass="ttdeci">static INLINE OPJ_UINT32 opj_mqc_raw_decode(opj_mqc_t *mqc)</div><divclass="ttdoc">Decode a symbol using raw-decoder. </div><divclass="ttdef"><b>Definition:</b> mqc_inl.h:74</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="mqc__inl_8h_html_af1feff8274fe5a9da129d93322fce03e"><divclass="ttname"><ahref="mqc__inl_8h.html#af1feff8274fe5a9da129d93322fce03e">opj_mqc_bytein</a></div><divclass="ttdeci">static INLINE void opj_mqc_bytein(opj_mqc_t *const mqc)</div><divclass="ttdoc">Input a byte. </div><divclass="ttdef"><b>Definition:</b> mqc_inl.h:175</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>