<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>In order to determine the optimum heap size requirements for
my embedded C55xx design, I have used the following to get the encoder and
decoder memory requirements:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>opus_encoder_get_size</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>channels</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>);</span></font><font size=2 face=Consolas><span
style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enc
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>malloc</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(size);</span></font><font size=2 face=Consolas><span
style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>opus_encoder_init</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(enc, config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>Fs</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>, config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>channels</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>, config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0;
background:blue'>application</span></font><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>opus_decoder_get_size</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>channels</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>);</span></font><font size=2 face=Consolas><span
style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dec
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>malloc</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(size);</span></font><font size=2 face=Consolas><span
style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error
= </span></font><b><font size=2 color="#642880" face=Consolas><span
style='font-size:10.0pt;font-family:Consolas;color:#642880;font-weight:bold'>opus_decoder_init</span></font></b><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>(dec, config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>Fs</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>, config.</span></font><font size=2 color="#0000c0"
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>channels</span></font><font
size=2 color=black face=Consolas><span style='font-size:10.0pt;font-family:
Consolas;color:black'>);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-autospace:none'><font size=2 color=black
face=Consolas><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Both the encode decoder init function return no error.
However, opus_encode crashes somewhere deep in the bowels of the function (I
cannot determine where since I have compiler optimizations enabled). Do I need
more heap than what is returned by the above get_size functions?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thx,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>MikeH<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>