<br><font size=2 face="sans-serif">Decoding the second frame the function
unquant_fine_energy is executed. Within it ec_dec_bits subfunction is executed
(q2 = ec_dec_bits(dec, fine_quant[i]);). Ec_dec_bits calls ec_decode_raw
(s=ec_decode_raw(_this,_ftb);).<br>
In ec_decode_raw within the while loop the following line is executed:</font>
<br><font size=2 face="sans-serif">value |= _this->end_byte>>(8-_this->end_bits_left)<<count;</font>
<br><font size=2 face="sans-serif">As you can see end_byte is read and
used before nothing else has written in it before. </font>
<br><font size=2 face="sans-serif">This produce different results on different
platforms.</font>
<br>
<br><font size=2 face="sans-serif">Regards</font>
<br><font size=2 face="sans-serif">Riccardo</font>
<table>
<tr>
<td>
<hr noshade>
<p><font size=1 face="Arial">Riccardo Micci<br>
Senior DSP Engineer, Wireless Group </font>
<p><font size=1 color=#4181c0 face="Arial"><b>Cambridge Consultants</b></font><font size=1 face="Arial"><br>
Science Park, Milton Road <br>
Cambridge, CB4 0DW, England<br>
Switchboard: +44 (0)1223 420024<br>
Direct dial: +44 (0)1223 392402<br>
Mobile: +44 (0)<br>
Fax: +44 (0)1223 423373</font><font size=1 color=blue face="Arial"><br>
</font><a href=mailto:riccardo.micci@cambridgeconsultants.com><font size=1 color=#4181c0 face="Arial">riccardo.micci@cambridgeconsultants.com</font></a><font size=1 color=blue face="Arial"><br>
</font><a href=http://www.cambridgeconsultants.com/><font size=1 color=#4181c0 face="Arial">www.CambridgeConsultants.com</font></a><font size=1 face="Arial"><br>
</font></table>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Jean-Marc Valin <Jean-Marc.Valin@USherbrooke.ca></b>
</font>
<p><font size=1 face="sans-serif">02/09/2010 13:41</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">celt-dev@xiph.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">riccardo.micci@cambridgeconsultants.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [CELT-dev] Possible Bug</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>> The problem comes decoding the next frame. Since
now "shortBlocks" is false,<br>
> "end_byte" is not initialized anymore and next functions
read it before<br>
> update.<br>
><br>
> Can someone confirm this behaviour? In my case i modified ec_dec_init<br>
> function to initialize it as well. What is the correct value?<br>
<br>
Can you give a bit more information on what's happening? The end_byte <br>
field does not need to be initialized because it should get read when <br>
end_bits_left is zero. In what function is the uninitialized read <br>
happening and what happens then?<br>
<br>
Jean-Marc<br>
<br>
</font></tt>
<br><font size=3 face="sans-serif"><br>
</font>
<br><font size=3 face="sans-serif"><br>
</font>
<hr><font size=1 face="Arial"><br>
<br>
This email is from Cambridge Consultants Limited, Science Park, Milton
Road, Cambridge CB4 0DW with registered number 1036298 England. It may
contain confidential information. It is intended for the addressee only
and may not be copied or disclosed to any third party without our permission.
If you are not the intended recipient please contact the sender as soon
as possible and delete the material from any computer. If this email has
been sent as a personal message to the addressee, the sender is not acting
in his/her capacity as an employee or officer of Cambridge Consultants
Limited and no liability is accepted for the content of any such email.
Outgoing email may be monitored for the purpose of ensuring compliance
with our email policy and relevant laws.</font><font size=3 face="sans-serif"><br>
</font>
<br>
<br>